/* ============================================================
   PULPIT — 양피지 설교 아카이브 · 디자인 시스템
   ============================================================ */

:root {
  /* ── 파피루스 — 가볍고 약간 투명한 톤 ── */
  --paper-0: #f6efdd;   /* 밝은 부분 (빛) */
  --paper-1: #f0e7d0;   /* 기본 양피지 */
  --paper-2: #e8dcc0;   /* 그늘 */
  --paper-3: #dccaa8;   /* 깊은 그늘 / 가장자리 */
  --paper-edge: #c6ad84;

  /* ── 잉크 ── */
  --ink:        #34281a;
  --ink-soft:   #54402b;
  --ink-faint:  #7a6243;
  --ink-ghost:  rgba(52, 40, 26, 0.28);

  /* ── 루브릭(필사 붉은 잉크) · 금박 ── */
  --rubric:     #9a4424;   /* 제목용 붉은 잉크 */
  --rubric-deep:#7c2f12;
  --gold:       #a6863f;
  --gold-soft:  #c0a25e;

  /* ── 기하 ── */
  --rule-w: 1.5px;
  --spine-gap: clamp(24px, 3.8vh, 46px);
  --maxw: 1340px;

  /* ── 글꼴 ── */
  --font-display: 'Cormorant Garamond', 'Gowun Batang', serif;
  --font-book:    'Hahmlet', 'Song Myung', 'Cormorant Garamond', serif;
  --font-body:    'Noto Serif KR', 'Cormorant Garamond', serif;
  --font-label:   'Cormorant Garamond', 'Gowun Batang', serif;
  --font-script:  'Nanum Brush Script', 'Gaegu', 'Gowun Batang', cursive;

  /* 개인화: 읽기 본문 글씨 크기 배율 (나의 말씀 > 개인화 설정).
     기본 1 = 현행 그대로. 인덱스 인라인 스크립트/JS가 <html> 인라인 스타일로 덮어씀. */
  --kc-fs: 1;

  /* 마우스 추적 좌표 (JS가 갱신) */
  --mx: 50%;
  --my: 35%;
}

/* ============================================================
   개인화: 글꼴 선택 (나의 말씀 > 개인화 설정)
   본문 읽기 글꼴(--font-body·--font-book)만 교체한다.
   대제목/라벨/필사체(장식용 Latin)는 정체성 유지를 위해 보존.
   고딕은 OS 내장 한글 고딕을 우선 사용 → 추가 다운로드 0·즉시 적용.
   명조는 이미 로드된 Gowun Batang 재사용 → 추가 다운로드 0.
   ============================================================ */
html.kc-font-gothic {
  /* '또렷한 고딕' = 전체 페이지 고딕(읽기 본문 + 헤딩 + 라벨/키커). 손글씨 로고(--font-script)는 그대로 보호. */
  --font-body: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Pretendard', sans-serif;
  --font-book: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Pretendard', sans-serif;
  --font-display: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Pretendard', sans-serif;
  --font-label: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', 'Pretendard', sans-serif;
}
html.kc-font-batang {
  --font-body: 'Gowun Batang', 'Noto Serif KR', serif;
  --font-book: 'Gowun Batang', 'Noto Serif KR', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  scrollbar-gutter: stable;
  scrollbar-width: thin;                              /* Firefox */
  scrollbar-color: var(--gold-soft) transparent;      /* Firefox: thumb, track */
}

/* ── 테마 스크롤바: 양피지·금 잉크 톤으로 녹여냄 (주로 PC) ──
   track 은 투명(양피지 바탕 그대로), thumb 은 금~양피지 가장자리 톤.
   thumb 에 투명 테두리 + padding-box 클립으로 얇고 둥글게 보이게 한다. */
::-webkit-scrollbar { width: 13px; height: 13px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold-soft), var(--paper-edge));
  background-clip: padding-box;
  border: 4px solid transparent;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--gold), var(--gold-soft));
  background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

body {
  height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* 한글은 기본적으로 글자 아무 데서나 줄바꿈돼 이름·단어가 쪼개진다.
     keep-all 로 '띄어쓰기 단위'로만 줄바꿈(이름/단어 보존). 긴 영문·URL은
     넘칠 때만 break-word 로 끊어 가로 넘침 방지. */
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ============================================================
   네이티브 앱 감성 — 웹스러운 인터랙션 잔재 제거
   (탭 하이라이트 / 마우스 포커스 링 / 스크롤 바운스 / 탭 지연)
   ============================================================ */

/* 1) 모바일 탭 시 번쩍이는 파란/회색 하이라이트 전역 제거.
      iOS 회전 시 글자 크기 임의 확대도 막아 레이아웃 고정. */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 스크롤 경계에서 튕김(rubber-band)·pull-to-refresh 억제 → 앱처럼 */
  overscroll-behavior: none;
}

/* 2) 마우스/터치로 누른 뒤 남는 파란 포커스 링은 숨기되,
      키보드(Tab) 사용자에게는 접근성 위해 포커스 링 유지. */
:focus:not(:focus-visible) { outline: none; }

/* 3) 클릭 가능한 chrome(버튼·링크·탭·토글)은 네이티브처럼:
      - 탭 지연(300ms)·더블탭 줌 제거(touch-action)
      - 길게 눌렀을 때 뜨는 선택/콜아웃 메뉴 차단
      - 텍스트 드래그 선택 차단
      ※ 본문·성경 구절 등 읽기 콘텐츠는 그대로 선택·복사 가능. */
button,
a,
label,
[role="button"],
.book-row,
[class*="btn"],
[class*="-tab"],
[class*="-toggle"],
[class*="-pill"],
[class*="-chip"] {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 4) 입력 요소는 위 규칙에 휩쓸리지 않게 선택 가능 복구 */
input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

/* 5) 누름 피드백 — 탭 하이라이트를 없앤 대신, 눌렀을 때 살짝 들어가는
      촉감을 통일해서 준다(앱 버튼 느낌). 독립 `scale` 속성이라 기존
      transform(translateY 등) 위에 합성되어 충돌하지 않는다.
      ※ input/textarea 같은 입력 요소는 눌림 효과 제외. */
button:active,
a:active,
label:active,
[role="button"]:active,
.book-row:active,
[class*="btn"]:active,
[class*="-tab"]:active,
[class*="-toggle"]:active,
[class*="-pill"]:active,
[class*="-chip"]:active {
  scale: 0.97;
}
input:active,
textarea:active { scale: none; }

@media (prefers-reduced-motion: reduce) {
  button:active, a:active, label:active, [role="button"]:active,
  .book-row:active, [class*="btn"]:active, [class*="-tab"]:active,
  [class*="-toggle"]:active, [class*="-pill"]:active, [class*="-chip"]:active {
    scale: none;
  }
}

/* ── 양피지 바탕: 섬유결 + 얼룩 + 비네팅 ── */
.paper-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    /* 군데군데 얼룩 */
    radial-gradient(42% 32% at 16% 20%, rgba(150, 116, 60, 0.05), transparent 62%),
    radial-gradient(36% 28% at 84% 72%, rgba(130, 96, 48, 0.05), transparent 64%),
    /* 가장자리 비네팅 */
    radial-gradient(130% 130% at 50% 50%, transparent 60%, rgba(120, 90, 50, 0.08) 92%, rgba(100, 72, 36, 0.15) 100%),
    /* 베이스 톤 */
    linear-gradient(165deg, var(--paper-0), var(--paper-1) 44%, var(--paper-2) 100%);
}
/* SVG 필터로 만든 섬유 결 텍스처 */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  filter: url(#paperFibers);
}

/* ── 마우스를 따라오는 빛 (촛불/창광) ── */
.ambient-light {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    520px 520px at var(--mx) var(--my),
    rgba(255, 250, 230, 0.20),
    rgba(255, 244, 214, 0.06) 38%,
    transparent 66%
  );
  mix-blend-mode: soft-light;
}
/* 반대편 그림자 — 가볍게 제거 */
.ambient-shade { display: none; }

/* ============================================================
   레이아웃 셸
   ============================================================ */
.stage {
  position: relative;
  z-index: 2;
  min-height: 100%;
}

/* ── 마스트헤드 ── */
.masthead {
  position: relative;
  text-align: center;
  padding: clamp(28px, 6vh, 64px) 20px clamp(10px, 2vh, 22px);
}
.masthead-logo {
  display: block;
  height: clamp(64px, 9vw, 96px);
  width: auto;
  margin: 0 auto clamp(12px, 1.8vh, 20px);
  filter: drop-shadow(0 3px 8px rgba(80, 54, 22, 0.2));
}
/* 로고+교회명 묶음을 홈 링크로 (레이아웃은 그대로, 클릭/포커스만 부여) */
.masthead-home {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 10px;
  transition: opacity 0.2s ease;
}
.masthead-home:hover { opacity: 0.86; }
.masthead-home:focus-visible {
  outline: 2px solid var(--rubric);
  outline-offset: 6px;
}
.masthead .eyebrow {
  font-family: var(--font-label);
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--rubric);
  margin-bottom: 0.7em;
  padding-left: 0.46em;
}
.masthead h1 {
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(58px, 10vw, 132px);
  line-height: 0.86;
  letter-spacing: 0.01em;
  color: var(--ink);
  position: relative;
  display: inline-block;
}
.masthead h1 .amp {
  color: var(--rubric);
  font-style: italic;
}
.masthead .sub {
  margin-top: 0.7em;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(13px, 1.4vw, 15px);
  color: var(--ink-soft);
  letter-spacing: 0.14em;
}
.masthead .annot {
  font-family: var(--font-label);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* 장식 디바이더 (✦ 모티프) */
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--rubric);
  margin: 0.6em auto 0;
  max-width: 320px;
}
.flourish::before, .flourish::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--ink-ghost), transparent);
}
.flourish .mark { font-size: 13px; letter-spacing: 0.3em; }

/* ── 스크롤 접힘 헤더(모든 탭·홈 포함) ──
   맨 위에서는 기존 히어로(큰 로고+이름+✦) 그대로. 스크롤을 내리면 히어로는 흐름 속에서
   위로 사라지고 메뉴바가 상단에 고정(sticky)된다. 데스크톱에선 접힐 때 메뉴 왼쪽에 작은
   로고+이름이 함께 나타난다. 메뉴바 높이는 펼침/접힘에서 동일해 스크롤 중 레이아웃 점프가 없다. */

/* body 를 스크롤 컨테이너에서 해제해 아래 sticky 가 뷰포트(html)에 붙게 한다.
   기존 body{overflow-x:hidden} 은 계산상 스크롤 컨테이너를 만들어 sticky 를 깨뜨린다.
   clip 은 같은 클리핑이지만 스크롤 컨테이너를 만들지 않아 sticky 가 정상 동작한다. */
body.kc-proto-header { overflow-x: clip; }

/* 메뉴바 래퍼 — sticky(스크롤 시 상단 고정). 메뉴의 아래 여백은 래퍼로 옮겨
   두 상태에서 메뉴바 높이를 동일하게 유지(점프 방지). */
body.kc-proto-header .navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-bottom: clamp(12px, 3vh, 26px);
  transition: background 0.2s ease-out, box-shadow 0.2s ease-out;
}
body.kc-proto-header .archive-tabs { margin-bottom: 0; }

/* 짧은 콘텐츠 탭(예: 공지 없는 안내)도 접힘이 가능하도록 최소 스크롤 높이를 보장한다.
   접힘은 '히어로가 위로 스크롤돼 사라질 때' 일어나므로, 화면이 뷰포트+히어로보다 짧으면
   스크롤 여유가 없어 히어로가 남는다(안내 탭 최상단 잔류 버그). 아래로 여유를 주고,
   푸터는 flex 로 바닥에 고정해 짧은 탭의 빈 공간이 콘텐츠 아래(푸터 위)로 자연스럽게 가게 한다. */
body.kc-proto-header .stage {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh + 240px);
}
body.kc-proto-header .footer { margin-top: auto; }
@media (min-width: 760px) {
  body.kc-proto-header .stage { min-height: calc(100vh + 340px); }
}

/* 접힘(스크롤): 프로스티드 배경 + 옅은 그림자로 상단 고정 바 느낌. */
body.kc-collapsed .navbar {
  background: rgba(240, 231, 208, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 14px rgba(80, 54, 22, 0.09);
}

/* 미니 브랜드(작은 로고+이름) — 기본 숨김. 데스크톱에서 접히면 나타난다. */
.navbar-brand { display: none; text-decoration: none; }
.navbar-brand-logo { display: block; height: clamp(24px, 6.5vw, 30px); width: auto; }

/* 데스크톱: [작은 로고+이름]  ···메뉴 가운데···  (우측 232px 는 버튼 자리).
   레이아웃 모드를 항상 flex 로 두고(펼침/접힘 공통) 미니 브랜드의 max-width·투명도와
   우측 패딩을 전이시켜, 접힐 때 로고가 부드럽게 펼쳐지고 메뉴가 서서히 재중앙정렬된다. */
@media (min-width: 760px) {
  body.kc-proto-header .navbar {
    display: flex;
    align-items: center;
    padding: 0 0 0 clamp(16px, 3vw, 28px);
    transition: background 0.2s ease-out, box-shadow 0.2s ease-out, padding 0.22s ease-out;
  }
  body.kc-proto-header .navbar .archive-tabs {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    margin: 0;
    justify-content: center;
  }
  body.kc-proto-header .navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    max-width: 0;
    margin-right: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    color: var(--ink);
    transition: max-width 0.22s ease-out, opacity 0.18s ease-out, margin-right 0.22s ease-out;
  }
  body.kc-proto-header .navbar .navbar-brand span {
    font-family: var(--font-script);
    font-size: 28px;
    line-height: 1;
    color: var(--ink);
  }
  /* 접힘: 미니 브랜드 펼침 + 우측 버튼 자리 확보(모두 전이로 느릿하게). */
  body.kc-collapsed .navbar { padding-right: 232px; }
  body.kc-collapsed .navbar .navbar-brand {
    max-width: 280px;
    margin-right: clamp(20px, 3vw, 48px);
    opacity: 1;
  }
  /* 알림·나의 말씀을 접힘 바 우측에 한 줄로(데스크톱은 항상 표시). */
  body.kc-collapsed .share-fab.personal-fab {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: calc(env(safe-area-inset-right, 0px) + 12px);
  }
  body.kc-collapsed .notif-fab {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: calc(env(safe-area-inset-right, 0px) + 136px);
  }
}

/* 모바일: 접히면 알림·나의 말씀을 숨긴다(고정된 메뉴바와 겹침 방지). 맨 위(히어로)로
   올리면 다시 보인다. 데스크톱은 위에서 항상 표시. */
@media (max-width: 759px) {
  body.kc-collapsed .share-fab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-170%);
  }
}

/* ── 검색 바 ── */
.searchwrap {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 20px clamp(14px, 3vh, 30px);
}
.search {
  position: relative;
  width: min(520px, 92vw);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  border: var(--rule-w) solid var(--ink-ghost);
  border-radius: 2px;
  background: rgba(248, 238, 210, 0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 10px rgba(60,40,16,0.08);
  transition: border-color 0.25s, background 0.25s;
}
.search:focus-within {
  border-color: var(--rubric);
  background: rgba(250, 242, 218, 0.7);
}
.search .icon { color: var(--ink-faint); font-size: 15px; flex-shrink: 0; display: inline-flex; align-items: center; }
.search .icon svg { display: block; }
.search input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.search input::placeholder { color: var(--ink-ghost); }
.search input:focus { outline: none; }
.search .clear {
  cursor: pointer;
  color: var(--ink-faint);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.2s;
}
.search .clear.show { opacity: 1; }
.search .count {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--rubric);
  white-space: nowrap;
}

/* ── 최근 검색어 ── 검색창 아래에 늘 있다(입력 중에도). 접으면 이 줄만 남는다 ── */
.search-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  width: min(520px, 92vw);
}
.search-history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
  border: none;
  background: transparent;
  padding: 6px 2px;
  cursor: pointer;
  transition: color 0.2s;
}
.search-history-toggle:hover { color: var(--rubric); }
/* 접었을 때만 붙는 개수 — 접어둔 게 몇 건인지 알아야 다시 펼칠 이유가 생긴다 */
.search-history-count {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink-faint);
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 3px 7px;
}
.search-history-caret { transition: transform 0.22s; }
.search-history-toggle.open .search-history-caret { transform: rotate(180deg); }
.search-history-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
  min-width: 0;
}
/* hidden 속성만으로는 위 display:flex 를 못 이긴다 — 접힘은 여기서 확정한다 */
.search-history-list[hidden] { display: none; }
.search-history-item {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  background: rgba(248, 238, 210, 0.42);
  transition: border-color 0.22s, background 0.22s;
  max-width: 100%;
}
.search-history-item:hover { border-color: var(--ink-faint); }
.search-history-pick {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.2;
  padding: 8px 4px 8px 13px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  max-width: 15em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-history-item:hover .search-history-pick { color: var(--ink); }
/* ✕ 는 '지우기'라는 별개 동작이라, 손가락으로 눌러도 옆 칩과 겹치지 않을 만큼 히트 영역을 준다 */
.search-history-del {
  border: none;
  background: transparent;
  color: var(--ink-ghost);
  font-size: 12px;
  line-height: 1;
  padding: 8px 11px 8px 6px;
  cursor: pointer;
  transition: color 0.2s;
}
.search-history-del:hover { color: var(--rubric); }
.search-history-clear {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.08em;
  border: none;
  background: transparent;
  color: var(--ink-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 4px 2px;
  white-space: nowrap;
}
.search-history-clear:hover { color: var(--rubric); }
/* 성경 탭 — 검색창이 컨테이너 폭을 다 쓰므로 최근 검색어도 같은 폭에 맞춘다 */
.bible-search-block { margin: 4px 0 18px; }
.bible-search-block .bible-searchwrap { margin: 0; }
.bible-search-block .search-history { width: 100%; margin-top: 10px; }

/* ── 필터 칩 ── */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 0 20px clamp(8px, 2vh, 18px);
  position: relative;
  z-index: 5;
}
.chip {
  font-family: var(--font-label);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 13px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  color: var(--ink-soft);
  cursor: pointer;
  background: transparent;
  transition: all 0.22s ease;
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip.active {
  background: var(--rubric);
  border-color: var(--rubric);
  color: var(--paper-0);
  box-shadow: 0 2px 8px rgba(138,49,24,0.28);
}

/* ── 페이즈 2: 자료 탭과 최신 피드 ── */
/* 공식 홈페이지 대분류 메뉴 — 가로 내비게이션 (밑줄 활성 표시) */
.archive-tabs {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: clamp(24px, 6.4vw, 76px);
  row-gap: 0;
  padding: 4px clamp(18px, 3vw, 34px) 0;
  margin: 0 auto clamp(14px, 3vh, 26px);
  width: min(1080px, calc(100vw - 28px));
  border-bottom: 1px solid var(--ink-ghost);
}
.archive-tabs button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-book);
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 4px 13px;
  margin-bottom: -1px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.archive-tabs button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: var(--rubric);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.archive-tabs button:hover { color: var(--ink); }
.archive-tabs button:hover::after { transform: scaleX(0.4); }
.archive-tabs button.active {
  color: var(--rubric-deep);
}
.archive-tabs button.active::after { transform: scaleX(1); }

/* 우상단 알림/나의 말씀 버튼은 스크롤을 내리면 살짝 위로 숨고, 올리면 다시 나타난다
   (성경 읽기 등 본문을 볼 때 거슬리지 않도록). */
.kc-fabs-hidden .share-fab {
  transform: translateY(-160%);
  opacity: 0;
  pointer-events: none;
}

/* 모달(두루마리/미디어/필기) 열림 시 떠 있는 버튼(알림·나의 말씀·맨 위로)을 숨겨
   모달 위로 비쳐 보이지 않게 한다. */
.kc-modal-active .share-fab,
.kc-modal-active .scroll-top {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── 우측 상단 떠 있는 공유 버튼 (flow에 영향 없이 살짝 오버랩) ── */
.share-fab {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 58px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  background: rgba(248, 238, 210, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 8px 15px;
  min-height: 38px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(80, 54, 22, 0.16);
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.28s ease, opacity 0.28s ease, top 0.22s ease-out, right 0.22s ease-out;
}
.share-fab:hover {
  border-color: rgba(154, 68, 36, 0.5);
  color: var(--rubric-deep);
  background: rgba(250, 242, 218, 0.92);
}
.share-fab:active { transform: translateY(1px); }
.share-fab svg { display: block; }
.personal-fab {
  top: calc(env(safe-area-inset-top, 0px) + 58px);
}
.personal-fab.active {
  border-color: rgba(154, 68, 36, 0.55);
  color: var(--rubric-deep);
  background: rgba(250, 242, 218, 0.96);
  box-shadow: 0 3px 14px rgba(138, 49, 24, 0.18);
}

/* ── 알림센터 (종 버튼 + 패널) ── */
.notif-wrap { position: static; }
.notif-fab {
  top: calc(env(safe-area-inset-top, 0px) + 12px);
}
.notif-fab.active {
  border-color: rgba(154, 68, 36, 0.55);
  color: var(--rubric-deep);
  background: rgba(250, 242, 218, 0.96);
  box-shadow: 0 3px 14px rgba(138, 49, 24, 0.18);
}
.notif-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--rubric-deep, #9a3118);
  border: 2px solid rgba(248, 238, 210, 0.95);
  border-radius: 100px;
}
.notif-panel {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 56px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
  z-index: 60;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  background: rgba(250, 243, 222, 0.98);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--ink-ghost);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(80, 54, 22, 0.26);
  overflow: hidden;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--ink-ghost);
}
.notif-head h3 {
  margin: 0;
  font-family: var(--font-display, var(--font-body));
  font-size: 16px;
  color: var(--ink, #3a2a16);
}
.notif-head-actions { display: flex; align-items: center; gap: 6px; }
.notif-mark-all {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 4px 10px;
  cursor: pointer;
}
.notif-mark-all:hover { color: var(--rubric-deep); border-color: rgba(154, 68, 36, 0.5); }
.notif-close {
  font-size: 15px;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
}
.notif-pushbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-soft);
  background: rgba(238, 226, 196, 0.55);
  border-bottom: 1px solid var(--ink-ghost);
}
.notif-pushbar button {
  font-family: var(--font-body);
  font-size: 12px;
  white-space: nowrap;
  color: var(--ink-soft);
  background: rgba(248, 238, 210, 0.9);
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 4px 12px;
  cursor: pointer;
}
.notif-pushbar button.notif-push-enable {
  color: #fff;
  background: var(--rubric-deep, #9a3118);
  border-color: var(--rubric-deep, #9a3118);
}
.notif-push-on { color: var(--rubric-deep); font-weight: 600; }
.notif-push-denied { font-size: 12px; line-height: 1.4; }
.notif-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.notif-empty {
  padding: 28px 14px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
}
.notif-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 30px 12px 14px;
  border-bottom: 1px solid rgba(120, 90, 50, 0.12);
}
.notif-item:last-child { border-bottom: none; }
.notif-item.clickable { cursor: pointer; }
.notif-item.clickable:hover { background: rgba(238, 226, 196, 0.5); }
.notif-item.read { opacity: 0.55; }
.notif-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.notif-body { flex: 1; min-width: 0; }
.notif-row1 { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.notif-tag {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--rubric-deep, #9a3118);
}
.notif-time { font-family: var(--font-body); font-size: 11px; color: var(--ink-soft); margin-left: auto; }
.notif-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink, #3a2a16);
  line-height: 1.4;
  word-break: keep-all;
}
.notif-sub {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
  margin-top: 2px;
  word-break: keep-all;
}
.notif-dot {
  position: absolute;
  top: 15px;
  right: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rubric-deep, #9a3118);
}

/* ── 공지 게시판 (공동체 섹션) ── */
.ann-board { margin: 6px 0 26px; }
.ann-empty {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 6px 2px 2px;
}
.ann-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ann-item {
  background: rgba(250, 243, 222, 0.72);
  border: 1px solid var(--ink-ghost);
  border-left: 3px solid var(--rubric-deep, #9a3118);
  border-radius: 12px;
  padding: 14px 16px;
}
.ann-date {
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.ann-title {
  margin: 0;
  font-family: var(--font-display, var(--font-body));
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink, #3a2a16);
  line-height: 1.4;
  word-break: keep-all;
}
.ann-body {
  margin: 6px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: keep-all;
}
.ann-link {
  display: inline-block;
  margin-top: 9px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--rubric-deep, #9a3118);
  text-decoration: none;
}
.ann-link:hover { text-decoration: underline; }
.ann-item.ann-flash { animation: annFlash 2.6s ease-out; }
@keyframes annFlash {
  0%, 16% {
    background: rgba(154, 68, 36, 0.16);
    box-shadow: 0 0 0 3px rgba(154, 68, 36, 0.22);
  }
  100% {
    background: rgba(250, 243, 222, 0.72);
    box-shadow: 0 0 0 0 rgba(154, 68, 36, 0);
  }
}
/* 공지 더보기 — 공지가 많아져도 목록이 끝없이 길어지지 않게 접어둔다 */
.ann-more {
  display: block;
  margin: 14px auto 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--rubric-deep, #9a3118);
  background: rgba(250, 243, 222, 0.72);
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
}
.ann-more:hover { background: rgba(154, 68, 36, 0.1); }
.ann-more-count { color: var(--ink-faint); font-weight: 400; margin-left: 4px; }

/* ── '맨 위로' 버튼 — 스크롤 내렸을 때만 우측 하단에 ── */
.scroll-top {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  right: calc(env(safe-area-inset-right, 0px) + 14px);
  z-index: 85;   /* 미니 플레이어(z80) 위 — 영상 PiP 뒤로 숨지 않게. 토스트(100)·모달(120+) 아래 유지 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--ink-soft);
  background: rgba(248, 238, 210, 0.86);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid var(--ink-ghost);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(80, 54, 22, 0.2);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s, color 0.2s, background 0.2s;
}
.scroll-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  border-color: rgba(154, 68, 36, 0.5);
  color: var(--rubric-deep);
  background: rgba(250, 242, 218, 0.94);
}
.scroll-top:active { transform: translateY(1px); }
.scroll-top svg { display: block; }
@media (prefers-reduced-motion: reduce) {
  .scroll-top { transition: opacity 0.2s ease; transform: none; }
  .scroll-top.show { transform: none; }
}

/* ── 버튼 공통(푸터 큰글씨 토글 등) ── */
.util-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  background: rgba(248, 238, 210, 0.5);
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 7px 16px;
  min-height: 38px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.util-btn:hover {
  border-color: rgba(154, 68, 36, 0.5);
  color: var(--rubric-deep);
  background: rgba(154, 68, 36, 0.06);
}
.util-btn.active {
  background: var(--rubric);
  border-color: var(--rubric);
  color: var(--paper-0);
  box-shadow: 0 2px 8px rgba(138, 49, 24, 0.26);
}
.util-btn .util-svg { display: block; }
.util-btn .util-aa {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
}

/* ── 토스트(링크 복사 안내 등) ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  transform: translateX(-50%);
  /* 260 = 이 앱의 모든 오버레이 위(구절·상장 카드 120, 인앱 알림 125, 설치 배너·방문 차트 130,
     원어 팝업 140, 일정 상세 200, 이미지 뷰어 250). 카카오 게이트(2147483000)만 위에 둔다.
     토스트는 '방금 누른 것'의 결과를 알리는 글인데, 그 누름이 대개 모달 안에서 일어난다 —
     100 이던 때는 캘린더 구독 안내에서 '주소 복사하기'를 눌러도 '구독 주소를 복사했어요'가
     모달 어둠막 뒤에 깔려 아무 반응이 없어 보였다(2026-08-05 녹화 프레임에서 실측). */
  z-index: 260;
  max-width: calc(100vw - 32px);
  background: rgba(52, 40, 26, 0.93);
  color: #f6efdd;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.02em;
  padding: 11px 22px;
  border-radius: 100px;
  box-shadow: 0 6px 22px rgba(40, 26, 8, 0.34);
  animation: toastIn 0.25s ease;
}
body.kc-mini .toast {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 112px);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* PWA 설치 안내 배너 — 화면 상단 고정, 진입 시 슬라이드다운 */
.install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: rgba(52, 40, 26, 0.96);
  color: #f6efdd;
  box-shadow: 0 6px 22px rgba(40, 26, 8, 0.34);
  animation: installSlideDown 0.32s ease;
}
@keyframes installSlideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.install-banner-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.install-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}
.install-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.install-banner-text strong {
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.install-banner-text span {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(246, 239, 221, 0.78);
  display: -webkit-box;
  -webkit-line-clamp: 2;     /* 안내문 길면 최대 2줄 */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.install-banner-btn {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: #f6efdd;
  border: none;
  border-radius: 100px;
  padding: 8px 18px;
  cursor: pointer;
}
.install-banner-btn:hover { background: #fffaf0; }
.install-banner-close {
  font-size: 15px;
  line-height: 1;
  color: rgba(246, 239, 221, 0.7);
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.install-banner-close:hover { color: #f6efdd; }

/* 카카오톡 인앱 → 외부 브라우저 유도 전면 게이트 */
.kakao-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;          /* 미니플레이어·토스트·모달 등 모든 UI 위 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 22px calc(env(safe-area-inset-bottom, 0px) + 24px);
  background: rgba(26, 18, 8, 0.84);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  animation: kakaoGateFade 0.24s ease;
}
@keyframes kakaoGateFade { from { opacity: 0; } to { opacity: 1; } }
.kakao-gate-card {
  width: 100%;
  max-width: 348px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 13px;
  padding: 30px 24px 20px;
  border-radius: 22px;
  background: linear-gradient(168deg, var(--paper-0), var(--paper-1) 70%, var(--paper-2));
  border: 1px solid var(--paper-edge);
  box-shadow: 0 24px 60px rgba(20, 12, 2, 0.5);
  animation: kakaoGateRise 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes kakaoGateRise {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.kakao-gate-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 4px 14px rgba(40, 26, 8, 0.32);
}
.kakao-gate-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.kakao-gate-desc {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.62;
  color: var(--ink-soft);
}
.kakao-gate-desc b { color: var(--ink); font-weight: 700; }
.kakao-gate-btn {
  width: 100%;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--paper-0);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: none;
  border-radius: 100px;
  padding: 15px 18px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 96, 32, 0.34);
  transition: filter 0.15s ease, transform 0.05s ease;
}
.kakao-gate-btn:hover { filter: brightness(1.05); }
.kakao-gate-btn:active { transform: translateY(1px); }
.kakao-gate-hint {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-faint);
}
.kakao-gate-hint b { color: var(--ink-soft); font-weight: 600; }
.kakao-gate-skip {
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  padding: 8px 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.kakao-gate-skip:hover { color: var(--ink-soft); }

/* 푸시 수신 시 열린 앱 안에 잠깐 띄우는 알림 */
.inapp-notif {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  transform: translateX(-50%);
  z-index: 125;
  display: flex;
  align-items: stretch;
  width: min(420px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(90, 70, 42, 0.34);
  border-radius: 18px;
  background: rgba(248, 238, 210, 0.96);
  color: var(--ink);
  box-shadow: 0 14px 36px rgba(40, 26, 8, 0.34);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: inappNotifIn 0.24s ease;
}
.inapp-notif-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 12px 12px 15px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.inapp-notif-icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(154, 68, 36, 0.1);
  font-size: 16px;
}
.inapp-notif-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.inapp-notif-kicker {
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--rubric);
}
.inapp-notif-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.inapp-notif-sub {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-soft);
}
.inapp-notif-close {
  flex: 0 0 38px;
  border: 0;
  border-left: 1px solid rgba(90, 70, 42, 0.18);
  background: rgba(255, 250, 235, 0.35);
  color: var(--ink-soft);
  font-size: 20px;
  cursor: pointer;
}
.inapp-notif-main:hover,
.inapp-notif-close:hover {
  background: rgba(154, 68, 36, 0.06);
}
@keyframes inappNotifIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.sermon-mode {
  padding-bottom: 8px;
}
.bible-filters {
  padding-top: 2px;
}
.expo-book-tabs {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
}
.expo-book-tabs button {
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  background: rgba(255, 250, 235, 0.3);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-height: 32px;
  padding: 5px 13px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.expo-book-tabs button:hover {
  border-color: rgba(154, 68, 36, 0.4);
  background: rgba(154, 68, 36, 0.06);
}
.expo-book-tabs button.active {
  border-color: rgba(154, 68, 36, 0.5);
  background: rgba(154, 68, 36, 0.12);
  color: var(--rubric-deep);
}
.expo-book-tabs em {
  font-style: normal;
  font-family: var(--font-label);
  font-size: 10.5px;
  margin-left: 4px;
  opacity: 0.7;
}
/* 주제 강해 시리즈 옵션 — 성경책과 구분되는 살짝 따뜻한 톤 + 앞 구분 라벨 */
.subfilter-divider {
  align-self: center;
  font-family: var(--font-label);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  padding: 0 4px;
  opacity: 0.8;
}
.expo-book-tabs .expo-series-opt:not(.active) { background: rgba(154, 68, 36, 0.07); }

/* 설교자(목사님/평신도) 보조 필터 — 최신순 계열 루브릭 톤에 맞춤 */
.preacher-tabs button {
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  background: rgba(255, 250, 235, 0.3);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  min-height: 32px;
  padding: 5px 13px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.preacher-tabs button:hover {
  border-color: rgba(154, 68, 36, 0.4);
  background: rgba(154, 68, 36, 0.06);
}
.preacher-tabs button.active {
  border-color: rgba(154, 68, 36, 0.5);
  background: rgba(154, 68, 36, 0.12);
  color: var(--rubric-deep);
}
.preacher-tabs em {
  font-style: normal;
  font-family: var(--font-label);
  font-size: 10.5px;
  margin-left: 4px;
  opacity: 0.7;
}

/* ── 2차(보조) 필터 선반 — 상위 모드 아래로 한 단계 들여 위계 표시 ──
   최신순/성경별/강해설교(1차)와 전체/구약/신약(2차)이 같은 칩이라
   계층이 모호했던 문제 해결: 2차는 우묵한 선반 + '↳' 라벨 + 작은 칩. */
.subfilter-row {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 2px 20px 14px;
}
.subfilter-tray {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px 8px;
  max-width: min(760px, 100%);
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(52, 40, 26, 0.05);
  border: 1px solid rgba(52, 40, 26, 0.09);
  box-shadow: inset 0 1px 3px rgba(52, 40, 26, 0.07),
              0 1px 0 rgba(255, 250, 235, 0.55);
}
/* 모든 보조(2차) 필터 버튼 공통 알약 — 깊이(성경책/범위/시리즈/설교자/정렬)별 통일.
   1차 칩(.chip 12.5px)보다 한 치수 작게(11px) → 레벨 간 위계가 보이도록. */
.subfilter-tray button {
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  background: rgba(255, 250, 235, 0.3);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  min-height: 30px;
  padding: 4px 11px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.subfilter-tray button:hover {
  border-color: rgba(154, 68, 36, 0.4);
  background: rgba(154, 68, 36, 0.06);
}
.subfilter-tray button.active {
  border-color: rgba(154, 68, 36, 0.5);
  background: rgba(154, 68, 36, 0.12);
  color: var(--rubric-deep);
}
.subfilter-tray button em {
  font-style: normal;
  font-family: var(--font-label);
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.7;
}
.subfilter-label {
  align-self: center;
  font-family: var(--font-label);
  font-size: 11.5px;
  font-style: italic;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  padding: 0 6px 0 2px;
  margin-right: 1px;
  white-space: nowrap;
  opacity: 0.92;
}
/* 보조 영역의 .chip(범위·정렬)은 1차 칩 고유 효과(대문자·진한 active·그림자)를
   버리고 보조 알약 공통(.subfilter-tray button)과 동일하게 맞춘다. */
.subfilter-tray .chip {
  text-transform: none;
  letter-spacing: 0.06em;
  background: rgba(255, 250, 235, 0.3);
  box-shadow: none;
}
.subfilter-tray .chip:hover {
  border-color: rgba(154, 68, 36, 0.4);
  background: rgba(154, 68, 36, 0.06);
  color: var(--ink);
}
.subfilter-tray .chip.active {
  background: rgba(154, 68, 36, 0.12);
  border-color: rgba(154, 68, 36, 0.5);
  color: var(--rubric-deep);
  box-shadow: none;
}
.feed-shell,
.materials-shell,
.community-shell {
  width: min(980px, calc(100vw - 34px));
  margin: 8px auto clamp(44px, 8vh, 88px);
  position: relative;
  z-index: 4;
}
.feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 4px 14px;
  border-bottom: 1px solid rgba(52, 40, 26, 0.18);
}
.section-kicker {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rubric);
}
.feed-head h2 {
  font-family: var(--font-book);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
}
.feed-head p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.feed-count {
  flex-shrink: 0;
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--rubric);
  background: rgba(255, 250, 235, 0.34);
}
.feed-head-right { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.feed-playall {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(47, 93, 74, 0.4); border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--font-label); font-size: 12px; letter-spacing: 0.04em;
  color: #245440; background: rgba(47, 93, 74, 0.08); cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.feed-playall:hover { background: rgba(47, 93, 74, 0.16); border-color: #2f5d4a; }
.feed-playall em { font-style: normal; font-weight: 700; opacity: 0.7; font-size: 11px; }
.feed-playall svg { flex-shrink: 0; }
/* 시리즈 담기 — '전체 듣기'(초록)와 구분되는 중립 외곽선 버튼 */
.feed-saveseries {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--ink-ghost); border-radius: 999px;
  padding: 6px 13px;
  font-family: var(--font-label); font-size: 12px; letter-spacing: 0.04em;
  color: var(--rubric); background: rgba(255, 250, 235, 0.34); cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.feed-saveseries:hover { background: rgba(124, 45, 45, 0.08); border-color: var(--rubric); }
.feed-saveseries svg { flex-shrink: 0; }
.feed-saveseries.is-saved { cursor: default; color: var(--ink-faint); background: rgba(255, 250, 235, 0.2); }
.feed-saveseries.is-saved:hover { background: rgba(255, 250, 235, 0.2); border-color: var(--ink-ghost); }
.personal-series-resume { margin: 3px 0 0; font-size: 13px; color: var(--rubric); }
.personal-series-resume.muted { color: var(--ink-faint); }
/* 내 시리즈 — 회차 진행 표시(상용 플레이어식: "5/14강" + 회차 내 진행바 + 시간) */
/* 진행 막대는 카드 본문 컬럼(버튼 폭에 따라 들쭉날쭉)에 묶이지 않도록 카드 전체 폭의 한 줄로 내려, 트랙 길이(MAX)를 모든 카드에서 일정하게 둔다. */
.personal-series-resume.series-progress { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; width: 100%; }
.series-resume-line { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.series-ep-counter {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--rubric-deep);
  white-space: nowrap;
}
.series-ep-title { font-size: 12.5px; color: var(--ink-soft); }
.series-ep-track {
  display: block;
  height: 4px;
  width: 100%;
  max-width: 340px;
  background: rgba(166, 134, 63, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.series-ep-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 999px;
}
.series-ep-time {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
/* 단일 설교 이어듣기 막대(내 시리즈와 같은 비주얼) — 청취 기록·즐겨찾기·나중에 들을 설교 등 */
.personal-resume { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; width: 100%; }
.personal-resume .series-ep-time { color: var(--rubric); }
.personal-listened-done { color: var(--gold); font-weight: 700; }
.feed-list,
.material-list,
.community-grid {
  padding-top: 10px;
}
.feed-sermon {
  position: relative;
  border-bottom: 1px solid rgba(52, 40, 26, 0.12);
}
.feed-sermon .sermon {
  border-bottom: none;
  padding-top: 18px;
  padding-bottom: 18px;
}
.feed-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 4px 0 30px;
}
.feed-meta span {
  border: 1px solid rgba(52, 40, 26, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
  font-family: var(--font-label);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  background: rgba(248, 238, 210, 0.54);
}
.archive-empty {
  margin: 28px 0;
  padding: 30px 18px;
  border: 1px dashed rgba(52, 40, 26, 0.22);
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-faint);
  background: rgba(255, 250, 235, 0.22);
}
.feed-more {
  display: block;
  margin: 22px auto 4px;
  padding: 10px 26px;
  font-family: var(--font-label);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  background: rgba(255, 250, 235, 0.5);
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.feed-more:hover {
  border-color: var(--rubric);
  color: var(--rubric-deep);
  background: rgba(154, 68, 36, 0.06);
}
.feed-more .feed-more-count {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-left: 6px;
}

/* ── 메인(홈) 페이지 ── */
.home {
  width: min(980px, calc(100vw - 34px));
  margin: 0 auto clamp(44px, 8vh, 88px);
  position: relative;
  z-index: 4;
}
/* 홈 하단 — 새로고침마다 바뀌는 말씀 */
.home-verse {
  position: relative;
  max-width: 660px;
  margin: clamp(36px, 6vh, 64px) auto clamp(8px, 2vh, 18px);
  text-align: center;
}
/* 배경 이미지 히어로 카드 — 이미지는 세피아로 묶어 양피지 톤 유지, 위에 따뜻한 오버레이 */
.home-verse.has-bg {
  max-width: 900px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: clamp(48px, 7vw, 92px) clamp(24px, 5vw, 64px);
  min-height: clamp(230px, 40vh, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 44px rgba(40, 28, 16, 0.24), inset 0 0 0 1px rgba(255, 250, 235, 0.12);
}
.verse-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: sepia(0.34) saturate(0.82) contrast(0.97) brightness(0.92);
  transform: scale(1.05);
  animation: verseZoom 30s ease-out forwards;
}
@keyframes verseZoom { to { transform: scale(1.13); } }
.verse-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(40, 27, 14, 0.40) 0%, rgba(32, 21, 11, 0.66) 100%),
    radial-gradient(125% 95% at 50% 28%, rgba(70, 46, 22, 0.08), rgba(26, 17, 9, 0.52));
}
.verse-content { position: relative; z-index: 2; }
/* 홈 말씀 카드 공유 버튼 — PC는 카드에 마우스 올리면 우측하단에 나타나고,
   터치 기기는 hover가 없으므로 항상(옅게) 보이게 한다. */
.home-verse-share {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(248, 238, 210, 0.5);
  background: rgba(40, 28, 14, 0.46);
  color: #f6efdd;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.home-verse-share .glyph { font-size: 12px; }
.home-verse:hover .home-verse-share,
.home-verse-share:focus-visible { opacity: 1; transform: none; }
.home-verse-share:hover { background: rgba(40, 28, 14, 0.66); }
@media (hover: none) {
  .home-verse-share { opacity: 0.92; transform: none; }
}
/* 오늘의 말씀 '성경에서 읽기' — 구절 참조 아래에서 그 본문(성경 탭)으로 점프.
   기본 카드는 rubric 아웃라인, 배경 히어로 카드(has-bg)는 크림·금 톤으로 대비를 맞춘다. */
.verse-open-bible {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 8px 18px;
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.06em;
  border-radius: 100px;
  border: 1px solid var(--rubric);
  background: transparent;
  color: var(--rubric);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
}
.verse-open-bible .glyph { font-size: 15px; line-height: 1; }
.verse-open-bible:hover { background: var(--rubric); border-color: var(--rubric); color: #fff; }
.verse-open-bible:active { transform: translateY(1px); }
.verse-open-bible:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }
/* 배경 이미지 위(실제 대부분의 카드) — 어두운 오버레이에 맞춰 크림·금 아웃라인 */
.home-verse.has-bg .verse-open-bible {
  border-color: rgba(236, 202, 132, 0.65);
  color: #ecca84;
  background: rgba(40, 28, 14, 0.32);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.home-verse.has-bg .verse-open-bible:hover {
  background: rgba(236, 202, 132, 0.92);
  border-color: transparent;
  color: #2a1c0e;
}
.verse-eyebrow {
  display: block;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--rubric);
  margin-bottom: 12px;
}
.verse-mark {
  display: block;
  color: var(--rubric);
  font-size: 13px;
  letter-spacing: 0.3em;
  opacity: 0.8;
  margin-bottom: 14px;
}
.verse-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(16px, 2.3vw, 22px);
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}
.verse-ref {
  display: block;
  margin-top: 14px;
  font-family: var(--font-label);
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--rubric);
}
/* 배경 위 텍스트 — 크림·금 톤으로 가독성 + 분위기 */
.home-verse.has-bg .verse-eyebrow { color: #ecca84; opacity: 0.92; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4); }
.home-verse.has-bg .verse-mark { color: #ecca84; opacity: 0.95; }
.home-verse.has-bg .verse-text {
  color: #f7eddd;
  font-size: clamp(18px, 2.6vw, 25px);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.42);
}
.home-verse.has-bg .verse-ref { color: #ecca84; }

/* 예배 안내 · 오시는 길 패널 */
.home-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: clamp(30px, 5vh, 50px);
}
.home-panel {
  border: 1px solid var(--ink-ghost);
  border-radius: 12px;
  background: rgba(248, 238, 210, 0.42);
  box-shadow: 0 8px 26px rgba(70, 44, 18, 0.06);
  padding: clamp(18px, 2.6vh, 28px) clamp(18px, 2.4vw, 26px);
}
.home-panel-title {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 600;
  color: var(--ink);
  margin: 3px 0 14px;
}
.service-list { list-style: none; margin: 0; padding: 0; }
.service-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(52, 40, 26, 0.14);
  font-family: var(--font-body);
}
.service-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.svc-name { color: var(--ink); font-weight: 500; font-size: 15px; }
.svc-time { color: var(--ink-soft); font-size: 14px; letter-spacing: 0.02em; white-space: nowrap; }
.addr { font-family: var(--font-body); }
.addr p {
  margin: 0 0 9px;
  display: flex;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.addr p b {
  flex: 0 0 auto;
  min-width: 52px;
  color: var(--ink-faint);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.home-map-btn { margin-top: 6px; display: inline-flex; }
@media (max-width: 640px) {
  .home-info { grid-template-columns: 1fr; }
}
.home-recent-head {
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-ghost);
}
.home-recent-head .section-kicker { width: 100%; }
.home-recent-head h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.home-more {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--rubric);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.home-more:hover { color: var(--rubric-deep); }

.home-recommend {
  margin-top: clamp(28px, 5vh, 48px);
}
.recommend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.recommend-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  border: 1px solid rgba(52, 40, 26, 0.13);
  border-radius: 10px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 250, 236, 0.62), transparent 70%),
    rgba(248, 238, 210, 0.38);
  box-shadow: 0 8px 24px rgba(70, 44, 18, 0.06);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.recommend-card:hover {
  border-color: rgba(154, 68, 36, 0.28);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 250, 236, 0.78), transparent 70%),
    rgba(248, 238, 210, 0.5);
  transform: translateY(-1px);
}
.recommend-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.recommend-meta span + span::before {
  content: "·";
  margin-right: 9px;
  color: rgba(52, 40, 26, 0.3);
}
.recommend-card h3 {
  margin: 0;
  font-family: var(--font-book);
  font-size: clamp(19px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.32;
  color: var(--ink);
}
.recommend-title-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.recommend-title-link span {
  margin-left: 5px;
  color: var(--rubric);
  opacity: 0.58;
}
.recommend-title-link:hover {
  color: var(--rubric-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(154, 68, 36, 0.45);
}
.recommend-title-link:hover span { opacity: 1; }
.recommend-passage,
.recommend-reason {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.55;
}
.recommend-passage {
  color: var(--ink-soft);
}
.recommend-reason {
  padding-left: 10px;
  border-left: 2px solid rgba(154, 68, 36, 0.35);
  color: var(--rubric-deep);
}
.recommend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 4px;
}

/* ── 나의 말씀: 로컬 개인화 페이지 ── */
.personal-shell {
  width: min(980px, calc(100vw - 34px));
  margin: 0 auto clamp(44px, 8vh, 88px);
  position: relative;
  z-index: 4;
}
.personal-head {
  padding: clamp(18px, 3vh, 28px) 4px 18px;
  border-bottom: 1px solid var(--ink-ghost);
}
.personal-head h2,
.personal-section-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 8px;
}
.personal-head h2 { font-size: clamp(28px, 4vw, 42px); }
.personal-section-head h3 { font-size: clamp(22px, 3vw, 30px); }
.personal-head p {
  max-width: 720px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.personal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 clamp(20px, 4vh, 32px);
}
.personal-stats.personal-stats-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
/* 주간 카드는 막대 그래프를 품고 있어 한 줄을 통째로 쓴다 — 2열 그리드에 '총·오늘' 한 줄, '이번 주' 한 줄. */
.personal-stats-2 .personal-stat-week { grid-column: 1 / -1; }

/* ── 현재 접속 중인 회원 스트립(옵션 A) ── */
.presence-strip {
  margin: 14px 0;
  padding: 12px 16px 14px;
  border: 1px solid rgba(52, 40, 26, 0.20);
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.7);
}
.presence-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.presence-dot { width: 9px; height: 9px; border-radius: 50%; background: #2e8a3a; flex: 0 0 auto; animation: kc-presence-pulse 1.6s ease-in-out infinite; }
@keyframes kc-presence-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.presence-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.presence-count { font-size: 13px; font-weight: 600; color: var(--rubric); background: rgba(154, 68, 36, 0.10); padding: 2px 9px; border-radius: 999px; }
.presence-optout-btn { margin-left: auto; background: none; border: none; color: var(--ink-faint); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.presence-optout-btn:hover { color: var(--rubric); text-decoration: underline; }
.presence-avatars { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 2px; }
.presence-av-item { text-align: center; flex: 0 0 auto; width: 52px; }
.presence-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #f7f0dd; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 600; margin: 0 auto; box-sizing: border-box; }
.presence-av-more { background: rgba(52, 40, 26, 0.14); color: var(--ink-soft); }
.presence-name { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 실명 태그(관리자에게만 내려온다) — 닉네임 아랫줄. 아바타 폭(52px)이 좁아 한 줄에 붙이면 잘린다. */
.presence-real { display: block; font-size: 10.5px; font-weight: 600; color: var(--rubric); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presence-empty { font-size: 13px; color: var(--ink-faint); }
.presence-av-btn { background: none; border: none; padding: 0; cursor: pointer; font: inherit; }
.presence-av-btn .presence-av { transition: transform .12s ease, border-color .12s ease; }
.presence-av-btn:hover .presence-av, .presence-av-btn:active .presence-av { transform: scale(1.08); border-color: var(--rubric); }
.presence-av-btn:hover .presence-name { color: var(--rubric); }
.presence-hint { margin-top: 10px; font-size: 12px; color: var(--ink-faint); }
/* ── 전체 멤버 명부 스트립 — 한 줄 접힘/펼침, 접속중 선명·미접속 흐림, 응원 배지 ── */
.presence-avatars-wrap { flex-wrap: wrap; overflow: visible; row-gap: 12px; padding-top: 6px; }
.presence-avatars-wrap.collapsed { max-height: 76px; overflow: hidden; }
.presence-avatars-wrap.collapsed.has-real { max-height: 92px; }   /* 실명 줄이 붙는 관리자 화면 — 한 줄만큼 여유 */
.presence-av-item.is-off .presence-av { filter: grayscale(0.9); opacity: 0.45; }
.presence-av-item.is-off .presence-name { color: var(--ink-faint); opacity: 0.7; }
.presence-av-holder { position: relative; display: inline-block; }
.presence-av-cheer {
  position: absolute; right: -7px; top: -6px; z-index: 1;
  display: inline-flex; align-items: center; gap: 1px;
  font-size: 12px; line-height: 16px; white-space: nowrap;
  background: #fff7ea; border: 1px solid rgba(154, 68, 36, 0.28);
  border-radius: 999px; padding: 0 3px;
}
/* '이번 달 받은 응원' 숫자(관리자 모드가 상시/주기창일 때만 아이콘 옆에 덧붙음) */
.presence-av-cheer-n { font-size: 10px; font-weight: 700; color: var(--rubric); padding-right: 1px; }
.presence-av-item.is-off .presence-av-cheer { opacity: 0.75; }
.presence-more-btn {
  display: block; margin: 10px auto 0; padding: 5px 16px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer;
  background: rgba(52, 40, 26, 0.05); border: 1px solid rgba(52, 40, 26, 0.16); border-radius: 999px;
}
.presence-more-btn:hover { color: var(--rubric); border-color: var(--rubric); }
/* ── 이벤트 제안 인라인 수정(내 제안) — 삭제(×) 버튼과 같은 톤 ── */
.poll-edit-btn {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1;
  color: var(--ink-faint); background: transparent; border: 1px solid var(--ink-ghost); padding: 0;
}
.poll-edit-btn:hover { color: var(--rubric, #9a4424); border-color: currentColor; }
.poll-edit-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.poll-edit-acts { display: flex; gap: 8px; }
.poll-edit-save, .poll-edit-cancel { padding: 5px 14px; font-size: 13px; }
/* 받은 응원 배지(프로필 누적) */
/* 응원 푸시 딥링크(?cheers=1)로 스크롤해 도착하는 '받은 응원' 앵커 — 잠깐 하이라이트로 시선 유도. */
.cheer-scroll-anchor { scroll-margin-top: 72px; border-radius: 14px; }
.cheer-scroll-anchor.cheer-flash .reaction-badges { animation: cheerFlash 2.8s ease-out; }
@keyframes cheerFlash {
  0%, 18% { box-shadow: 0 0 0 3px rgba(154, 68, 36, 0.28); border-color: rgba(154, 68, 36, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(154, 68, 36, 0); }
}
.reaction-badges { margin: 0 0 clamp(20px, 4vh, 32px); padding: 12px 16px 14px; border: 1px solid rgba(52, 40, 26, 0.20); border-radius: 14px; background: rgba(255, 252, 244, 0.7); }
.reaction-badges-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.reaction-badges-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.reaction-badges-total { font-size: 13px; font-weight: 600; color: var(--rubric); background: rgba(154, 68, 36, 0.10); padding: 2px 9px; border-radius: 999px; }
.reaction-badges-list { display: flex; flex-wrap: wrap; gap: 8px; }
.reaction-badge { display: inline-flex; align-items: center; gap: 5px; background: rgba(52, 40, 26, 0.05); border: 1px solid rgba(52, 40, 26, 0.14); border-radius: 999px; padding: 4px 10px; }
.reaction-badge-icon { font-size: 17px; line-height: 1; }
.reaction-badge-n { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
/* 받은 응원 이력(누가·아이콘·시각) — 최근 몇 개 인라인 + '모두 보기' 팝업 */
.cheerlog-recent { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.cheerlog-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.cheerlog-row .comment-avatar { width: 24px; height: 24px; font-size: 11px; flex: 0 0 auto; }
.cheerlog-from { font-size: 13px; color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cheerlog-icon { font-size: 15px; line-height: 1; flex: 0 0 auto; }
.cheerlog-when { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); flex: 0 0 auto; }
.cheerlog-more { align-self: flex-start; margin-top: 4px; background: none; border: none; padding: 2px 0; cursor: pointer; font-family: var(--font-body); font-size: 12.5px; color: var(--rubric, #9a4424); }
.cheerlog-more:hover { text-decoration: underline; }
.cheerlog-note { margin: 10px 0 0; font-size: 12px; color: var(--ink-faint); line-height: 1.5; }
.verse-card-box.cheerlog-modal { max-width: 400px; }
.cheerlog-list { max-height: 56vh; overflow-y: auto; display: flex; flex-direction: column; }
.cheerlog-list .cheerlog-row { border-top: 1px solid rgba(52, 40, 26, 0.08); }
.cheerlog-list .cheerlog-row:first-child { border-top: none; }
/* 나의 말씀 '내 활동' — 내가 남긴 댓글·공감 목록 */
.my-activity-list { display: flex; flex-direction: column; }
.my-activity-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 2px; background: none; border: none; border-top: 1px solid rgba(52, 40, 26, 0.08); text-align: left; cursor: pointer; font-family: inherit; }
.my-activity-row:first-child { border-top: none; }
.my-activity-row:hover { background: rgba(52, 40, 26, 0.03); }
.my-activity-icon { flex: 0 0 auto; font-size: 15px; line-height: 1; }
.my-activity-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
.my-activity-kind { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--rubric, #9a4424); }
.my-activity-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink-soft, #5a5348); }
.my-activity-when { flex: 0 0 auto; margin-left: auto; font-size: 11.5px; color: var(--ink-faint); }
/* 설교 상세 '읽음'(read-receipt) */
.read-receipt { margin: 4px 0 14px; }
.read-receipt-open { display: inline-flex; align-items: center; background: none; border: none; padding: 6px 0; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.read-receipt-static { display: inline-flex; align-items: center; padding: 6px 0; font-size: 13px; color: var(--ink-soft); }
.read-receipt-num { font-weight: 700; color: var(--ink); margin-right: 3px; }
.read-receipt-sep { margin: 0 6px; color: var(--ink-faint); }
.read-receipt-link { color: var(--rubric); }
.read-receipt-open:hover .read-receipt-link { text-decoration: underline; }
.verse-card-box.read-receipt-modal {
  max-width: 380px;
  align-items: stretch;
  background: rgba(250, 243, 222, 0.98);
  border: 1px solid var(--ink-ghost, rgba(52, 40, 26, 0.28));
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.55);
}
.read-receipt-modal-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.read-receipt-modal-head strong { font-size: 16px; color: var(--ink); }
.read-receipt-modal-count { font-size: 13px; color: var(--rubric); font-weight: 600; }
.read-receipt-msg { font-size: 14px; color: var(--ink-soft); padding: 12px 0; }
.read-receipt-list { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; }
.read-receipt-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(52, 40, 26, 0.08); }
.read-receipt-row:first-child { border-top: none; }
.read-receipt-name { font-size: 15px; color: var(--ink); }
.read-receipt-close { margin-top: 14px; width: 100%; }
/* 읽은 멤버 '시간순 누적' 미니 차트 (관리자 팝업) */
.read-chart { margin: 0 0 14px; padding: 10px 12px 4px; background: var(--paper-0); border: 1px solid var(--paper-edge); border-radius: 12px; }
.read-chart-cap { font-size: 12px; font-weight: 700; color: var(--rubric); margin-bottom: 2px; }
.read-chart-cap span { font-weight: 500; color: var(--ink-faint); }
.read-chart-svg { display: block; width: 100%; height: auto; }
.read-chart-grid { stroke: var(--ink-ghost); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.55; }
.read-chart-axis { stroke: var(--paper-edge); stroke-width: 1; }
.read-chart-area { fill: var(--gold); opacity: 0.16; }
.read-chart-line { fill: none; stroke: var(--rubric); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.read-chart-yl, .read-chart-xl { fill: var(--ink-faint); font-size: 10px; font-weight: 600; }
/* ── 설교 예약 듣기(알람) — 상세의 '읽음' 옆 버튼 + 예약 모달 ── */
.focus-tools-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.focus-tools-row .read-receipt { margin: 4px 0; }
.sermon-alarm { display: inline-flex; }
.sermon-alarm-open {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  background: none; border: 1px solid rgba(52, 40, 26, 0.22); border-radius: 999px;
  padding: 4px 12px; font-size: 13px; color: var(--ink-soft);
}
.sermon-alarm-open:hover { color: var(--rubric); border-color: var(--rubric); }
.sermon-alarm-modal { max-width: 400px; }
.sermon-alarm-target { font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 2px 0 6px; }
.sermon-alarm-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0 0 12px; }
.sermon-alarm-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sermon-alarm-time {
  font: inherit; font-size: 16px; padding: 6px 10px; border-radius: 10px;
  border: 1px solid rgba(52, 40, 26, 0.28); background: rgba(255, 252, 244, 0.9); color: var(--ink);
}
.sermon-alarm-repeat {
  cursor: pointer; background: none; border: 1px solid rgba(52, 40, 26, 0.22);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--ink-faint);
}
.sermon-alarm-repeat.on { color: var(--rubric); border-color: var(--rubric); background: rgba(154, 68, 36, 0.08); font-weight: 600; }
.sermon-alarm-save { flex: 1 1 auto; min-width: 150px; }
.sermon-alarm-msg { font-size: 12.5px; color: var(--rubric); margin: 10px 0 0; line-height: 1.5; }
.sermon-alarm-list-head { margin: 16px 0 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-faint); letter-spacing: .02em; }
.sermon-alarm-list { display: flex; flex-direction: column; }
.sermon-alarm-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(52, 40, 26, 0.08); }
.sermon-alarm-when { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--rubric); }
.sermon-alarm-title { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sermon-alarm-note { font-size: 11.5px; color: var(--ink-faint); margin: 12px 0 0; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .presence-dot { animation: none; } .presence-av-btn:hover .presence-av { transform: none; } }

/* ── 나의 신앙 발자취 ── */
.faith-journey {
  margin: 16px 0 14px;
  padding: 18px 20px;
  border: 1px solid rgba(154, 68, 36, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(154, 68, 36, 0.12), rgba(248, 238, 210, 0.5));
  display: grid;
  gap: 14px;
}
.fj-head { display: grid; gap: 5px; }
.fj-title {
  font-family: var(--font-display, var(--font-body));
  font-size: clamp(18px, 3.4vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--rubric-deep, #9a3118);
  margin: 0;
}
.fj-milestone {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0;
}
/* 최근 90일 발자취 — 잔잔한 점. 빈 날은 옅게, 함께한 날만 금빛. 죄책감 없이 흐름만. */
.fj-grid {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  gap: 5px;
}
.fj-dot {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(154, 68, 36, 0.1);
  border: 1px solid rgba(154, 68, 36, 0.12);
}
.fj-dot.on {
  background: var(--rubric-deep, #9a3118);
  border-color: var(--rubric-deep, #9a3118);
  opacity: 0.85;
}
.fj-dot.today {
  outline: 2px solid rgba(154, 68, 36, 0.5);
  outline-offset: 1px;
}
.fj-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.fj-streak {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
}
.fj-share-btn {
  margin-left: auto;
  font-size: 14px;
}
@media (max-width: 460px) {
  .fj-grid { grid-template-columns: repeat(15, 1fr); }
}
.personal-stat {
  padding: 12px 14px;
  border: 1px solid var(--ink-ghost);
  border-radius: 11px;
  background: rgba(248, 238, 210, 0.42);
  box-shadow: 0 6px 18px rgba(70, 44, 18, 0.05);
}
.personal-stat.primary {
  border-color: rgba(154, 68, 36, 0.34);
  background: linear-gradient(145deg, rgba(154, 68, 36, 0.13), rgba(248, 238, 210, 0.58));
}
.personal-stat-label {
  display: block;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.personal-stat strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--rubric-deep);
  word-break: keep-all;
}
.personal-stat em {
  display: block;
  margin-top: 5px;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--ink-soft);
}
/* 이번 주 들은 시간 — 카드 안 요일별 미니 막대 그래프(월~일) */
.personal-stat-week strong { margin-bottom: 9px; }
.week-graph { margin-top: 2px; }
.week-graph-bars { display: flex; align-items: flex-end; gap: 5px; height: 40px; }
.week-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; height: 100%; }
.week-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.week-bar-fill { display: block; width: 100%; max-width: 12px; min-height: 2px; background: var(--gold-soft, #c0a25e); border-radius: 3px 3px 1px 1px; }
.week-bar-col.is-today .week-bar-fill { background: var(--rubric, #9a4424); }
.week-bar-empty { display: block; width: 100%; max-width: 12px; height: 100%; border: 1px dashed rgba(52, 40, 26, 0.20); border-radius: 3px; box-sizing: border-box; }
.week-bar-dow { margin-top: 5px; font-family: var(--font-label); font-size: 10px; color: var(--ink-faint); line-height: 1; }
.week-bar-col.is-today .week-bar-dow { color: var(--rubric, #9a4424); font-weight: 700; }
.week-bar-col.is-future .week-bar-dow { color: var(--ink-ghost); }

/* 더보기/접기 버튼 (최근 재생·메모) */
.personal-more {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--ink-soft);
  background: rgba(248, 238, 210, 0.5);
  border: 1px solid var(--ink-ghost);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.personal-more:hover {
  color: var(--rubric-deep);
  border-color: rgba(154, 68, 36, 0.45);
  background: rgba(250, 242, 218, 0.7);
}
.personal-section {
  margin-top: clamp(30px, 5vh, 44px);
}
.personal-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-ghost);
}
.personal-section-head .home-more { flex-shrink: 0; }

/* 접이식 섹션 — 섹션이 많아 길어지는 나의 말씀을 헤더 클릭으로 펼치고 접는다 */
.personal-section-collapsible { margin-top: clamp(18px, 3vh, 26px); }
/* 접이식 헤더는 좁은 화면(모바일 media query의 flex-direction:column)에서도 항상 가로 배치 — 제목 왼쪽·꺾쇠 오른쪽 */
.personal-section-collapsible .personal-section-head { flex-direction: row; align-items: center; padding-bottom: 0; border-bottom: none; gap: 10px; }
.personal-section-collapsible.is-open .personal-section-head { padding-bottom: 12px; border-bottom: 1px solid var(--ink-ghost); }
.personal-section-toggle {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: none; padding: 8px 0; cursor: pointer; text-align: left;
}
.personal-section-titles { min-width: 0; }
.personal-section-toggle h3 { display: inline-flex; align-items: baseline; gap: 8px; }
.personal-section-count {
  font-family: var(--font-label); font-size: 12px; font-weight: 700; color: var(--rubric, #9a4424);
  background: rgba(154, 68, 36, 0.10); border-radius: 999px; padding: 1px 9px; letter-spacing: .02em;
}
.personal-section-caret { flex-shrink: 0; font-size: 13px; color: var(--ink-faint); transition: color .12s ease; }
.personal-section-toggle:hover .personal-section-caret { color: var(--rubric, #9a4424); }
.personal-section-action { flex-shrink: 0; }
/* 빈 섹션 — 채워진 섹션이 먼저 눈에 들어오도록 흐리게 눌러 두고 간격도 좁힌다.
   펼치는 것은 막지 않는다(빈 본문에 사용법·'설교 보러가기'가 있다) — 포커스·hover 시엔 또렷하게 되돌린다. */
.personal-section-collapsible.is-empty { margin-top: clamp(12px, 2vh, 18px); opacity: .6; transition: opacity .12s ease; }
.personal-section-collapsible.is-empty:hover,
.personal-section-collapsible.is-empty:focus-within,
.personal-section-collapsible.is-empty.is-open { opacity: 1; }
/* 좁은 화면에서 안내가 큰 제목 옆에 안 들어가면 아랫줄로 내려간다(잘리지 않게) */
.personal-section-collapsible.is-empty .personal-section-toggle { flex-wrap: wrap; }
.personal-section-emptyhint {
  font-size: 12.5px; color: var(--ink-faint); text-align: right; margin-left: auto;
  font-family: var(--font-label); letter-spacing: .01em;
}
.personal-section-body { animation: kc-sec-in .18s ease; }
@keyframes kc-sec-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .personal-section-body { animation: none; } }
.alarm-hist-item .personal-item-meta { color: var(--rubric, #9a4424); font-weight: 600; }

/* 로그인됨 — 계정 카드 */
.personal-account {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--ink-ghost);
  border-radius: 12px;
  background: rgba(250, 243, 222, 0.55);
}
.personal-account--kakao {
  border-color: rgba(57, 38, 0, 0.20);
  background:
    linear-gradient(135deg, rgba(254, 229, 0, 0.74), rgba(255, 245, 181, 0.46) 48%, rgba(250, 243, 222, 0.64)),
    rgba(250, 243, 222, 0.55);
  box-shadow: 0 12px 28px rgba(57, 38, 0, 0.08);
}
.personal-account--kakao::after {
  content: "KAKAO";
  position: absolute;
  right: 12px;
  top: 8px;
  font-family: var(--font-body);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: rgba(57, 38, 0, 0.055);
  pointer-events: none;
}
.personal-account-main { display: flex; gap: 12px; align-items: flex-start; position: relative; z-index: 1; }
/* 프로필 사진 끌어다 놓기 — 계정 카드 위로 이미지를 놓으면 프로필 사진이 바뀐다 */
.personal-account.dragover { box-shadow: inset 0 0 0 3px var(--rubric); }
.personal-account.dragover::before {
  content: "📷 여기에 놓으면 프로필 사진이 바뀝니다";
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  padding: 8px; text-align: center;
  background: rgba(154, 68, 36, 0.18);
  color: var(--rubric); font-weight: 800; font-size: 14px;
  pointer-events: none;
}
.personal-account-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(154, 68, 36, 0.12);
  color: var(--rubric-deep, #9a3118);
}
.personal-account--kakao .personal-account-badge {
  width: 46px;
  height: 46px;
  background: #191600;
  color: #FEE500;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 18px rgba(25, 22, 0, 0.16);
}
.personal-account-avatar {
  object-fit: cover;
  background: rgba(255, 252, 244, 0.88);
}
.personal-account-text { display: grid; gap: 3px; min-width: 0; }
.personal-account-text .personal-account-provider {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 250, 236, 0.58);
  color: var(--rubric-deep, #7c2f12);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.personal-account--kakao .personal-account-text .personal-account-provider {
  background: rgba(25, 22, 0, 0.88);
  color: #FEE500;
}
.personal-account-text strong {
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.personal-account--kakao .personal-account-text strong { color: #241f00; }
.personal-account-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.personal-account-name span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.personal-account-name-btn {
  flex-shrink: 0;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--rubric-deep, #7c2f12);
  background: rgba(255, 250, 236, 0.52);
  border: 1px solid rgba(52, 40, 26, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  cursor: pointer;
}
.personal-account-name-btn:disabled { opacity: 0.55; cursor: default; }
.personal-account-avatar-actions { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.personal-account-name-edit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.personal-account-name-input {
  width: min(190px, 100%);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(52, 40, 26, 0.28);
  border-radius: 9px;
  color: var(--ink);
  background: #fffdf7;
}
.personal-account-name-input:focus { outline: none; border-color: var(--rubric); }
.personal-account-name-save,
.personal-account-name-cancel {
  font-family: var(--font-label);
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 9px;
  cursor: pointer;
}
.personal-account-name-save {
  background: var(--rubric);
  color: #f6efdd;
  border: 1px solid var(--rubric);
}
.personal-account-name-cancel {
  background: rgba(255, 250, 236, 0.4);
  color: var(--ink-faint);
  border: 1px solid rgba(52, 40, 26, 0.2);
}
.personal-account-name-save:disabled,
.personal-account-name-cancel:disabled {
  opacity: 0.55;
  cursor: default;
}
.personal-account-text span {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  word-break: keep-all;
}
.personal-account-text .personal-account-name span {
  font-size: 15.5px;
  line-height: 1.3;
  color: inherit;
}
.personal-account-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 90, 50, 0.14);
}
.personal-account-sync {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--rubric-deep, #9a3118);
}
.personal-logout { flex-shrink: 0; }

/* 비로그인 — 나의 말씀 로그인 게이트 */
.personal-login-gate {
  margin: clamp(24px, 5vh, 48px) auto 0;
  max-width: 460px;
  text-align: center;
  padding: 30px 22px;
  border: 1px solid var(--ink-ghost);
  border-radius: 16px;
  background: rgba(250, 243, 222, 0.55);
}
.personal-gate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(154, 68, 36, 0.1);
  color: var(--rubric-deep, #9a3118);
  margin-bottom: 12px;
}
.personal-login-gate h3 {
  font-family: var(--font-display, var(--font-body));
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 8px;
}
.personal-login-gate > p {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 auto 16px;
  max-width: 380px;
  word-break: keep-all;
}
.personal-gate-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
  padding: 15px 20px;
  font-size: 16px;
}
.personal-gate-hint {
  margin: 16px 0 0 !important;
  font-size: 12.5px !important;
  color: var(--ink-soft);
  opacity: 0.85;
}
.ap-memo-login { text-align: center; padding: 6px 4px 2px; }
.ap-memo-login p {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 10px;
  word-break: keep-all;
}
.personal-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.personal-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(52, 40, 26, 0.12);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.42);
  transition: border-color 0.2s, background 0.2s;
}
.personal-item-clickable {
  cursor: pointer;
}
.personal-item-clickable:hover {
  border-color: rgba(154, 68, 36, 0.26);
  background: rgba(255, 250, 236, 0.58);
}
.personal-item-main {
  min-width: 0;
  flex: 1 1 auto;
}
.personal-item-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.personal-item-side .personal-progress {
  margin-top: 0;
  white-space: nowrap;
}
.personal-item-meta,
.personal-progress {
  display: inline-flex;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}
.personal-item h4 {
  margin: 3px 0 2px;
  font-family: var(--font-book);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.28;
}
.personal-title-link {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.personal-title-link span {
  margin-left: 4px;
  color: var(--rubric);
  opacity: 0.55;
}
.personal-title-link:hover {
  color: var(--rubric-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(154, 68, 36, 0.42);
}
.personal-title-link:hover span { opacity: 1; }
.personal-item p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.personal-progress {
  margin-top: 5px;
  color: var(--rubric);
}
/* ⚙️ 설정·계정 — 콘텐츠와 분리해 하단에 접어 둔다(기본 접힘) */
.personal-settings-group {
  margin-top: clamp(20px, 4vh, 34px);
  border-top: 1px solid rgba(166, 134, 63, 0.28);
  padding-top: 6px;
}
.personal-settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.personal-settings-toggle-title {
  font-family: var(--font-book);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.personal-settings-sub {
  margin-left: auto;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.personal-settings-caret { color: var(--gold); font-size: 13px; }
.personal-settings-toggle:hover .personal-settings-toggle-title { color: var(--rubric-deep); }
.personal-settings-body { margin-top: 4px; }
.personal-memo-list {
  margin-bottom: clamp(22px, 4vh, 36px);
}
.personal-memo-item {
  align-items: flex-start;
}
.personal-memo-group {
  align-items: flex-start;
}
.personal-memo-text {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 3px solid rgba(47, 93, 74, 0.38);
  background: rgba(47, 93, 74, 0.07);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.personal-memo-time {
  flex-shrink: 0;
}
.personal-memo-stack {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.personal-memo-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.personal-memo-time.inline {
  align-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 66px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(47, 93, 74, 0.22);
  border-radius: 999px;
  color: #245440;
  background: rgba(47, 93, 74, 0.08);
  font-family: var(--font-body);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.personal-memo-time.inline:hover {
  border-color: rgba(47, 93, 74, 0.42);
  color: #183c2d;
  background: rgba(47, 93, 74, 0.14);
}
.personal-memo-time.inline:focus-visible {
  outline: 2px solid rgba(47, 93, 74, 0.35);
  outline-offset: 2px;
}
.personal-memo-line .personal-memo-text {
  margin: 0;
}
.memo-caret {
  color: var(--ink-faint);
  font-size: 11px;
  margin-right: 4px;
}
.personal-memo-group.is-collapsed { cursor: pointer; }
.personal-memo-count {
  align-self: start;
  border: 1px solid rgba(138, 49, 24, 0.2);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--rubric);
  background: rgba(255, 250, 235, 0.7);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.personal-backup {
  margin-top: clamp(22px, 4vh, 36px);
}
.personal-backup-desc {
  margin: 12px 0 10px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}
.personal-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
/* 카카오 로그인 버튼 (브랜드 노랑) */
.s-btn.personal-kakao-btn {
  background: #FEE500;
  border-color: #FEE500;
  color: #191600;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.s-btn.personal-kakao-btn:hover {
  background: #ffe000;
  border-color: #ffe000;
  color: #191600;
}
.personal-sync-code-adv { margin-top: 14px; }
.s-btn.ghost {
  background: rgba(255, 250, 236, 0.42);
}
.s-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.personal-backup-code {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  padding: 12px;
  border: 1px solid rgba(52, 40, 26, 0.2);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.48);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.personal-backup-code:focus {
  outline: none;
  border-color: rgba(138, 49, 24, 0.58);
  box-shadow: 0 0 0 3px rgba(138, 49, 24, 0.1);
}
.personal-backup-status {
  margin: 8px 0 0;
  color: var(--rubric);
  font-size: 13px;
}
.personal-sync-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 8px;
}
.personal-sync-code {
  flex: 1 1 220px;
  padding: 10px 14px;
  border: 1px solid rgba(138, 49, 24, 0.32);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.6);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 17px;
  letter-spacing: 0.12em;
  text-align: center;
  user-select: all;
}
.personal-sync-warn {
  margin: 10px 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: rgba(138, 49, 24, 0.07);
  color: var(--rubric);
  font-size: 12.5px;
  line-height: 1.6;
}
.personal-sync-link {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(52, 40, 26, 0.2);
}
.personal-sync-link-label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 13px;
}
.personal-sync-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.personal-sync-input {
  flex: 1 1 200px;
  padding: 10px 12px;
  border: 1px solid rgba(52, 40, 26, 0.2);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.48);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.personal-sync-input:focus {
  outline: none;
  border-color: rgba(138, 49, 24, 0.58);
  box-shadow: 0 0 0 3px rgba(138, 49, 24, 0.1);
}
/* 오프라인 백업 — 접힌 고급 옵션 */
.personal-backup-advanced {
  margin-top: 4px;
}
.personal-backup-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}
.personal-backup-advanced > summary::-webkit-details-marker {
  display: none;
}
.personal-backup-advanced > summary::before {
  content: "▸";
  margin-right: 6px;
  color: var(--rubric);
  transition: transform 0.15s ease;
  display: inline-block;
}
.personal-backup-advanced[open] > summary::before {
  transform: rotate(90deg);
}
.personal-backup-summary > span:first-child {
  flex: 1;
}
.personal-backup-summary-hint {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--rubric);
  background: rgba(138, 49, 24, 0.08);
  padding: 2px 8px;
  border-radius: 999px;
}
.personal-empty {
  margin-top: 14px;
  padding: 26px 18px;
  text-align: center;
  border: 1px dashed rgba(52, 40, 26, 0.22);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.28);
}
.personal-empty p {
  margin: 0 0 12px;
  color: var(--ink-soft);
}
.personal-sync-note {
  display: flex;
  gap: 10px 14px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid rgba(154, 68, 36, 0.45);
  background: rgba(154, 68, 36, 0.08);
  font-family: var(--font-body);
  color: var(--ink-soft);
}
.personal-sync-note strong {
  color: var(--rubric-deep);
}
@media (max-width: 460px) {
  .personal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .personal-stat.primary { grid-column: 1 / -1; }
  /* '총 들은 시간·오늘 들은 시간'은 좁은 화면에서도 2열 유지(주간 카드만 전체 폭) */
  .personal-stats-2 .personal-stat.primary { grid-column: auto; }
}

/* ── 공유 링크(?s=)로 진입한 설교 — 포커스 카드 ── */
/* 공유된 설교 = 설교 리스트와 동일한 틀(feed-shell 폭) + feed-head 톤 헤더 */
.sermon-focus { scroll-margin-top: 14px; }  /* 상세 진입 시 스크롤 멈춤 위치에 약간 여백 */
.focus-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 4px 14px;
  border-bottom: 1px solid rgba(52, 40, 26, 0.18);
}
.focus-head h2 {
  font-family: var(--font-book);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
  margin: 0;
}
.focus-head .home-more { flex-shrink: 0; }
.focus-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.focus-missing p { margin: 0; }
.focus-missing .home-more { margin-left: 0; }

/* ── 설교 댓글(상세 페이지 하단) ── */
.comments {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(52, 40, 26, 0.16);
}
.comments-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}
.comments-head h3 {
  font-family: var(--font-book);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.comments-head h3 em {
  font-style: normal;
  color: var(--rubric);
  font-size: 0.8em;
}
/* 작성 폼 */
.comment-form {
  margin-bottom: 20px;
}
/* 댓글 이미지 끌어다 놓기 — 작성 영역 위로 이미지를 놓으면 첨부된다 */
.comment-form.dragover { position: relative; }
.comment-form.dragover::before {
  content: "🖼 여기에 놓으면 사진이 첨부됩니다";
  position: absolute; inset: -4px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--rubric); border-radius: 10px;
  background: rgba(154, 68, 36, 0.14);
  color: var(--rubric); font-weight: 800; font-size: 14px;
  pointer-events: none;
}
/* 파일 선택 버튼 옆 상시 드롭 안내 — '끌어다 놓기도 됨'을 미리 알린다.
   드래그 시작 전엔 안내가 없어 파일선택 버튼만 보이던 문제 해소. 터치 기기(모바일)에선
   드래그앤드랍이 무의미하므로 숨기고, 마우스 환경에서만 배지로 노출한다. */
.drop-hint-inline { display: none; }
@media (hover: hover) and (pointer: fine) {
  .drop-hint-inline {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--font-label); font-size: 11.5px; font-weight: 700;
    color: var(--rubric); line-height: 1.4; white-space: nowrap;
    padding: 3px 9px; border-radius: 999px;
    border: 1px dashed rgba(154, 68, 36, 0.5);
    background: rgba(154, 68, 36, 0.06);
  }
  .drop-hint-inline::before { content: "⬇"; font-size: 12px; }
}
/* 작성자(내 표시이름) + 이름 수정 */
.comment-as {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.comment-as strong { color: var(--ink); font-weight: 600; }
.comment-input {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 72px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: rgba(255, 252, 244, 0.7);
  border: 1px solid rgba(52, 40, 26, 0.2);
  border-radius: 12px;
}
.comment-input:focus {
  outline: none;
  border-color: var(--rubric);
  background: #fffdf7;
}
.comment-form-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.comment-count-hint {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--ink-faint);
  margin-right: auto;       /* 등록 버튼을 오른쪽으로 밀어냄 */
}
.comment-photo { flex-shrink: 0; }
.comment-photo .glyph { font-size: 13px; }
.comment-submit { flex-shrink: 0; }
.comment-submit:disabled, .comment-photo:disabled { opacity: 0.5; cursor: default; }
/* 첨부 이미지 미리보기 */
.comment-attach {
  position: relative;
  display: inline-block;
  margin-top: 10px;
}
.comment-attach-img {
  max-width: min(280px, 100%);
  max-height: 220px;
  border-radius: 10px;
  border: 1px solid rgba(52, 40, 26, 0.18);
  display: block;
}
.comment-attach-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(20, 14, 6, 0.7);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.comment-attach-remove:hover { background: rgba(20, 14, 6, 0.9); }
.comment-err {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--rubric-deep);
}
/* 비로그인 안내 */
.comment-login {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 16px 18px;
  background: rgba(248, 238, 210, 0.5);
  border: 1px solid rgba(52, 40, 26, 0.14);
  border-radius: 14px;
}
.comment-login p { margin: 0; font-size: 14.5px; color: var(--ink); }
.comment-kakao {
  background: #fee500 !important;
  color: #191600 !important;
  border-color: #f2d900 !important;
  font-weight: 600;
}
.comment-kakao:hover { background: #ffec3d !important; }
/* 목록 */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.comment-empty {
  font-size: 14px;
  color: var(--ink-faint);
  padding: 10px 0;
}
.comment-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 2px;
  border-bottom: 1px solid rgba(52, 40, 26, 0.1);
}
.comment-body { flex: 1; min-width: 0; }
/* 작성자 아바타(사진 또는 이니셜) */
.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--paper-2);
}
.comment-avatar-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #f6efdd;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1;
  user-select: none;
}
.comment-as .comment-avatar { width: 30px; height: 30px; }
.comment-as .comment-avatar-initial { font-size: 14px; }
.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.comment-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.comment-time {
  font-family: var(--font-label);
  font-size: 11.5px;
  color: var(--ink-faint);
}
.comment-del {
  margin-left: auto;
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--ink-faint);
  background: none;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
}
.comment-del:hover { color: var(--rubric-deep); text-decoration: underline; }
/* 내 댓글 수정 버튼·입력 */
.comment-edit-btn { font-family: var(--font-label); font-size: 12px; color: var(--ink-faint); background: none; border: 0; padding: 2px 4px; cursor: pointer; }
.comment-edit-btn:hover { color: var(--rubric-deep); text-decoration: underline; }
.comment-edit { margin-top: 5px; }
.comment-edit-input { width: 100%; box-sizing: border-box; resize: vertical; min-height: 62px; padding: 8px 10px; border: 1px solid var(--line, rgba(52,40,26,.2)); border-radius: 8px; font-family: var(--font-body); font-size: 14px; line-height: 1.5; background: var(--paper, #fff); color: var(--ink); }
.comment-edit-acts { display: flex; gap: 8px; margin-top: 6px; }
.comment-edited { font-size: 11px; color: var(--ink-faint); }
.comment-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment-img {
  margin-top: 10px;
  max-width: min(360px, 100%);
  max-height: 360px;
  border-radius: 10px;
  border: 1px solid rgba(52, 40, 26, 0.14);
  object-fit: cover;
  display: block;
}
/* 댓글 공감(좋아요) — 월간 '댓글 장원' 시상 기반 */
.comment-foot { margin-top: 9px; }
.comment-like {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 11px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.comment-like:hover { border-color: rgba(154, 68, 36, 0.4); color: var(--rubric); }
.comment-like.liked {
  color: var(--rubric);
  border-color: rgba(154, 68, 36, 0.5);
  background: rgba(154, 68, 36, 0.07);
}
.comment-like .comment-like-heart { font-size: 14px; line-height: 1; }
.comment-like-n { font-variant-numeric: tabular-nums; font-weight: 600; }
/* 본인 댓글 — 받은 공감 표시(클릭 불가) */
.comment-like.is-mine { cursor: default; border-style: dashed; color: var(--rubric); border-color: rgba(154, 68, 36, 0.35); background: transparent; }
/* 댓글 관리(가리기) — 삭제/가리기 버튼을 오른쪽에 모은다 */
.comment-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.comment-actions .comment-del { margin-left: 0; }
.comment-mod {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  color: var(--rubric-deep, #9a3118);
  background: none;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
}
.comment-mod:hover { text-decoration: underline; }
.comment-hidden-badge {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  color: var(--rubric-deep, #9a3118);
  border: 1px solid var(--rubric-deep, #9a3118);
  border-radius: 6px;
  padding: 0 5px;
}
/* 모더레이터가 보는 가려진 댓글(내용 유지, 가려졌음을 표시) */
.comment-hidden-mod { opacity: 0.74; }
.comment-hidden-mod .comment-text { color: var(--ink-soft); }
/* 일반 사용자가 보는 가려진 댓글 — 자리표시만 */
.comment-hidden-av { background: rgba(52, 40, 26, 0.12); color: var(--ink-faint); }
.comment-hidden-text { color: var(--ink-faint); font-style: italic; font-size: 14px; }
@media (max-width: 560px) {
  .comment-input { font-size: 16px; }  /* iOS 자동 확대 방지 */
  .comment-form-foot { flex-wrap: wrap; }
  .comment-img { max-width: 100%; }
}

/* 홈 최근설교 — 텍스트 + 생성형 썸네일(오른쪽) */
.home-sermon {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}
.home-sermon-main { flex: 1 1 auto; min-width: 0; }
.sermon-thumb {
  flex: 0 0 auto;
  width: clamp(104px, 24vw, 172px);
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid var(--paper-edge);
  border-radius: 9px;
  background:
    radial-gradient(120% 92% at 50% 0%, rgba(255, 250, 235, 0.7), transparent 70%),
    linear-gradient(150deg, #efe6cf, #e2d3b0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 14px rgba(70, 44, 18, 0.1);
  overflow: hidden;
}
.thumb-mark { color: var(--rubric); font-size: 12px; opacity: 0.85; line-height: 1; }
.thumb-passage {
  font-family: var(--font-label);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--rubric-deep);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thumb-title {
  font-family: var(--font-book);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.thumb-preacher {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.s-views,
.s-comments {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
/* 설교 카드 청취 상태 행 — 바이라인 아래 전용 행(완청 체크 / 듣던 위치 게이지).
   조회수 옆 인라인은 좁고 작아 보여 행으로 분리(내 시리즈 진행바와 같은 비주얼 톤). */
.sermon .s-listen {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 7px;
}
.s-listened-done {
  color: var(--gold);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.s-listened-part {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.s-listen-track {
  flex: 0 1 240px;
  height: 5px;
  background: rgba(166, 134, 63, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.s-listen-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: 999px;
}
.s-listen-time {
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--rubric);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* 상세 카드 수동 완청 토글 — 자동으로 안 잡히는 설교(봉헌 찬양 꼬리 등)를 직접 완청/해제 */
.s-listen-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 11px;
  border: 1px solid rgba(166, 134, 63, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.s-listen-toggle:hover { background: rgba(166, 134, 63, 0.1); }
.s-listen-toggle.done {
  border-color: var(--gold);
  background: rgba(166, 134, 63, 0.14);
  color: var(--gold);
  font-weight: 700;
}
/* 모바일: 썸네일이 카드 텍스트를 밀어내 어색하므로 숨김(텍스트 카드만 깔끔하게).
   데스크탑·태블릿(>640px)에서는 오른쪽 썸네일 유지. */
@media (max-width: 640px) {
  .home-sermon .sermon-thumb { display: none; }
}
.materials-folder {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 4px 0 16px;
}
.materials-folder-note {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
/* 소개 탭 세그먼트(담임목사 소개 / 소그룹 교재) 전환 시, 섹션 헤더를 없앤 대신
   feed-head 아래 콘텐츠(목사 카드·교재 폴더)에 숨 쉴 공간을 준다. */
.materials-shell .feed-head { margin-bottom: 16px; }

/* 표지 썸네일 카드(강해 자료 + 소그룹 교재 공통) — 표지 썸네일(좌) + 본문(우) 가로 레이아웃.
   .material-card 기본(테두리·패딩·그림자)을 상속하고, 그 안을 flex 로 나눈다.
   표지 폭은 화면 폭에 따라 유동(clamp) — 모바일에서 세로형 교재 표지가 과도하게 커지지
   않게 작게, PC 에선 최대 180px. 좁아져도 세워 쌓지 않고 가로 썸네일을 유지해 목록을 촘촘히 본다. */
.expo-card { display: flex; gap: 16px; align-items: flex-start; }
/* 소그룹 교재(표지 있음): article 은 그대로(block) 두고 요약부(머리·설명·액션)만 가로 분할한다.
   커리큘럼(.material-outline-body)은 이 flex 밖에서 표지 아래 전체 폭을 쓴다(좁은 칸에 갇히지 않게). */
.material-top { display: flex; gap: 16px; align-items: flex-start; }
/* 표지는 버튼 — 누르면 원본을 전체화면 라이트박스로(이미지 뷰어 재사용).
   폭은 clamp(모바일 100px ~ PC 180px, 대략 화면의 26%). */
.expo-cover, .material-cover {
  flex: 0 0 auto; width: clamp(100px, 26vw, 180px);
  display: block; padding: 0; border: 0; background: transparent;
  cursor: zoom-in; border-radius: 6px;
}
.expo-cover:focus-visible, .material-cover:focus-visible { outline: 2px solid rgba(35, 79, 169, 0.75); outline-offset: 4px; }
.expo-cover img, .material-cover img {
  display: block; width: 100%; height: auto;
  border-radius: 6px;
  border: 1px solid rgba(52, 40, 26, 0.18);
  box-shadow: 0 4px 14px rgba(70, 44, 18, 0.14);
  background: rgba(248, 238, 210, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.expo-cover:hover img, .material-cover:hover img { transform: translateY(-2px) scale(1.02); box-shadow: 0 10px 24px rgba(70, 44, 18, 0.2); }
/* 표지 규격 통일(849×1200 세로형, 강해 자료·교재 공통) — 로드 전 자리를 미리 잡아 목록 스크롤 밀림(CLS)을
   막는다. 규격과 다른 비율의 이미지가 올라와도 늘어나지(왜곡되지) 않게 object-fit: cover 로 채운다
   (원본 전체는 표지를 눌러 라이트박스에서 그대로 볼 수 있다). */
.expo-cover img, .material-cover img { aspect-ratio: 849 / 1200; object-fit: cover; }
.expo-body, .material-body { flex: 1 1 auto; min-width: 0; }
/* 표지 옆 좁은 본문에선 머리 배지를 제목 '위'로(세로 배치) — 긴 제목이 배지 옆 좁은 칸에서
   짓눌리지 않고 본문 전체 폭을 쓰게 한다(강해 자료·표지 있는 교재 공통). */
.expo-body .material-head, .material-body .material-head { flex-direction: column; align-items: flex-start; gap: 6px; }
.expo-card.expo-nocover { display: block; }   /* 표지 없으면 일반 카드처럼 */
/* 성경책/주제 배지 — 교재 코드(적갈색)와 구분되게 초록 계열. .material-code 형태 상속. */
.expo-subject {
  min-width: 0; padding: 4px 10px; font-size: 12px; letter-spacing: 0.08em;
  color: #245440; background: rgba(47, 93, 74, 0.1); border-color: rgba(47, 93, 74, 0.28);
}
.expo-year {
  display: inline-block; margin-top: 6px;
  font-family: var(--font-label); font-size: 11px; letter-spacing: 0.1em;
  color: var(--ink-faint);
}
@media (max-width: 480px) {
  /* 모바일에선 표지·본문 사이 간격만 줄인다(가로 유지 — 세로형 표지가 폭 100%로 커지는 것 방지). */
  .expo-card, .material-top { gap: 12px; }
}

/* ── 성경 읽기 (KJV) ── */
.bible-shell {
  width: min(820px, calc(100vw - 34px));
  margin: 0 auto clamp(44px, 8vh, 88px);
  position: relative;
  z-index: 4;
}
/* ── 성경 구절 검색 ── 책 목록 위 검색창 + 결과 목록 ── */
.bible-searchwrap { display: flex; justify-content: center; margin: 4px 0 18px; }
.search.bible-search { width: 100%; }
.bible-search-results { margin-top: 4px; }
.bible-search-note {
  margin: 10px 2px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  word-break: keep-all;
}
.bible-search-count {
  margin: 4px 2px 12px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--rubric);
}
.bible-hit-list { display: flex; flex-direction: column; gap: 8px; }
.bible-hit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 11px 14px;
  text-align: left;
  border: 1px solid var(--ink-ghost);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.45);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.bible-hit:hover { border-color: var(--rubric); background: rgba(154, 68, 36, 0.06); }
.bible-hit:active { transform: translateY(1px); }
.bible-hit-ref {
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--rubric);
}
.bible-hit-text {
  font-family: var(--font-book);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  word-break: keep-all;
}
.bible-hit-mark {
  background: rgba(199, 154, 51, 0.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
/* 주제로 찾기 — 대표 본문(주제 사전)과 우리 교회 설교 본문 */
.bible-topic-block { margin: 0 0 20px; }
.bible-topic-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 2px 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-ghost);
}
.bible-topic-head strong { font-family: var(--font-book); font-size: 16px; color: var(--ink); font-weight: 600; }
.bible-topic-badge {
  font-family: var(--font-label);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--rubric-deep, #9a3118);
  color: #fff;
  white-space: nowrap;
}
.bible-topic-badge.church { background: #2f6db0; }
.bible-topic-desc { font-family: var(--font-body); font-size: 12.5px; color: var(--ink-faint); word-break: keep-all; }
.bible-topic-hit .bible-hit-text { font-family: var(--font-body); font-size: 13.5px; color: var(--ink-soft); }
.bible-topic-hit .bible-hit-ref { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.bible-topic-count {
  font-family: var(--font-label);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid var(--ink-ghost);
  color: var(--ink-faint);
}

/* 참조 바로가기('요 3:16')는 결과 맨 위에서 한 번에 눈에 띄게 */
.bible-hit-jump { border-color: var(--rubric); background: rgba(154, 68, 36, 0.07); margin-bottom: 12px; }
.bible-hit-jump .bible-hit-text { font-family: var(--font-label); font-size: 13px; letter-spacing: 0.04em; color: var(--rubric); }

.bible-group { margin-top: 18px; }
.bible-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.bible-book-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--ink-ghost);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.45);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.bible-book-btn:hover { border-color: var(--rubric); background: rgba(154, 68, 36, 0.06); }
.bible-book-btn:active { transform: translateY(1px); }
.bible-book-ko { font-family: var(--font-book); font-size: 15px; color: var(--ink); }
.bible-book-en { font-family: var(--font-label); font-size: 10.5px; letter-spacing: 0.04em; color: var(--ink-faint); }
.bible-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 6px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-ghost);
}
.bible-nav .bible-title { flex: 1 1 auto; }
.bible-nav .s-btn { flex-shrink: 0; }
.bible-version {
  display: inline-flex;
  margin-left: auto;
  flex-shrink: 0;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  overflow: hidden;
  background: rgba(255, 250, 236, 0.5);
}
.bible-version-btn {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 6px 11px;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.bible-version-btn.active { background: var(--rubric-deep, #9a3118); color: #fff; }
.bible-notice {
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ink-ghost);
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-faint);
  word-break: keep-all;
}
.bible-title { margin: 0; font-family: var(--font-display); font-size: clamp(20px, 3vw, 28px); color: var(--ink); }
.bible-title-en { font-family: var(--font-label); font-size: 13px; color: var(--ink-faint); letter-spacing: 0.04em; }
.bible-loading { font-family: var(--font-body); color: var(--ink-soft); padding: 12px 2px; }
.bible-chapters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
}
.bible-chapter-btn {
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-book);
  font-size: 16px;
  color: var(--ink);
  border: 1px solid var(--ink-ghost);
  border-radius: 9px;
  background: rgba(255, 250, 236, 0.45);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.bible-chapter-btn:hover { border-color: var(--rubric); color: var(--rubric-deep); background: rgba(154, 68, 36, 0.06); }
.bible-text { margin: 4px 0 8px; }
.bible-verse {
  display: flex;
  gap: 8px;
  margin: 0 0 9px;
  font-family: var(--font-book, var(--font-body));
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink);
}
.bible-vnum {
  flex-shrink: 0;
  min-width: 22px;
  text-align: right;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  color: var(--rubric);
  padding-top: 5px;
}
.bible-vtext { word-break: keep-all; }

/* 구절 카드용 — 절 선택 */
.bible-select-hint {
  margin: 0 0 10px;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}
/* ── 오디오 성경(공동체성경읽기 @PRS 유튜브 임베드) ── */
.bible-audio {
  margin: 0 auto 14px;
  max-width: 720px;
  text-align: center;
}
.bible-audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.bible-audio-auto {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-soft, #6b5a40);
  cursor: pointer;
  user-select: none;
}
.bible-audio-auto input {
  width: 15px;
  height: 15px;
  accent-color: var(--rubric, #9a4424);
  cursor: pointer;
}
.bible-audio-btn {
  gap: 7px;
}
.bible-audio-btn .glyph { font-size: 11px; color: var(--rubric); }
.bible-audio-btn.active {
  background: var(--rubric-deep, #7c2f12);
  border-color: var(--rubric-deep, #7c2f12);
  color: #fff;
}
.bible-audio-btn.active .glyph { color: #fff; }
.bible-audio-frame {
  position: relative;
  margin-top: 12px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 6px 22px rgba(40, 26, 12, 0.22);
}
.bible-audio-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.bible-audio-chapter-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.bible-audio-nav-btn:first-child { justify-self: end; }
.bible-audio-nav-btn:last-child { justify-self: start; }
.bible-audio-chapter-label {
  min-width: 92px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft, #6b5a40);
  white-space: nowrap;
}
.bible-audio-credit {
  margin: 8px 0 0;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}
@media (max-width: 520px) {
  .bible-audio-chapter-nav {
    grid-template-columns: 1fr 1fr;
  }
  .bible-audio-chapter-label {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }
  .bible-audio-nav-btn:first-child,
  .bible-audio-nav-btn:last-child {
    grid-row: 2;
    justify-self: stretch;
  }
}
/* ── 오디오 성경 미니(하단 우측 PiP) — 계속 들으며 본문 읽기 ── */
.bible-audio-minize-btn { gap: 6px; }
.bible-audio-minize-btn .glyph { font-size: 10px; color: var(--rubric); }
.bible-audio.minimized {
  position: fixed;
  left: auto;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  width: min(300px, calc(100vw - 24px));
  max-width: 300px;
  margin: 0;
  z-index: 80;
  text-align: left;
  background: var(--paper-0, #f6efdd);
  border: 1px solid var(--ink-ghost);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(35, 22, 8, 0.42);
  animation: mediaSettle 0.3s cubic-bezier(.2, .72, .2, 1) both;
}
.bible-audio.minimized .bible-audio-frame {
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
}
.bible-audio-mini-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
}
.bible-audio-mini-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-label);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft, #6b5a40);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bible-audio-mini-dot { color: var(--rubric); font-size: 13px; flex-shrink: 0; }
.bible-audio-mini-actions { display: flex; gap: 4px; flex-shrink: 0; }
.bible-audio-mini-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink-ghost);
  border-radius: 9px;
  background: rgba(255, 250, 236, 0.5);
  color: var(--ink-soft, #6b5a40);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.bible-audio-mini-icon:hover { border-color: var(--rubric); color: var(--rubric-deep); }
/* 설교 미니바가 떠 있으면(body.kc-mini) 성경 미니를 위로 올려 겹침 방지 */
body.kc-mini .bible-audio.minimized { bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); }
.bible-verse.selectable {
  cursor: pointer;
  border-radius: 8px;
  padding: 2px 8px;
  margin-left: -8px;
  margin-right: -8px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.bible-verse.selectable:hover { background: rgba(154, 68, 36, 0.06); }
.bible-verse.selected {
  background: rgba(154, 68, 36, 0.12);
  box-shadow: inset 3px 0 0 var(--rubric);
}
.bible-verse.selected .bible-vnum { color: var(--rubric-deep, #9a3118); }
/* 오늘의 말씀(지난 구절) → 성경 본문 점프 시, 해당 절을 잠깐 강조 */
.bible-verse-flash { animation: kc-verse-flash 2.4s ease-out; border-radius: 6px; }
@keyframes kc-verse-flash {
  0%, 18% { background: rgba(166, 134, 63, 0.30); box-shadow: inset 3px 0 0 var(--gold, #a6863f); }
  100% { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}
/* 오디오 재생 중 '지금 읽는 절' 지속 하이라이트(구절 따라가기) — 반짝임이 아닌 유지형, gold 계열로 selected(rubric)와 구분 */
.bible-verse.bible-verse-current {
  background: rgba(166, 134, 63, 0.16);
  box-shadow: inset 3px 0 0 var(--gold, #a6863f);
}
.bible-verse.bible-verse-current .bible-vnum { color: var(--gold, #a6863f); }
/* 수동 스크롤로 따라가기 일시정지 시 뜨는 '현재 절로' 복귀 버튼 */
.bible-follow-resume {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
  z-index: 82;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--ink-ghost);
  background: var(--paper-0, #f6efdd);
  color: var(--ink);
  font-family: var(--font-label);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(35, 22, 8, 0.30);
  cursor: pointer;
}
.bible-follow-resume:hover { border-color: var(--rubric); color: var(--rubric-deep); }
.bible-follow-resume .glyph { color: var(--rubric); font-size: 11px; }
/* 설교 미니바(body.kc-mini)가 떠 있으면 복귀 버튼도 위로 올려 겹침 방지 */
body.kc-mini .bible-follow-resume { bottom: calc(env(safe-area-inset-bottom, 0px) + 156px); }

/* KJV 단어 — 누르면 원어 뜻 팝업 */
.kjv-word {
  cursor: pointer;
  border-radius: 3px;
  border-bottom: 1px dotted rgba(154, 68, 36, 0.45);
  transition: background 0.12s ease;
}
.kjv-word:hover { background: rgba(154, 68, 36, 0.15); }
.strong-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(28, 18, 8, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.strong-popup {
  position: relative;
  width: min(420px, 100%);
  max-height: min(82vh, 720px);
  overflow-y: auto;
  background: var(--paper-1, #f0e7d0);
  border: 1px solid rgba(154, 68, 36, 0.28);
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: 0 20px 50px -14px rgba(40, 26, 10, 0.6);
}
.strong-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 16px;
  color: var(--ink-faint);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.strong-popup-close:hover { color: var(--rubric); }
.strong-code {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--rubric);
}
.strong-lemma {
  margin-top: 6px;
  font-family: var(--font-display, var(--font-book));
  font-size: 26px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.strong-translit {
  font-family: var(--font-label);
  font-size: 14px;
  font-style: italic;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.strong-def {
  margin: 12px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.strong-deriv {
  margin: 8px 0 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.strong-kjv {
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.strong-kjv b {
  color: var(--rubric);
  font-weight: 600;
  margin-right: 6px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.strong-loading {
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
}
/* 영어 원문 뜻 — 한글 뜻이 있을 때 보조로 흐리게 */
.strong-def-en {
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* 개역한글 절 끝의 '원어' 호출 버튼 */
.orig-trigger {
  flex-shrink: 0;
  align-self: flex-start;   /* 여러 줄 절에서 세로로 늘어나지 않게 — 첫 줄(우측 상단)에 고정 */
  margin-left: auto;        /* 절 길이와 무관하게 항상 우측 끝으로 */
  margin-top: 1px;          /* 첫 줄 텍스트와 눈높이 맞춤 */
  padding: 2px 9px;
  border: 1px solid rgba(154, 68, 36, 0.32);
  border-radius: 999px;
  background: rgba(154, 68, 36, 0.06);
  color: var(--rubric);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.55;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease;
}
.orig-trigger:hover { background: rgba(154, 68, 36, 0.15); }

/* 구절 원어 패널 — StrongPopup 오버레이를 공유하되 더 넓은 카드 */
.orig-panel {
  position: relative;
  width: min(460px, 100%);
  max-height: min(82vh, 720px);
  overflow-y: auto;
  background: var(--paper-1, #f0e7d0);
  border: 1px solid rgba(154, 68, 36, 0.28);
  border-radius: 14px;
  padding: 20px 20px 18px;
  box-shadow: 0 20px 50px -14px rgba(40, 26, 10, 0.6);
}
.orig-ref {
  margin: 6px 0 0;
  font-family: var(--font-display, var(--font-book));
  font-size: 19px;
  color: var(--ink);
}
.orig-verse {
  margin: 8px 0 0;
  font-family: var(--font-book);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.orig-words {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.orig-word {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(154, 68, 36, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.32);
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.orig-word:hover {
  background: rgba(154, 68, 36, 0.1);
  border-color: rgba(154, 68, 36, 0.34);
}
.orig-lemma {
  font-family: var(--font-display, var(--font-book));
  font-size: 21px;
  color: var(--ink);
}
.orig-translit {
  font-family: var(--font-label);
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-soft);
}
.orig-gloss {
  flex-basis: 100%;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
.orig-en {
  font-family: var(--font-label);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--rubric);
  white-space: nowrap;
}
.orig-note {
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* 선택 바 — 절 보기 하단에 떠서 카드 만들기 유도 */
.verse-card-bar {
  /* fixed 로 하단 고정 — sticky 였을 때 페이지 최하단(푸터)까지 스크롤하면 sticky 가
     풀려 카드바가 본문 흐름 자리로 올라가 버렸다. 항상 하단에 떠 있도록 fixed 로 두되,
     너비·좌우 여백은 .bible-shell(min(820px, 100vw-34px), 가운데 정렬)과 동일하게 맞춘다. */
  position: fixed;
  left: max(17px, calc((100vw - 820px) / 2));
  right: max(17px, calc((100vw - 820px) / 2));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 90;   /* 미니 플레이어(z80) 위 — 겹쳐도 '카드 만들기'가 항상 잡히게 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(154, 68, 36, 0.32);
  border-radius: 12px;
  background: rgba(248, 238, 210, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 22px -10px rgba(80, 54, 22, 0.5);
}
/* 설교 미니 플레이어(짧은 바)가 떠 있으면 구절 카드바를 그 위로 올려 가리지 않게 한다.
   (성경 오디오 미니는 키 큰 영상 PiP라 위치 올림으로 못 벗어나므로 z-index로 처리 — .verse-card-bar z:90) */
body.kc-mini .verse-card-bar { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
.verse-card-bar-count {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.verse-card-bar-btns { display: flex; align-items: center; gap: 8px; }

/* 카드 미리보기 모달 */
.verse-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow-y: auto;
  background: rgba(28, 18, 8, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.verse-card-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(440px, 100%);
  width: 100%;
  margin: auto;
}
/* 캔버스를 가로·세로 모두 제한해 작은 화면에서도 아래 버튼이 항상 보이게.
   둘 다 max + width/height auto면 비율 유지하며 두 한계 안으로 축소된다. */
.verse-card-canvas {
  max-width: 100%;
  max-height: 62vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.6);
}
/* 구절 카드 줄바꿈 편집 — 어두운 모달 톤(크림 글자)으로. */
.verse-card-edit {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.verse-card-edit-toggle {
  border: 1px solid rgba(248, 238, 210, 0.32);
  background: rgba(20, 12, 4, 0.4);
  color: #f4e8cc;
  border-radius: 999px;
  padding: 7px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.verse-card-edit-toggle:hover { background: rgba(20, 12, 4, 0.6); border-color: rgba(248, 238, 210, 0.55); }
.verse-card-edit-body { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.verse-card-textarea {
  width: 100%;
  max-width: 440px;
  padding: 11px 13px;
  border: 1px solid rgba(248, 238, 210, 0.3);
  border-radius: 10px;
  background: rgba(20, 12, 4, 0.55);
  color: #f8f0de;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  resize: vertical;
}
.verse-card-textarea:focus { outline: none; border-color: rgba(248, 238, 210, 0.62); }
.verse-card-textarea::placeholder { color: rgba(244, 232, 204, 0.42); }
.verse-card-reset {
  border: none;
  background: none;
  color: rgba(244, 232, 204, 0.78);
  font-family: var(--font-body);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.verse-card-reset:hover { color: #f8f0de; }
.verse-card-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* 모달(어두운 배경) 위 버튼 — 또렷하게 보이도록. 저장·공유는 채운 강조 버튼.
   selector를 .s-btn.verse-card-btn(0,2,0)으로 둬서 뒤에 오는 .s-btn{background:transparent}(0,1,0)를
   확실히 이긴다. 단일 .verse-card-btn(0,1,0)이면 source order상 .s-btn에 밀려 '다시 만들기'가
   투명 배경+어두운 글자로 어두운 오버레이에 묻혀 안 보였다. */
.s-btn.verse-card-btn {
  background: rgba(248, 238, 210, 0.96);
  color: var(--ink);
  border-color: rgba(248, 238, 210, 0.6);
}
.s-btn.verse-card-btn:hover { background: #fff; color: var(--rubric-deep, #9a3118); border-color: #fff; }
.verse-card-btn.primary {
  background: var(--rubric-deep, #9a3118);
  color: #fff;
  border-color: var(--rubric-deep, #9a3118);
}
.verse-card-btn.primary:hover { background: var(--rubric, #9a4424); color: #fff; border-color: var(--rubric, #9a4424); }
.verse-card-btn.ghost {
  background: transparent;
  color: rgba(248, 238, 210, 0.92);
  border-color: rgba(248, 238, 210, 0.45);
}
.verse-card-btn.ghost:hover { background: rgba(248, 238, 210, 0.14); color: #fff; border-color: rgba(248, 238, 210, 0.7); }

/* 사역 담당자 명단 공유 — 달력 하단 버튼 */
.ev-roster-share { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.s-btn.ev-roster-btn {
  background: var(--paper, #fbf7ef);
  color: var(--ink, #2a2620);
  border: 1px solid var(--line, rgba(60, 52, 40, 0.18));
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
}
.s-btn.ev-roster-btn:hover { background: #fff; border-color: rgba(60, 52, 40, 0.35); }
.s-btn.ev-roster-btn .glyph { margin-right: 4px; font-weight: 700; }
/* 명단 모달 — 흰 표 카드라 밝은 배경 박스로 */
.roster-canvas { background: #fff; }
.roster-tabs { display: flex; gap: 8px; justify-content: center; }
.roster-tab {
  border: 1px solid rgba(248, 238, 210, 0.34);
  background: rgba(20, 12, 4, 0.4);
  color: rgba(244, 232, 204, 0.85);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.roster-tab:hover { background: rgba(20, 12, 4, 0.62); color: #f8f0de; }
.roster-tab.active {
  background: rgba(248, 238, 210, 0.96);
  color: var(--ink, #2a2620);
  border-color: rgba(248, 238, 210, 0.85);
  font-weight: 600;
}
.roster-hint {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(244, 232, 204, 0.62);
}
/* 캘린더 구독 안내 모달 — 명단 모달과 같은 어두운 팔레트.
   verse-card-box 는 원래 캔버스를 얹는 투명 껍데기라, 글로만 된 이 모달엔 카드 배경을 준다. */
.calsub-box {
  align-items: stretch;
  max-width: 460px;
  padding: 22px 20px;
  border-radius: 18px;
  background: rgba(32, 21, 9, 0.94);
  border: 1px solid rgba(248, 238, 210, 0.2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}
.calsub-title {
  margin: 0;
  font-family: var(--font-display, var(--font-body));
  font-size: 19px;
  color: #f8f0de;
  text-align: center;
}
.calsub-lead {
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(244, 232, 204, 0.82);
}
.calsub-lead strong { color: #f8f0de; font-weight: 600; }
.calsub-ways { display: flex; flex-direction: column; gap: 8px; }
.calsub-way {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(248, 238, 210, 0.28);
  border-radius: 14px;
  background: rgba(20, 12, 4, 0.4);
  color: rgba(244, 232, 204, 0.9);
  font-family: var(--font-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.calsub-way:hover { background: rgba(20, 12, 4, 0.62); border-color: rgba(248, 238, 210, 0.5); }
.calsub-way.primary { background: rgba(248, 238, 210, 0.14); border-color: rgba(248, 238, 210, 0.46); }
.calsub-way.primary:hover { background: rgba(248, 238, 210, 0.22); }
.calsub-way-ico { font-size: 20px; line-height: 1; flex: 0 0 auto; }
.calsub-way-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.calsub-way-txt strong { font-size: 14px; font-weight: 600; color: #f8f0de; }
.calsub-way-txt em { font-style: normal; font-size: 12px; color: rgba(244, 232, 204, 0.62); }
.calsub-note {
  margin: 0;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.65;
  color: rgba(244, 232, 204, 0.68);
}
.calsub-note strong { color: rgba(248, 238, 210, 0.92); font-weight: 600; }
.calsub-note.sub { color: rgba(244, 232, 204, 0.5); }
.bible-chapter-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-ghost);
}
/* 장 바로가기(페이징) — 읽기 화면 하단, 비인접 장으로 바로 점프 */
.bible-chapter-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ink-ghost);
}
.bible-chapter-pageno {
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-book);
  font-size: 14px;
  color: var(--ink-soft, #6b5a40);
  border: 1px solid var(--ink-ghost);
  border-radius: 8px;
  background: rgba(255, 250, 236, 0.45);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.bible-chapter-pageno:hover { border-color: var(--rubric); color: var(--rubric-deep); background: rgba(154, 68, 36, 0.06); }
.bible-chapter-pageno.current {
  background: var(--rubric-deep, #7c2f12);
  border-color: var(--rubric-deep, #7c2f12);
  color: #fff;
  cursor: default;
}
.material-list,
.community-grid {
  display: grid;
  gap: 10px;
}
.material-card,
.community-card {
  border: 1px solid rgba(52, 40, 26, 0.16);
  background: rgba(248, 238, 210, 0.34);
  padding: 18px;
  box-shadow: 0 8px 26px rgba(70, 44, 18, 0.06);
}
.material-meta,
.community-card span {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rubric);
}
.material-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.material-code {
  flex: 0 0 auto;
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--rubric-deep);
  background: rgba(154, 68, 36, 0.1);
  border: 1px solid rgba(154, 68, 36, 0.28);
  border-radius: 8px;
  padding: 5px 10px;
  min-width: 46px;
  text-align: center;
}
.material-head h3 { margin-top: 0; }
.material-card h3,
.community-card h3 {
  margin-top: 8px;
  font-family: var(--font-book);
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
}
.material-card p,
.community-card p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.material-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* 커리큘럼 토글은 왼쪽, 교재 열기 버튼은 오른쪽으로 밀어낸다 */
.material-outline-toggle { margin-right: auto; }
.material-outline-toggle .glyph { font-size: 11px; }
/* 커리큘럼 펼침 영역 — 버튼 줄 아래로 */
.material-outline-body {
  margin-top: 14px;
  border-top: 1px solid rgba(52, 40, 26, 0.12);
  padding-top: 12px;
}
/* (구) 접이식 상세 — 남겨둠 */
.material-outline {
  margin-top: 12px;
  border-top: 1px solid rgba(52, 40, 26, 0.12);
  padding-top: 10px;
}
.material-outline > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--rubric);
  user-select: none;
}
.material-outline > summary::-webkit-details-marker { display: none; }
.material-outline > summary::before {
  content: "▸";
  font-size: 10px;
  transition: transform 0.18s;
}
.material-outline[open] > summary::before { transform: rotate(90deg); }
.material-outline > summary:hover { color: var(--rubric-deep); }
.outline-list {
  list-style: none;
  margin: 10px 0 2px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.outline-list > li {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  padding-left: 12px;
  border-left: 2px solid rgba(154, 68, 36, 0.25);
}
.outline-head { font-weight: 600; color: var(--ink); }
.outline-image-button {
  display: block;
  width: 100%;
  max-width: 960px;
  margin: 10px 0 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}
.outline-image-button:focus-visible {
  outline: 2px solid rgba(35, 79, 169, 0.75);
  outline-offset: 4px;
  border-radius: 6px;
}
.outline-image {
  display: block;
  width: 100%;
  max-width: 960px;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(70, 44, 18, 0.08));
}
.image-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(22, 18, 12, 0.82);
}
.image-viewer-panel {
  width: min(100%, 1180px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.image-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fffaf0;
}
.image-viewer-title {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.image-viewer-download,
.image-viewer-close {
  min-height: 38px;
  border: 1px solid rgba(255, 250, 240, 0.35);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.12);
  color: #fffaf0;
  font-family: var(--font-body);
  font-size: 13px;
}
.image-viewer-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  text-decoration: none;
}
.image-viewer-close {
  width: 38px;
  padding: 0;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.image-viewer-download:hover,
.image-viewer-close:hover {
  background: rgba(255, 250, 240, 0.22);
}
.image-viewer-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 82px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}
.outline-points {
  list-style: none;
  margin: 5px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.outline-points > li {
  position: relative;
  padding-left: 13px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.outline-points > li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--rubric);
  font-weight: 700;
}
.outline-points > li.is-step {
  padding: 10px 12px 10px 14px;
  border-left: 2px solid rgba(154, 68, 36, 0.24);
  background: rgba(255, 250, 236, 0.3);
}
.outline-points > li.is-step::before {
  content: none;
}
.outline-point-block {
  display: block;
  padding: 2px 0 3px;
}
.outline-point-title {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.55;
}
.outline-point-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.outline-point-body p {
  margin: 0;
  line-height: 1.75;
}
.community-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.community-sub {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: clamp(26px, 4.5vh, 44px) 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink-ghost);
}
.community-sub .section-kicker { width: 100%; }
.community-sub h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.community-card a,
.community-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid rgba(154, 68, 36, 0.32);
  border-radius: 999px;
  background: rgba(154, 68, 36, 0.1);
  color: var(--rubric-deep);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.community-card button:disabled {
  border-color: rgba(52, 40, 26, 0.16);
  background: rgba(52, 40, 26, 0.05);
  color: var(--ink-faint);
}

/* ============================================================
   중앙 SPINE — 성경 눈금자
   ============================================================ */
.spine {
  position: relative;
  width: min(var(--maxw), 100%);
  margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) 0 clamp(80px, 16vh, 200px);
}

/* 세로 룰 */
.spine-rule {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: var(--rule-w);
  transform: translateX(-50%);
  background: linear-gradient(180deg,
    transparent, var(--ink-soft) 5%, var(--ink-soft) 95%, transparent);
  z-index: 1;
}
.spine-rule::before, .spine-rule::after {
  content: "✦";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--rubric);
  font-size: 14px;
}
.spine-rule::before { top: -6px; }
.spine-rule::after  { bottom: -6px; }

/* 책 행 */
.book-row {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--spine-gap);
  padding: calc(var(--spine-gap) * 0.18) 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 좌/우 절반 */
.book-side {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}
.book-side.left  { justify-content: flex-end;  text-align: right;  padding-right: 26px; }
.book-side.right { justify-content: flex-start; text-align: left;   padding-left: 26px; }

/* 눈금 (틱) */
.book-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: var(--rule-w);
  background: var(--ink-soft);
  z-index: 2;
  transition: width 0.3s ease, background 0.3s ease;
}
.book-row:hover .book-tick { width: 32px; background: var(--rubric); }

/* 한글 책 이름 — 스크롤 근접도(--prox 0..1)에 따라 연속 강조 */
.book-ko {
  font-family: var(--font-book);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.05;
  color: var(--ink);
  letter-spacing: 0.005em;
  white-space: nowrap;
  transform: scale(calc(0.96 + var(--prox, 0.55) * 0.09));
  opacity: calc(0.66 + var(--prox, 0.55) * 0.34);
  transition: color 0.3s, text-shadow 0.3s;
}
.book-side.left  .book-ko { transform-origin: right center; }
.book-side.right .book-ko { transform-origin: left center; }
/* 영문 이름 (작은 마지널리아) */
.book-en {
  font-family: var(--font-label);
  font-style: italic;
  font-size: clamp(11px, 1.1vw, 14px);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: calc(0.34 + var(--prox, 0.55) * 0.66);
  transition: color 0.3s;
}
/* 약어 칩 (틱 옆) — 모바일 가독 보조 */
.book-abbr {
  font-family: var(--font-label);
  font-size: 11px;
  color: var(--ink-ghost);
  letter-spacing: 0.06em;
}

/* 설교 개수 점 (있는 책 표시) */
.book-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.book-dots .dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--rubric);
  opacity: 0.55;
}
.book-side.left .book-dots { order: -1; }

/* 스크롤 강조: 중앙 근접 행 */
.book-row.near .book-ko {
  text-shadow: 0 1px 0 rgba(255,248,224,0.6);
}
.book-row.near .book-tick { background: var(--rubric); }

/* 설교 없는 책 (여전히 클릭 가능 → 빈 두루마리) */
.book-row.empty .book-ko { color: var(--ink-faint); }
.book-row.empty .book-tick { background: var(--ink-ghost); }
.book-row.empty:hover .book-tick { width: 34px; background: var(--rubric); opacity: 0.6; }

/* 선택된 책 */
.book-row.selected .book-ko { color: var(--rubric); }
.book-row.selected .book-tick { width: 44px; background: var(--rubric); height: 3px; }

/* 검색 비매칭 숨김 */
.book-row.hidden { display: none; }

/* ── 성경 구분 헤더 (구약/신약, 분류) ── */
.testament-head {
  position: relative;
  text-align: center;
  padding: clamp(30px, 6vh, 60px) 0 clamp(18px, 3vh, 34px);
  z-index: 3;
}
.testament-head .tt-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(14px, 1.6vw, 19px);
  letter-spacing: 0.42em;
  color: var(--rubric);
  display: inline-block;
  padding: 6px 26px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  background: var(--paper-0);
  box-shadow: 0 1px 6px rgba(120,90,50,0.06);
}
.tt-en, .testament-head .tt-en {
  display: block;
  width: max-content;
  font-family: var(--font-label);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  margin: 9px auto 0;
  padding: 1px 14px;
  background: var(--paper-0);
  border-radius: 2px;
  box-shadow: 0 0 0 5px rgba(246, 239, 221, 0.72);
}

.group-head {
  position: relative;
  text-align: center;
  padding: clamp(14px, 2.4vh, 24px) 0 clamp(8px, 1.4vh, 14px);
  z-index: 3;
}
.group-head span {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--paper-0);
  padding: 5px 20px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  white-space: nowrap;
}
/* 마지막 글자의 letter-spacing 이 만드는 우측 여백 비대칭 보정 */
.group-head .g-en { margin-right: -0.12em; }
.group-head .g-ko { font-weight: 400; letter-spacing: 0.2em; }
.group-head .g-en { font-style: italic; letter-spacing: 0.12em; color: var(--ink-ghost); }

/* ============================================================
   설교 패널 — 두루마리
   ============================================================ */
.scroll-overlay {
  position: fixed;
  inset: 0;
  z-index: 70; /* share-fab/scroll-top(40)·notif(60) 위, media(80) 아래 */
  display: flex;
  pointer-events: none;
}
.scroll-overlay.right { justify-content: flex-end; }
.scroll-overlay.open { pointer-events: auto; }

/* 어둠막 */
.scroll-scrim { position: absolute; inset: 0; background: rgba(40, 26, 8, 0); transition: background 0.5s ease; }
.scroll-overlay.open .scroll-scrim { background: rgba(60, 42, 18, 0.22); }

/* 두루마리 본체 — 좌측에서 펼침 (데스크탑) */
.scroll-paper {
  position: relative;
  z-index: 2;
  width: min(680px, 94vw);
  height: 100%;
  max-height: 100%;
  min-height: 0;
  margin-left: 0;
  background:
    radial-gradient(60% 40% at 30% 12%, rgba(150,120,70,0.06), transparent 60%),
    linear-gradient(95deg, var(--paper-1), var(--paper-0) 24%, var(--paper-1) 100%);
  box-shadow: 8px 0 36px rgba(80,54,24,0.20), inset -16px 0 28px rgba(150,116,60,0.07);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s cubic-bezier(.22,.78,.24,1);
  display: flex;
  flex-direction: column;
}
.scroll-overlay.open .scroll-paper { transform: scaleX(1); }

/* ── 신약: 우측에서 펼침 ── */
.scroll-overlay.right .scroll-paper {
  transform-origin: right center;
  box-shadow: -8px 0 36px rgba(80,54,24,0.20), inset 16px 0 28px rgba(150,116,60,0.07);
  background:
    radial-gradient(60% 40% at 70% 12%, rgba(150,120,70,0.06), transparent 60%),
    linear-gradient(265deg, var(--paper-1), var(--paper-0) 24%, var(--paper-1) 100%);
}

/* 두루마리 내용은 펼침이 끝날 때 페이드인 */
.scroll-inner {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.3s ease 0.34s;
  overflow: hidden; /* Lock overflow to activate child scroll! */
}
.scroll-overlay.open .scroll-inner { opacity: 1; }

/* 스핀들(말이) — 구약은 우측, 신약은 좌측에 말린 느낌 */
.scroll-spindle {
  position: absolute;
  top: -2%;
  right: -13px;
  width: 26px;
  height: 104%;
  border-radius: 13px;
  background: linear-gradient(90deg, #5d3c1b, #8a6230 48%, #4e3214);
  box-shadow: 0 0 0 1px rgba(40,26,8,0.4), 0 10px 30px rgba(40,26,8,0.4);
  z-index: 3;
}
.scroll-overlay.right .scroll-spindle { right: auto; left: -13px; }
.scroll-spindle::before, .scroll-spindle::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 34px; height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #4e3214, #7a5226 50%, #4e3214);
  box-shadow: 0 2px 6px rgba(40,26,8,0.5);
}
.scroll-spindle::before { top: -8px; }
.scroll-spindle::after  { bottom: -8px; }

/* 패널 헤더 */
.scroll-head {
  flex-shrink: 0;
  padding: clamp(22px, 4vh, 38px) clamp(26px, 4.5vw, 46px) 14px;
  border-bottom: 1px solid var(--ink-ghost);
}
.scroll-head .kicker {
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--rubric);
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 0.8em;
}
.scroll-head .kicker .k-en { font-style: italic; letter-spacing: 0.16em; color: var(--ink-faint); }
.scroll-head h2 {
  font-family: var(--font-book);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.98;
  color: var(--ink);
}
.scroll-head .h-en {
  font-family: var(--font-label);
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 18px);
  color: var(--ink-faint);
  margin-top: 4px;
}
.scroll-head .h-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.scroll-head .h-meta .pill {
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 2px 11px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* ── 강해/주제 탭 ── */
.tabs {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  border-bottom: 1px solid var(--ink-ghost);
}
.tab {
  position: relative;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  padding: 8px 14px 11px;
  cursor: pointer;
  transition: color 0.2s;
}
.tab em {
  font-style: normal;
  font-family: var(--font-label);
  font-size: 11px;
  color: var(--ink-ghost);
  margin-left: 3px;
  vertical-align: 1px;
}
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--rubric); }
.tab.active em { color: var(--rubric); opacity: 0.7; }
.tab.active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: -1px;
  height: 2px;
  background: var(--rubric);
  border-radius: 2px;
}
.tab.off { opacity: 0.34; cursor: default; }
.tab.off:hover { color: var(--ink-faint); }

.tab-empty {
  padding: 40px 8px;
  text-align: center;
  font-family: var(--font-label);
  font-style: italic;
  color: var(--ink-faint);
  font-size: 14px;
}

.series-tabs {
  display: flex;
  gap: 8px;
  padding: 12px clamp(26px, 4.5vw, 46px) 4px;
}
.series-tab {
  border: 1px solid var(--ink-ghost);
  border-radius: 999px;
  background: rgba(255,250,235,0.35);
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 5px 13px;
  transition: all 0.2s;
}
.series-tab em {
  font-style: normal;
  font-family: var(--font-label);
  font-size: 10.5px;
  margin-left: 4px;
  opacity: 0.62;
}
.series-tab:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}
.series-tab.first.active {
  border-color: rgba(124, 74, 22, 0.32);
  background: rgba(124, 74, 22, 0.11);
  color: #6d4215;
}
.series-tab.second.active {
  border-color: rgba(47, 93, 74, 0.32);
  background: rgba(47, 93, 74, 0.11);
  color: #254a3b;
}

/* 닫기 */
.scroll-close {
  position: absolute;
  top: 18px; right: 22px;
  z-index: 5;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ink-ghost);
  background: rgba(248,238,210,0.6);
  color: var(--ink-soft);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.scroll-overlay.right .scroll-close { right: auto; left: 22px; }
.scroll-close:hover { background: var(--rubric); color: var(--paper-0); border-color: var(--rubric); transform: rotate(90deg); }

/* 카드 리스트 */
.sermon-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px clamp(26px, 4.5vw, 46px) clamp(32px, 6vh, 64px);
  -webkit-overflow-scrolling: touch;
  /* 클래식 앤티크 황동 골드 계열 슬림 스크롤바 */
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 49, 24, 0.25) transparent;
}
.sermon-list::-webkit-scrollbar {
  width: 5px;
}
.sermon-list::-webkit-scrollbar-track {
  background: transparent;
}
.sermon-list::-webkit-scrollbar-thumb {
  background-color: rgba(138, 49, 24, 0.22);
  border-radius: 10px;
  transition: background-color 0.2s;
}
.sermon-list::-webkit-scrollbar-thumb:hover {
  background-color: rgba(138, 49, 24, 0.45);
}

/* 설교 카드 — 2줄 구조 */
.sermon {
  position: relative;
  padding: 14px 4px 14px 30px;
  border-bottom: 1px solid rgba(52, 40, 26, 0.16);
  opacity: 0;
  transform: translateY(11px);
  animation: sermonIn 0.44s cubic-bezier(.2,.7,.2,1) forwards;
  cursor: pointer;  /* 카드 전체 터치 → 상세·댓글 */
}
/* 카드 안의 인터랙티브 요소는 기본 커서 유지 */
.sermon button, .sermon a, .sermon input, .sermon textarea, .sermon label { cursor: auto; }
.sermon .s-btn, .sermon .s-title-link { cursor: pointer; }
/* 카드 staggered 등장(착착착)의 지연은 SermonCard 가 인라인 animationDelay(=min(i,12)*step)로
   준다(panel.jsx). 등장 거리(.sermon transform)는 살짝 키워 차례로 떠오르는 느낌이 또렷하게. */
@keyframes sermonIn { to { opacity: 1; transform: none; } }

/* 화면 전환 감성 — 섹션 진입 시 부드러운 페이드. 설교 목록(.feed-shell)은 카드 stagger 가
   등장을 맡으므로 제외하고, 상세(.sermon-focus) 와 나머지 뷰에만 적용(이중 모션 방지). */
.home,
.materials-shell,
.community-shell,
.personal-shell,
.bible-shell,
.events-shell,
.feed-shell.sermon-focus {
  animation: kcViewIn 0.34s ease both;
}
@keyframes kcViewIn { from { opacity: 0; } to { opacity: 1; } }

/* 번호(필사 드롭캡 느낌) */
.sermon .num {
  position: absolute;
  left: 0; top: 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--rubric);
  opacity: 0.6;
}

/* ─ 1줄: 본문 · 제목 · 설교자 · 날짜 ─ */
.sermon .s-row1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 10px;
}
.sermon .s-passage {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--rubric);
  white-space: nowrap;
  flex-shrink: 0;
}
.sermon-expo,
.sermon-series {
  min-height: 92px;
}
.sermon:not(.sermon-detail).sermon-expo,
.sermon:not(.sermon-detail).sermon-series {
  min-height: 0;
}
.sermon-detail {
  cursor: default;
}
.sermon-expo .num,
.sermon-series .num {
  top: 18px;
}
.sermon .s-expo-mark {
  flex: 0 0 auto;
  width: 54px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(47, 93, 74, 0.28);
  border-left: 3px solid #2f5d4a;
  background: rgba(47, 93, 74, 0.08);
  color: #254a3b;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}
.sermon-expo .s-row1,
.sermon-series .s-row1 {
  align-items: flex-start;
}
/* 회차 박스 우측 열: 맥락 kicker(로마서 강해 …) + 제목. 제목은 이 열의 전체 폭을
   그대로 쓰므로 kicker 를 더해도 제목 폭이 좁아져 개행이 늘지 않는다. */
.sermon .s-headcol {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sermon .s-series-context {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: #2f5d4a;            /* 2차 강해(초록) 기본 */
}
.sermon .s-series-context.first  { color: #7c4a16; }  /* 1차 강해(갈색) */
.sermon .s-series-context.series { color: var(--rubric); }
/* 시리즈/강해 라벨을 눌러 그 목록으로 — 누를 수 있음을 '›' 꼬리표와 호버 밑줄로 알린다. */
.sermon .s-series-context.s-series-link {
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
  border-radius: 5px;
  transition: opacity 0.15s, background 0.15s;
}
.sermon .s-series-context.s-series-link::after { content: "›"; font-weight: 700; opacity: 0.65; }
.sermon .s-series-context.s-series-link:hover,
.sermon .s-series-context.s-series-link:focus-visible {
  text-decoration: underline; text-underline-offset: 2px; opacity: 0.82; outline: none;
}
.sermon .s-series-context.s-series-link:focus-visible { box-shadow: 0 0 0 2px rgba(154, 68, 36, 0.35); }
.sermon .s-expo-mark.first {
  border-color: rgba(124, 74, 22, 0.28);
  border-left-color: #7c4a16;
  background: rgba(124, 74, 22, 0.08);
  color: #6d4215;
}
.sermon .s-expo-lecture {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.sermon .expo-passage {
  white-space: normal;
  max-width: 100%;
}
.sermon h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.16;
  color: var(--ink);
  transition: color 0.2s;
  min-width: 0;
}
.sermon:hover h3 { color: var(--rubric-deep); }
/* 제목 클릭 → 상세·댓글 페이지로. h3 외형을 그대로 물려받는 인라인 버튼 */
.s-title-link {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  display: inline;
}
.s-title-link:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(154, 68, 36, 0.5); }
.s-title-go {
  font-family: var(--font-label);
  color: var(--rubric);
  opacity: 0.55;
  margin-left: 4px;
  font-weight: 400;
}
.s-title-link:hover .s-title-go { opacity: 1; }
.sermon .s-byline {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 강해/시리즈 카드는 byline 을 항상 다음 줄 전체폭으로 내린다. 그래야 1줄의 남은 폭을
   제목 열(s-headcol)이 모두 차지한다 — byline(nowrap)이 같은 줄에 남으면 제목 열이
   한 글자 폭으로 짓눌려 제목이 글자마다 개행되는 문제를 막는다.
   (반드시 위 `.sermon .s-byline` 규칙보다 뒤에 있어야 동순위 경쟁에서 이긴다.) */
.sermon-expo .s-byline,
.sermon-series .s-byline {
  flex: 0 0 100%;
  margin-left: 0;
}
.sermon .s-byline .who { color: var(--ink); }
.sermon .s-byline .dot-sep { color: var(--ink-ghost); }
.sermon .s-byline .when,
.sermon .s-byline .s-views,
.sermon .s-byline .s-comments {
  white-space: nowrap;
}

/* ─ 2줄: 강해/주제 · 태그 · 링크 ─ */
.sermon .s-row2 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 9px;
}
.sermon .s-type {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 1px 8px;
  border-radius: 100px;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.sermon .s-type.expo  { color: #2f5d4a; background: rgba(47,93,74,0.10); border-color: rgba(47,93,74,0.22); }
.sermon .s-type.topic { color: #7c4a16; background: rgba(124,74,22,0.10); border-color: rgba(124,74,22,0.22); }
.sermon .s-series-chip {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1px 8px;
  border-radius: 100px;
  flex-shrink: 0;
}
.sermon .s-series-chip.main {
  color: #2f5d4a;
  background: rgba(47,93,74,0.10);
  border: 1px solid rgba(47,93,74,0.22);
}
.sermon .s-series-chip.temp {
  color: #7c4a16;
  background: rgba(124,74,22,0.10);
  border: 1px solid rgba(124,74,22,0.22);
}

.sermon .s-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}
.sermon .s-tag {
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  padding: 1px 9px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  background: rgba(255,250,235,0.4);
  cursor: pointer;
  transition: all 0.18s;
}
.sermon .s-tag::before { content: "#"; opacity: 0.5; margin-right: 1px; }
.sermon:hover .s-tag { border-color: rgba(154,68,36,0.3); color: var(--ink-soft); }
.sermon .s-tag:hover { border-color: rgba(154,68,36,0.6); color: var(--ink); background: rgba(154,68,36,0.10); }

/* 미디어 버튼 — 카드 종류(강해/주제)·화면폭 무관하게 동일하도록:
   원문·음성·영상은 오른쪽 정렬을 유지하되 한 줄에서 줄바꿈하지 않는다. */
.s-media {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
}
.s-consume,
.s-aux {
  display: grid;
  grid-auto-flow: column;
  /* 모든 버튼을 같은 폭으로 — minmax(max-content,1fr)은 긴 라벨(예: 즐겨찾기)이
     그 칸만 키워 버튼 폭이 제각각이 된다. 1fr로 균등 분할한다. */
  grid-auto-columns: 1fr;
  align-items: center;
  justify-content: stretch;
  gap: 6px;
  width: 100%;
}
.s-consume .s-btn,
.s-aux .s-btn {
  width: 100%;
}
.s-btn .glyph svg { display: block; }

/* 설교 카드 액션 버튼은 추천 카드 버튼과 동일한 크기·여백을 유지하고,
   좁은 화면에선 줄바꿈으로 흐른다(예전처럼 납작하게 축소하지 않는다). */
.s-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-width: 0;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 11px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.s-btn[type="button"] {
  appearance: none;
}
.s-btn:hover { border-color: var(--rubric); color: var(--rubric); background: rgba(138,49,24,0.06); }
.s-btn.disabled { opacity: 0.34; pointer-events: none; }
.s-btn .glyph { font-size: 11px; }
/* 자막(대본) 있는 음성 버튼 — 우측 상단 모서리에 작은 '자막' 배지를 오버랩(노티 배지 스타일) */
.s-btn.s-has-cc { position: relative; overflow: visible; }
.s-cc-badge {
  position: absolute;
  top: -7px;
  right: -5px;
  padding: 0 5px;
  height: 14px;
  line-height: 14px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  border-radius: 100px;
  background: var(--rubric, #9a4424);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  pointer-events: none;  /* 배지가 버튼 클릭을 가로채지 않게 */
}

/* 청취 수단 3버튼(원문·음성·영상)은 작아져도 눈에 띄도록 아이콘에 살짝
   브랜드 색 + 아주 옅은 따뜻한 톤. (텍스트·전체 분위기는 그대로) */
.s-consume .s-btn {
  border-color: rgba(154, 68, 36, 0.3);
  background: rgba(154, 68, 36, 0.05);
}
.s-consume .s-btn .glyph { color: var(--rubric); }
.s-consume .s-btn:hover {
  border-color: var(--rubric);
  background: rgba(154, 68, 36, 0.1);
}
.s-consume .s-btn.disabled .glyph { color: inherit; }

/* 공유는 '청취 수단'(원문·음성·영상)과 성격이 다른 보조 동작이므로,
   테두리 없는 조용한 톤 + 옅은 구분선으로 한 발 떼어 놓는다. */
.s-btn.s-share {
  border-color: transparent;
  background: transparent;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  padding: 4px 6px;
}
.s-btn.s-share:hover {
  border-color: transparent;
  background: transparent;
  color: var(--rubric);
}
.s-btn.s-share .glyph { opacity: 0.8; }

/* 즐겨찾기·공유는 한 묶음(우측 보조 동작) */
.s-btn.s-fav {
  border-color: transparent;
  background: transparent;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  padding: 4px 6px;
}
.s-btn.s-fav:hover {
  border-color: transparent;
  background: transparent;
  color: var(--rubric);
}
.s-btn.s-fav .glyph { font-size: 14px; color: var(--rubric); opacity: 0.7; }
.s-btn.s-fav.active { color: var(--rubric); }
.s-btn.s-fav.active .glyph { opacity: 1; }

/* 즐겨찾기/담은 설교 목록 카드의 버튼 묶음(별·삭제·듣기) */
.personal-item-btns { display: flex; align-items: center; gap: 6px; }
.personal-item-btns .s-btn.s-fav { padding: 4px 4px; }
.personal-item-btns .s-btn.s-fav .glyph { font-size: 15px; }
.personal-item-btns .s-btn.personal-remove {
  padding: 4px 7px;
  color: var(--ink-faint);
  border-color: rgba(52, 40, 26, 0.18);
}
.personal-item-btns .s-btn.personal-remove:hover { color: var(--rubric); border-color: var(--rubric); }
.personal-item-btns .s-btn.personal-remove .glyph { font-size: 12px; }
.personal-listened-at {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  color: var(--ink-faint);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.03em;
}

/* 작은 재생 프레임 */
.media-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.media-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(42, 27, 10, 0.46);
  cursor: pointer;
}
.media-frame {
  position: relative;
  z-index: 1;
  width: min(760px, 92vw);
  max-height: min(82vh, 620px);
  border: 1px solid rgba(52, 40, 26, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(70% 56% at 50% 0%, rgba(255,250,235,0.36), transparent 68%),
    linear-gradient(135deg, rgba(246,239,221,0.96), rgba(232,220,192,0.98));
  box-shadow: 0 22px 70px rgba(35, 22, 8, 0.42), inset 0 1px 0 rgba(255,255,255,0.42);
  overflow: hidden;
}
.media-frame.video {
  width: min(820px, 94vw);
  max-height: 94vh;
}
/* 영상은 iframe 자체를 16:9로 — 프레임에 aspect-ratio를 걸면 모바일에서
   머리/꼬리 영역에 눌려 영상이 잘렸음. iframe을 폭 기준 16:9 + 자동 높이로. */
.media-frame.video iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
}
/* YouTube IFrame API 플레이어(이어보기) — 16:9 박스에 채움 */
.media-yt-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.media-yt-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  aspect-ratio: auto;
}
.media-frame.audio {
  width: min(560px, 92vw);
  max-height: min(82vh, 620px);
  max-height: min(82dvh, 620px);
  display: flex;
  flex-direction: column;
}
/* 내용이 길어도(2줄 컨트롤·큐 패널 등) 머리·꼬리는 항상 보이고 가운데만 스크롤 → 푸터 짤림 방지 */
.media-frame.audio > .media-head { flex-shrink: 0; }
.media-frame.audio > .media-foot { flex-shrink: 0; }
.media-frame.audio > .media-audio-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.media-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px 14px 20px;
  border-bottom: 1px solid rgba(52, 40, 26, 0.15);
}
.media-head > div { min-width: 0; }   /* flex 안에서 줄바꿈/말줄임 허용 */
.media-kicker {
  display: block;
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--rubric);
  text-transform: uppercase;
  margin-bottom: 5px;
}
.media-head h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  /* 제목이 길면 최대 2줄까지 표시(잘림 방지) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.media-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ink-ghost);
  background: rgba(248,238,210,0.72);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}
.media-close svg { display: block; }
.media-close:hover {
  background: var(--rubric);
  border-color: var(--rubric);
  color: var(--paper-0);
}
.media-frame iframe {
  display: block;
  width: 100%;
  height: calc(100% - 106px);
  min-height: 260px;
  border: 0;
  background: rgba(52, 40, 26, 0.1);
}
.media-audio-body {
  display: grid;
  /* 단일 암묵적 auto 컬럼은 자식(재생목록의 nowrap 제목)의 max-content를 따라
     .ap-queue max-width(520px)까지 늘어나 모바일에서 가로 오버플로를 냈다.
     minmax(0,1fr)로 컬럼을 컨테이너 폭에 고정 → 자식이 폭 안에서 말줄임 처리. */
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 14px;
  min-height: 150px;
  padding: 28px 24px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.36), rgba(218, 202, 166, 0.18)),
    rgba(52, 40, 26, 0.06);
}
.media-audio-body audio { display: none; }  /* 커스텀 컨트롤 사용 */

/* ── 커스텀 음성 플레이어 (큰 버튼·이어듣기) ── */
.media-sub {
  display: block;
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}
.ap-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;        /* 큐(이전/다음/반복)로 버튼이 많아도 넘치지 않고 줄바꿈 */
  gap: 18px;
}
/* 주 전송부(−10·재생·+10) 아래로 보조(이전·반복·다음)를 줄바꿈 — PC·모바일 동일 경험 */
.ap-break { display: block; flex: 0 0 100%; width: 100%; height: 0; }
.ap-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid var(--rubric);
  background: var(--rubric);
  color: var(--paper-0);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(138, 49, 24, 0.34);
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.ap-play:hover { background: var(--rubric-deep); }
.ap-play:active { transform: scale(0.95); }
.ap-skip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--ink-ghost);
  background: rgba(255, 250, 235, 0.5);
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.ap-skip:hover { border-color: var(--rubric); color: var(--rubric); }
.ap-skip-glyph { font-size: 22px; }
.ap-skip-num { font-size: 10px; font-weight: 700; letter-spacing: 0.02em; margin-top: -2px; }
.ap-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ap-time {
  font-family: var(--font-label);
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  min-width: 42px;
  text-align: center;
}
.ap-seek {
  flex: 1;
  height: 8px;
  accent-color: var(--rubric);
  cursor: pointer;
}
@media (max-width: 480px) {
  .ap-play { width: 84px; height: 84px; }   /* 모바일에서 크게(어르신 배려) */
  .ap-skip { width: 56px; height: 56px; }
  .ap-controls { gap: 16px 14px; }
  .ap-time { font-size: 15px; min-width: 46px; }
}
/* ── 모바일 가독성: 너무 작던 글씨들을 한 단계 키움(모바일 주력) ── */
@media (max-width: 640px) {
  .media-overlay {
    align-items: flex-start;
    padding: max(12px, env(safe-area-inset-top, 0px)) 10px max(12px, env(safe-area-inset-bottom, 0px));
  }
  .media-frame.audio {
    width: min(560px, calc(100vw - 20px));
    height: calc(100vh - max(24px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px) + 16px));
    height: calc(100dvh - max(24px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px) + 16px));
    max-height: calc(100vh - max(24px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px) + 16px));
    max-height: calc(100dvh - max(24px, env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px) + 16px));
  }
  .media-head {
    gap: 10px;
    padding: 13px 12px 12px 16px;
  }
  .media-audio-body {
    gap: 12px;
    padding: 20px 16px 22px;
  }
  .media-kicker { font-size: 12.5px; }
  .media-head h3 { font-size: 21px; }
  .media-sub { font-size: 15px; }
  .media-speed-label { font-size: 14px; }
  .feed-meta span { font-size: 12px; padding: 3px 9px; }
  .section-kicker { font-size: 12px; letter-spacing: 0.2em; }
  .sermon .s-tag { font-size: 12px; }
  .feed-head p { font-size: 14px; }
  .feed-count { font-size: 12.5px; }
}
/* 배속 재생 컨트롤 */
.media-speed {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.media-speed-label {
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-right: 6px;
}
.media-speed-btn {
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 9px 17px;
  min-width: 56px;
  min-height: 42px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  background: rgba(255, 250, 235, 0.5);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.media-speed-btn:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}
.media-speed-btn.active {
  background: var(--rubric);
  border-color: var(--rubric);
  color: var(--paper-0);
  box-shadow: 0 2px 8px rgba(138, 49, 24, 0.26);
}
/* ── 음량 고르게(자동 음량 평준화) 토글 ── */
.media-norm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.media-norm-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
  min-height: 40px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  background: rgba(255, 250, 235, 0.5);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.media-norm-btn:hover { border-color: var(--ink-faint); color: var(--ink); }
.media-norm-btn .media-norm-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-ghost);
  box-shadow: none;
  transition: background 0.18s, box-shadow 0.18s;
}
.media-norm-btn.on {
  border-color: var(--rubric);
  color: var(--ink);
  background: rgba(138, 49, 24, 0.07);
}
.media-norm-btn.on .media-norm-dot {
  background: var(--rubric);
  box-shadow: 0 0 0 3px rgba(138, 49, 24, 0.18);
}
.media-norm-btn em {
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.media-norm-btn.on em { color: var(--rubric); }
.media-norm-note {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}
/* ── 동기화 자막(대본) 패널 ── */
/* ── 설교 요약(AI) 카드 — 자막 패널 위에 표시 ── */
.ap-summary {
  width: 100%;
  max-width: 520px;
  margin: 10px auto 0;
  padding: 14px 16px;
  border: 1px solid rgba(154, 68, 36, 0.22);
  border-radius: 12px;
  background: rgba(250, 243, 222, 0.6);
}
.ap-summary-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.ap-summary-head strong {
  font-family: var(--font-book, var(--font-body));
  font-size: 14px;
  line-height: 1;
  color: var(--ink, #3a2a16);
}
.ap-summary-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border: 1px solid var(--ink-ghost, rgba(120, 90, 50, 0.25));
  border-radius: 100px;
  font-family: var(--font-label, var(--font-body));
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--on-surface-variant, #8a7a60);
}
.ap-summary-tag.edited {
  color: var(--gold, #a6863f);
  border-color: var(--gold-soft, #c0a25e);
  background: rgba(192, 162, 94, 0.1);
  font-weight: 600;
}
.ap-summary-headline {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--rubric, #9a3118);
}
.ap-summary-points {
  margin: 0 0 8px;
  padding-left: 18px;
}
.ap-summary-points li {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink, #3a2a16);
  margin-bottom: 2px;
}
.ap-summary-apply {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid rgba(52, 40, 26, 0.12);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft, #6b5a40);
}
.ap-summary-apply span {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 100px;
  background: rgba(154, 68, 36, 0.12);
  font-size: 11px;
  font-weight: 700;
  color: var(--rubric, #9a3118);
}

/* 설교 카드 한 줄 요약 */
.s-summary {
  margin: 4px 0 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-faint, #7a6243);
  font-style: italic;
}
.sermon-detail-summary {
  max-width: none;
  margin: 12px 0 0;
}
.sermon-detail-summary-fallback {
  margin-top: 12px;
}

.ap-transcript {
  width: 100%;
  max-width: 520px;
  margin: 4px auto 0;
  padding-top: 12px;
  border-top: 1px solid rgba(52, 40, 26, 0.14);
}
.ap-transcript-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ap-transcript-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ap-transcript-head strong {
  font-family: var(--font-book, var(--font-body));
  font-size: 14px;
  line-height: 1;
  color: var(--ink, #3a2a16);
}
/* 자동 자막 태그·접기 버튼: 같은 높이·정렬의 알약 */
.ap-transcript-tag,
.ap-transcript-toggle {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border: 1px solid var(--ink-ghost, rgba(120, 90, 50, 0.25));
  border-radius: 100px;
  font-family: var(--font-label, var(--font-body));
  letter-spacing: 0.04em;
  line-height: 1;
  background: transparent;
}
.ap-transcript-tag {
  font-size: 10px;
  color: var(--on-surface-variant, #8a7a60);
}
.ap-transcript-toggle {
  font-size: 11px;
  color: var(--ink-soft, #6b5a40);
  cursor: pointer;
}
.ap-transcript-toggle:hover { color: var(--rubric, #9a3118); border-color: var(--rubric, #9a3118); }
.ap-transcript-toggle:hover { color: var(--rubric, #9a3118); border-color: var(--rubric, #9a3118); }
.ap-transcript-body {
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px;
  border-radius: 10px;
  background: rgba(250, 243, 222, 0.5);
}
.ap-seg {
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  opacity: 0.62;
}
.ap-seg:hover { background: rgba(154, 68, 36, 0.07); opacity: 0.85; }
.ap-seg.active {
  opacity: 1;
  background: rgba(154, 68, 36, 0.13);
}
.ap-seg-time {
  flex-shrink: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px;
  color: var(--rubric, #9a3118);
  padding-top: 2px;
  min-width: 42px;
}
.ap-seg.active .ap-seg-time { font-weight: 700; }
.ap-seg-text {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink, #3a2a16);
  word-break: keep-all;
}

.ap-memos {
  width: 100%;
  max-width: 520px;
  margin: 4px auto 0;
  padding-top: 12px;
  border-top: 1px solid rgba(52, 40, 26, 0.14);
}
.ap-memo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ap-memo-title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.ap-memo-head strong {
  font-family: var(--font-label);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.ap-memo-head em {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  font-style: normal;
}
.ap-memo-form {
  display: grid;
  gap: 8px;
}
.ap-memo-input {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  border: 1px solid rgba(52, 40, 26, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 250, 235, 0.58);
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}
.ap-memo-input:focus {
  outline: none;
  border-color: rgba(138, 49, 24, 0.58);
  box-shadow: 0 0 0 3px rgba(138, 49, 24, 0.1);
}
.ap-memo-enter-help {
  color: var(--ink-faint);
  font-family: var(--font-label);
  font-size: 12px;
  line-height: 1.4;
}
.ap-memo-actions,
.ap-memo-buttons {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.ap-memo-actions {
  justify-content: flex-end;
}
.ap-memo-save,
.ap-memo-cancel,
.ap-memo-export,
.ap-memo-buttons button {
  border: 1px solid rgba(138, 49, 24, 0.3);
  border-radius: 999px;
  background: rgba(255, 250, 235, 0.65);
  color: var(--rubric);
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ap-memo-save {
  background: rgba(138, 49, 24, 0.1);
}
.ap-memo-save:hover:not(:disabled),
.ap-memo-cancel:hover,
.ap-memo-export:hover,
.ap-memo-buttons button:hover {
  border-color: var(--rubric);
  background: rgba(138, 49, 24, 0.16);
}
.ap-memo-save:disabled {
  opacity: 0.45;
  cursor: default;
}
.ap-memo-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow-y: auto;
}
.ap-memo-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 250, 235, 0.42);
}
.ap-memo-time {
  border: 1px solid rgba(47, 93, 74, 0.42);
  border-radius: 999px;
  background: rgba(47, 93, 74, 0.08);
  color: #245440;
  cursor: pointer;
  font-family: var(--font-label);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 6px 9px;
}
.ap-memo-time:hover {
  border-color: #2f5d4a;
  background: rgba(47, 93, 74, 0.14);
}
.ap-memo-text {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.ap-memo-empty {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
}
.ap-memo-export-msg {
  margin: 8px 0 0;
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .ap-memo-item {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ap-memo-buttons {
    grid-column: 2;
    justify-content: flex-start;
  }
}
/* ─ 재생 큐(플레이리스트) ─ */
.ap-track {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border: 1px solid var(--ink-ghost); border-radius: 50%;
  background: rgba(255, 250, 235, 0.5); color: var(--ink-soft); cursor: pointer;
  transition: border-color 0.18s, color 0.18s, opacity 0.18s;
}
.ap-track:hover:not(:disabled) { border-color: var(--rubric); color: var(--rubric); }
.ap-track:disabled { opacity: 0.3; cursor: default; }
/* 반복 토글 — 아이콘만으론 상태가 안 보여, 한글 라벨 알약(pill)으로 또렷하게.
   꺼짐=흐린 테두리 / 전체 반복=초록 채움 / 한 곡 반복=브랜드색 채움. */
.ap-repeat {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 15px;
  border: 1px solid var(--ink-ghost); border-radius: 999px;
  background: rgba(255, 250, 235, 0.5); color: var(--ink-faint); cursor: pointer;
  font-family: var(--font-label); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s;
}
.ap-repeat:hover { border-color: var(--rubric); color: var(--rubric); }
.ap-repeat.active.all {
  border-color: rgba(47, 93, 74, 0.55);
  background: rgba(47, 93, 74, 0.14); color: #2f5d4a;
  box-shadow: 0 1px 7px rgba(47, 93, 74, 0.18);
}
.ap-repeat.active.one {
  border-color: rgba(154, 68, 36, 0.5);
  background: rgba(154, 68, 36, 0.13); color: var(--rubric);
  box-shadow: 0 1px 7px rgba(154, 68, 36, 0.18);
}
.ap-repeat-label { line-height: 1; }
/* 미니 플레이어용 컴팩트 반복 토글(전체/한곡) — 같은 색 규칙, 작게. */
.mini-repeat {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 38px; min-width: 38px; padding: 0 11px;
  border: 1px solid var(--ink-ghost); border-radius: 999px;
  background: rgba(255, 250, 235, 0.6); color: var(--ink-faint); cursor: pointer;
  font-family: var(--font-label); font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  white-space: nowrap; flex: 0 0 auto;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}
.mini-repeat:hover { border-color: var(--rubric); color: var(--rubric); }
.mini-repeat.active.all { border-color: rgba(47, 93, 74, 0.55); background: rgba(47, 93, 74, 0.15); color: #2f5d4a; }
.mini-repeat.active.one { border-color: rgba(154, 68, 36, 0.5); background: rgba(154, 68, 36, 0.14); color: var(--rubric); }
.mini-repeat-label { line-height: 1; }
.ap-queue {
  width: 100%; max-width: 520px; margin: 4px auto 0;
  border-top: 1px solid rgba(52, 40, 26, 0.14); padding-top: 10px;
}
.ap-queue-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ap-queue-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(47, 93, 74, 0.42); border-radius: 999px;
  padding: 8px 16px; background: rgba(47, 93, 74, 0.09); cursor: pointer;
  font-family: var(--font-label); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: #245440;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.ap-queue-toggle:hover { background: rgba(47, 93, 74, 0.17); border-color: #2f5d4a; }
.ap-queue-toggle.open { background: rgba(47, 93, 74, 0.16); border-color: #2f5d4a; box-shadow: inset 0 1px 3px rgba(47, 93, 74, 0.18); }
.ap-queue-toggle svg { flex-shrink: 0; }
.ap-queue-toggle em { font-style: normal; font-weight: 700; color: #2f5d4a; }
.ap-caret { font-size: 11px; opacity: 0.7; }
.ap-next {
  font-size: 12px; color: var(--ink-faint); letter-spacing: 0.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px;
}
.ap-queue-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.ap-q-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 2px; border-bottom: 1px solid rgba(52, 40, 26, 0.08);
}
.ap-q-item.current { background: rgba(47, 93, 74, 0.07); border-radius: 6px; }
.ap-q-play {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  border: none; background: none; cursor: pointer; text-align: left; padding: 6px 8px;
}
.ap-q-num {
  flex-shrink: 0; width: 22px; text-align: center;
  font-family: var(--font-label); font-size: 12px; color: var(--ink-faint);
}
.ap-q-item.current .ap-q-num { color: #2f5d4a; font-weight: 700; }
.ap-q-text { min-width: 0; display: flex; flex-direction: column; }
.ap-q-title { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-q-sub { font-size: 11px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-q-actions { flex-shrink: 0; display: flex; gap: 2px; }
.ap-q-actions button {
  width: 28px; height: 28px; border: none; background: none; cursor: pointer;
  color: var(--ink-faint); font-size: 15px; border-radius: 5px;
}
.ap-q-actions button:hover:not(:disabled) { background: rgba(52, 40, 26, 0.08); color: var(--ink); }
.ap-q-actions button:disabled { opacity: 0.25; cursor: default; }
.media-warning {
  margin: 0;
  color: var(--rubric);
  font-size: 13px;
  line-height: 1.55;
}
.media-path-hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(52, 40, 26, 0.14);
  border-radius: 6px;
  background: rgba(255, 250, 235, 0.46);
  color: var(--ink-faint);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}
.media-foot {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-top: 1px solid rgba(52, 40, 26, 0.12);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-faint);
}
.media-foot a {
  color: var(--rubric);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
}

/* ── 헤더 액션 영역(최소화/확대/정지 버튼) ── */
.media-head-text { min-width: 0; }
.media-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mini-play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--rubric); background: var(--rubric); color: var(--paper-0);
  cursor: pointer; flex: 0 0 auto;
}
.mini-play:hover { background: var(--rubric-deep); }

/* ── 미니 플레이어(축소) — 하단 고정 바, 계속 재생 ── */
.media-overlay.minimized {
  pointer-events: none;            /* 페이지를 가리지 않음(뒤 내용 클릭/스크롤 가능) */
  background: transparent;
  align-items: flex-end;
  padding: 0;
}
.media-overlay.minimized .media-frame {
  pointer-events: auto;
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  margin: 0 auto;
  width: auto;
  max-width: 600px;
  height: auto;        /* 모바일 .media-frame.audio 의 고정 height 무력화 — 미니바는 내용 높이만 */
  max-height: none;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(35, 22, 8, 0.42);
  cursor: pointer;   /* 미니 플레이어 전체를 눌러 크게 보기 */
}
/* 미니 플레이어 안의 버튼은 기본 커서 유지 */
.media-overlay.minimized .media-frame button { cursor: pointer; }
.media-overlay.minimized .media-head-text { cursor: pointer; }
.media-overlay.minimized .media-head {
  padding: 10px 10px 10px 16px;
  border-bottom: none;
  align-items: center;
}
.media-overlay.minimized .media-head h3 { font-size: 15px; -webkit-line-clamp: 1; }
.media-overlay.minimized .media-kicker,
.media-overlay.minimized .media-sub { display: none; }   /* 한 줄 바로 압축 */
.media-overlay.minimized .media-head-text { cursor: pointer; }
.media-overlay.minimized .media-audio-body { display: none; }  /* 오디오 컨트롤 접기(오디오 엘리먼트는 계속 재생) */
.media-overlay.minimized .media-close { width: 38px; height: 38px; font-size: 15px; }
/* 영상 미니: 작은 16:9 박스로 우하단 */
.media-overlay.minimized .media-frame.video { max-width: 300px; left: auto; right: 12px; margin: 0; }

/* ── 플레이어 모션(샤라락) ── full↔mini 는 position relative↔fixed 라 위치 모핑이 안 되므로,
   상태가 바뀔 때마다(클래스 토글) 해당 상태의 진입 애니메이션을 재생한다.
   꺼낼 때/펼칠 때 = 떠오르며 등장, 최소화할 때 = 하단 바로 미끄러져 자리잡음. */
.media-overlay:not(.minimized) .media-frame { animation: mediaOpen 0.34s cubic-bezier(.2,.72,.2,1) both; }
.media-overlay.minimized .media-frame { animation: mediaSettle 0.3s cubic-bezier(.2,.72,.2,1) both; }
.media-scrim { animation: mediaScrimIn 0.3s ease both; }
@keyframes mediaOpen { from { opacity: 0; transform: translateY(22px) scale(0.975); } to { opacity: 1; transform: none; } }
@keyframes mediaSettle { from { opacity: 0.35; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes mediaScrimIn { from { opacity: 0; } to { opacity: 1; } }
/* 미니 플레이어 활성 시 콘텐츠 하단 여백 — 푸터가 미니바에 가리지 않게 */
body.kc-mini .stage { padding-bottom: 96px; }
/* 구절 카드바(fixed)가 떠 있을 때도 푸터가 그 뒤로 가리지 않게 하단 여백 확보.
   미니바까지 함께면 미니→카드 2단 높이만큼(176px) 비운다. */
body.kc-versebar .stage { padding-bottom: 96px; }
body.kc-mini.kc-versebar .stage { padding-bottom: 176px; }
/* '위로 가기' 버튼과 미니 플레이어 바의 위치 관계.
   미니바는 max-width 600px(+ 좌우 12px) 라 화면이 좁으면 폭을 꽉 채우고, 넓으면
   가운데로 모여 오른쪽에 빈 공간이 생긴다. 폭이 좁아 버튼이 미니바와 겹치는
   ~768px 이하에서만 버튼을 미니바 위로 올리고, 그보다 넓으면 평소 하단 우측에
   둬서 미니바와 나란히 놓는다(빈 공간에 자연스럽게 자리잡음). */
@media (max-width: 768px) {
  body.kc-mini .scroll-top { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
  /* 구절 공유 카드(verse-card-bar)가 떠 있으면 그 카드 위로 올린다(카드만일 땐 미니와 같은 1단 96px).
     미니바까지 함께 떠 있으면 미니→카드→버튼 순으로 2단(176px) 올려 셋이 겹치지 않게 한다.
     카드를 해제하면 .kc-versebar 가 빠져 미니바만 남은 96px(미니 위)로 자연히 내려온다. */
  body.kc-versebar .scroll-top { bottom: calc(env(safe-area-inset-bottom, 0px) + 96px); }
  body.kc-mini.kc-versebar .scroll-top { bottom: calc(env(safe-area-inset-bottom, 0px) + 176px); }
}

/* ── 설교 필기 미리보기 모달 ── */
.note-frame {
  width: min(620px, 92vw);
  display: flex;
  flex-direction: column;   /* 헤더/본문/푸터 → 본문만 스크롤 */
}
.note-body {
  flex: 1 1 auto;
  min-height: 0;            /* flex 자식 스크롤 핵심 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 22px 20px;
}
.note-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.note-loading { margin: 0; color: var(--ink-faint); font-size: 14px; }
.note-foot span { font-size: 11.5px; line-height: 1.5; }

/* 강해설교 정렬 바 및 강의 뱃지 */
.sermon-sort-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px clamp(26px, 4.5vw, 46px) 8px;
  border-bottom: 1px dashed rgba(52, 40, 26, 0.12);
  margin-bottom: 2px;
}
.sermon-sort-bar .sort-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.sermon-sort-bar .sort-buttons {
  display: flex;
  gap: 6px;
}
.sermon-sort-bar .sort-btn {
  background: transparent;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 3px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  outline: none;
}
.sermon-sort-bar .sort-btn:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
  background: rgba(138, 49, 24, 0.03);
}
.sermon-sort-bar .sort-btn.active {
  background: var(--rubric);
  border-color: var(--rubric);
  color: var(--paper-0);
  box-shadow: 0 1px 5px rgba(138, 49, 24, 0.2);
}

/* 강해설교 탭의 정렬(최신순/강의순) 토글 — 가운데 정렬 */
.expo-sort-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 14px;
}
.expo-sort-bar .sort-label {
  font-family: var(--font-label);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.expo-sort-bar .sort-buttons { display: flex; gap: 6px; }
.expo-sort-bar .sort-btn {
  background: rgba(255, 250, 235, 0.5);
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  padding: 5px 13px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.expo-sort-bar .sort-btn:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}
.expo-sort-bar .sort-btn.active {
  background: var(--rubric);
  border-color: var(--rubric);
  color: var(--paper-0);
  box-shadow: 0 1px 5px rgba(138, 49, 24, 0.2);
}

.sermon .s-lecture-badge {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--rubric);
  background: rgba(154, 68, 36, 0.07);
  border: 1px solid rgba(154, 68, 36, 0.22);
  border-radius: 4px;
  padding: 0px 5px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.4;
}

/* 원드라이브 파일 안내 경로 */
.s-audio-path-guide {
  margin-top: 10px;
  padding: 5px 10px;
  background: rgba(138, 49, 24, 0.04);
  border: 1px dashed rgba(138, 49, 24, 0.15);
  border-left: 3px solid var(--rubric, #8a3118);
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.s-audio-path-guide .guide-icon {
  font-size: 12px;
  opacity: 0.8;
}
.s-audio-path-guide .guide-label {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.s-audio-path-guide .guide-path {
  font-family: var(--font-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sermon:hover .s-audio-path-guide {
  background: rgba(138, 49, 24, 0.07);
  border-color: rgba(138, 49, 24, 0.25);
}

/* 빈 상태 */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--ink-faint);
}
.empty-state .e-mark { font-size: 34px; color: var(--rubric); opacity: 0.5; margin-bottom: 16px; }
.empty-state .e-ko { font-family: var(--font-display); font-size: 24px; color: var(--ink-soft); white-space: nowrap; }
.empty-state .e-en { font-family: var(--font-label); font-style: italic; font-size: 14px; margin-top: 6px; }

/* 로딩 */
.loading {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(360px 360px at 50% 36%, rgba(255, 250, 230, 0.52), transparent 70%),
    linear-gradient(165deg, var(--paper-0), var(--paper-1) 54%, var(--paper-2));
  color: var(--ink-soft);
}
.loading-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
  transform: translateY(-2vh);
}
.loading-logo {
  width: clamp(112px, 26vw, 156px);
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(80, 54, 22, 0.18));
  animation: loadingBreathe 1.8s ease-in-out infinite;
}
.loading-copy {
  display: grid;
  gap: 5px;
}
.loading-kicker {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rubric);
}
.loading-copy strong {
  font-family: var(--font-book);
  font-size: clamp(21px, 5.5vw, 29px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.loading-dots {
  display: inline-flex;
  gap: 7px;
  margin-top: 2px;
}
.loading-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rubric);
  opacity: 0.36;
  animation: loadingDot 1.2s ease-in-out infinite;
}
.loading-dots i:nth-child(2) { animation-delay: 0.16s; }
.loading-dots i:nth-child(3) { animation-delay: 0.32s; }
@keyframes loadingBreathe { 0%,100%{ transform: scale(0.96); opacity: 0.9; } 50%{ transform: scale(1); opacity: 1; } }
@keyframes loadingDot { 0%,100%{ opacity: 0.3; transform: translateY(0); } 50%{ opacity: 0.86; transform: translateY(-3px); } }

/* 푸터 */
.footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
  padding: 34px 20px 52px;
  font-family: var(--font-label);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
}
.footer-logo {
  height: 38px;
  width: auto;
  opacity: 0.72;
  filter: sepia(0.22) drop-shadow(0 2px 5px rgba(80, 54, 22, 0.16));
}
/* 1단 — 브랜드(로고 + 직함) */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.footer-credit {
  margin: 0;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.footer-tagline { margin: 0; }
/* 2단 — 통계(방문수 · 앱 설치) */
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 3px;
  font-style: normal;
}
/* 3단 — 유틸 링크(개인정보 · 관리자) 한 줄로 묶음 */
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 2px;
  font-style: normal;
}
.footer-link {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-decoration: none;
  padding: 2px 2px 1px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.footer-link:hover { color: var(--rubric); border-bottom-color: rgba(138, 49, 24, 0.45); }
.footer-sep { color: var(--ink-ghost); opacity: 0.6; }

/* 출처·라이선스 — 기본 닫힘, 푸터에 조용히 */
.footer-license {
  width: min(560px, 100%);
  margin-top: 6px;
  font-style: normal;
  text-align: left;
}
.footer-license > summary {
  list-style: none;
  cursor: pointer;
  text-align: center;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  opacity: 0.75;
  padding: 4px 8px;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.footer-license > summary::-webkit-details-marker { display: none; }
.footer-license > summary::before { content: "▸ "; opacity: 0.6; }
.footer-license[open] > summary::before { content: "▾ "; }
.footer-license > summary:hover { opacity: 1; color: var(--rubric); }
.footer-license-body {
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(52, 40, 26, 0.14);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.4);
}
.footer-license-body section { margin: 0 0 12px; }
.footer-license-body section:last-child { margin-bottom: 0; }
.footer-license-body h4 {
  margin: 0 0 5px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rubric);
}
.footer-license-body ul {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}
.footer-license-body li {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.footer-license-body strong { color: var(--ink); font-weight: 600; }
.footer-contact {
  font-family: var(--font-body);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--rubric);
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 68, 36, 0.32);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.footer-contact:hover { color: var(--rubric-deep); border-color: var(--rubric); }
.visit-count {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-style: normal;
}
.visit-sep { margin: 0 6px; opacity: 0.5; }
.visit-count em {
  font-style: normal;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.visit-count-btn {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.visit-count-btn:hover { color: var(--ink-soft); background: rgba(154, 68, 36, 0.07); }
.visit-chart-hint { margin-left: 6px; font-size: 11px; opacity: 0.6; }

/* 일별 방문 그래프 팝업 */
.visit-chart-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(28, 18, 8, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.visit-chart-box {
  width: min(520px, 100%);
  background: var(--paper-1, #f0e7d0);
  border: 1px solid rgba(154, 68, 36, 0.25);
  border-radius: 14px;
  padding: 18px 18px 14px;
  box-shadow: 0 20px 50px -14px rgba(40, 26, 10, 0.6);
  font-style: normal;
}
.visit-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.visit-chart-head h3 {
  margin: 0;
  font-family: var(--font-display, var(--font-book));
  font-size: 18px;
  color: var(--ink);
}
.visit-chart-head h3 span {
  margin-left: 8px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.visit-chart-close {
  border: 0;
  background: transparent;
  font-size: 16px;
  color: var(--ink-faint);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.visit-chart-close:hover { color: var(--rubric); }
.visit-chart-empty {
  margin: 18px 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}
/* 그래프 위 기간 요약 — 오늘 · 이번 주(일요일 시작) · 이번 달 */
.visit-chart-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
}
.visit-chart-sum-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 6px 8px;
  border: 1px solid rgba(154, 68, 36, 0.16);
  border-radius: 10px;
  background: rgba(154, 68, 36, 0.05);
}
/* 글씨 크기는 축 라벨(9px)보다 크게 — 큰글씨 보기가 상시 켜진 앱이고, 이 세 수치는
   막대 라벨과 달리 핵심 정보다. 360px 폭 3칸에서도 줄바꿈 없이 들어가는 선. */
.visit-chart-sum-item dt {
  font-family: var(--font-label);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.visit-chart-sum-item dd {
  margin: 0;
  text-align: center;
  line-height: 1.15;
}
.visit-chart-sum-item dd strong {
  font-family: var(--font-display, var(--font-book));
  font-size: 21px;
  font-weight: 600;
  color: var(--rubric, #9a4424);
}
.visit-chart-sum-unit {
  margin-left: 2px;
  font-family: var(--font-label);
  font-size: 11px;
  color: var(--ink-faint);
}
.visit-chart-sum-range {
  display: block;
  margin-top: 2px;
  font-family: var(--font-label);
  font-style: normal;
  font-size: 10px;
  color: var(--ink-faint);
  opacity: 0.85;
  white-space: nowrap;
}
.visit-chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
}
.visit-chart-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  height: 100%;
}
.visit-chart-bar-wrap {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 0;
}
.visit-chart-val {
  font-family: var(--font-label);
  font-size: 9.5px;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.visit-chart-bar {
  width: 70%;
  max-width: 22px;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(var(--rubric, #9a4424), var(--rubric-deep, #7a3118));
}
.visit-chart-xlabel {
  margin-top: 6px;
  font-family: var(--font-label);
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.visit-chart-wlabel {
  margin-top: 1px;
  font-family: var(--font-label);
  font-size: 8.5px;
  color: var(--ink-faint);
  opacity: 0.75;
  white-space: nowrap;
}
.visit-chart-wlabel.weekend {
  color: var(--rubric, #9a4424);
  opacity: 0.95;
}
/* PC(넓은 화면)에서는 일별 방문 팝업을 더 크게 — 막대 위 숫자·날짜·요일이 작아 잘 안 보였음 */
@media (min-width: 760px) {
  .visit-chart-box { width: min(660px, 100%); padding: 24px 26px 20px; }
  .visit-chart-head h3 { font-size: 21px; }
  .visit-chart-summary { gap: 10px; margin-bottom: 20px; }
  .visit-chart-sum-item { padding: 11px 8px 10px; }
  .visit-chart-sum-item dt { font-size: 12px; }
  .visit-chart-sum-item dd strong { font-size: 24px; }
  .visit-chart-sum-unit { font-size: 11.5px; }
  .visit-chart-sum-range { font-size: 10.5px; }
  .visit-chart-bars { height: 210px; gap: 6px; }
  .visit-chart-bar { max-width: 30px; }
  .visit-chart-val { font-size: 13px; margin-bottom: 3px; }
  .visit-chart-xlabel { font-size: 12.5px; margin-top: 8px; }
  .visit-chart-wlabel { font-size: 11.5px; }
}

/* ============================================================
   반응형 — 모바일
   ============================================================ */
@media (max-width: 720px) {
  :root { --spine-gap: 30px; }

  .archive-tabs {
    justify-content: safe center;
    gap: clamp(10px, 3.6vw, 18px);
    padding: 4px 10px 0;
    width: min(100%, calc(100vw - 18px));
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .archive-tabs::-webkit-scrollbar { display: none; }
  .archive-tabs button {
    font-size: clamp(15px, 4vw, 17px);
    padding: 6px 2px 11px;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .share-fab {
    right: calc(env(safe-area-inset-right, 0px) + 8px);
    padding: 7px 12px;
    max-width: calc(100vw - 24px);
  }
  .feed-shell,
  .materials-shell,
  .community-shell,
  .personal-shell {
    width: min(100vw - 22px, 680px);
    margin-top: 4px;
  }
  .recommend-grid {
    grid-template-columns: 1fr;
  }
  .recommend-card {
    min-width: 0;
  }
  .recommend-card h3,
  .recommend-passage,
  .recommend-reason {
    overflow-wrap: anywhere;
  }
  .recommend-actions .s-btn {
    min-width: 0;
  }
  .personal-stat {
    min-height: auto;
  }
  .personal-section-head,
  .personal-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .personal-section-head .home-more,
  .personal-item .s-btn {
    margin-left: 0;
  }
  .personal-item-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
  }
  .personal-memo-line {
    grid-template-columns: 1fr;
  }
  .personal-memo-time.inline {
    justify-self: start;
  }
  .personal-memo-line .personal-memo-text {
    margin-left: 12px;
  }
  .feed-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-top: 14px;
  }
  .feed-meta { justify-content: flex-start; }
  .feed-sermon .sermon {
    padding-top: 10px;
  }
  .home-sermon,
  .home-sermon-main,
  .home .sermon,
  .home .sermon .s-row1,
  .home .sermon .s-row2 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .home .sermon h3 {
    flex: 1 1 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .home .sermon-expo h3,
  .home .sermon-series h3 {
    flex: 1 1 0;
  }
  .home .sermon .s-byline {
    width: 100%;
    margin-left: 0;
    flex: 1 1 100%;
    flex-wrap: wrap;
    row-gap: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .home .sermon .s-passage {
    max-width: 100%;
    white-space: normal;
  }
  .community-grid {
    grid-template-columns: 1fr;
  }

  /* 모바일: 룰을 좌측으로, 책 이름은 우측 한 열 */
  .spine { padding-top: 30px; }
  .spine-rule { left: 30px; }
  .book-tick { left: 30px; }
  .book-row { padding: 7px 0; }
  .book-side.left {
    flex: 0 0 30px;
    justify-content: center;
    padding: 0;
    text-align: center;
  }
  .book-side.left .book-ko, .book-side.left .book-en { display: none; }
  .book-side.left .book-abbr { display: none; }
  .book-side.left .book-dots { display: none; }
  .book-side.right {
    flex: 1;
    padding-left: 26px;
    align-items: center;
    gap: 10px;
  }
  .book-ko { font-size: 21px; }
  .testament-head .tt-label { letter-spacing: 0.34em; }
  /* 그룹 라벨(율법서 등)은 가운데 정렬 — 좌측 정렬 시 척추선에 눌려 찌그러져 보임 */
  .group-head { text-align: center; padding-left: 0; }
  .group-head span {
    padding: 5px 16px;
    letter-spacing: 0.2em;
    max-width: calc(100vw - 40px);
  }
  .group-head .g-ko { letter-spacing: 0.16em; }

  /* 두루마리: 하단에서 위로 펼침 (걸이 족자) — 구약/신약 모두 동일 */
  .scroll-overlay { align-items: stretch; }
  .scroll-overlay.left, .scroll-overlay.right { justify-content: stretch; }
  .scroll-overlay .scroll-paper,
  .scroll-overlay.right .scroll-paper {
    width: 100%;
    height: 92%;
    margin: auto 0 0;
    transform: scaleY(0);
    transform-origin: bottom center;
    transition: transform 0.55s cubic-bezier(.22,.78,.24,1);
    box-shadow: 0 -14px 50px rgba(40,26,8,0.34);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }
  .scroll-overlay.open .scroll-paper { transform: scaleY(1); }
  /* 모바일 스핀들: 상단 가로 막대 */
  .scroll-spindle,
  .scroll-overlay.right .scroll-spindle {
    top: -11px; left: 50%; right: auto;
    transform: translateX(-50%);
    width: 64%; height: 16px;
    border-radius: 8px;
    background: linear-gradient(180deg, #5d3c1b, #8a6230 48%, #4e3214);
  }
  .scroll-spindle::before, .scroll-spindle::after {
    width: 14px; height: 30px;
    top: 50%; bottom: auto;
    transform: translateY(-50%);
  }
  .scroll-spindle::before { left: -8px; }
  .scroll-spindle::after  { left: auto; right: -8px; transform: translateY(-50%); }
  .scroll-inner { transition: opacity 0.3s ease 0.3s; }

  .masthead h1 { font-size: clamp(40px, 13vw, 70px); }
  .filters { gap: 6px; }
  .chip { font-size: 11px; padding: 4px 10px; }
  .sermon-expo,
  .sermon-series {
    padding-left: 30px;
  }
  .sermon .s-expo-mark {
    width: 56px;
  }
  .sermon .s-expo-lecture {
    font-size: 16px;
  }
  /* 원문·음성·영상 버튼: 좁은 강해 카드에서도 한 줄을 유지하고,
     아래 보조 액션과 같은 칸 간격으로 맞춘다. */
  .sermon .s-media {
    align-items: stretch;
    width: max-content;
    max-width: 100%;
  }
  .sermon .s-consume,
  .sermon .s-aux {
    gap: 6px;
  }
  .sermon .s-btn {
    gap: 4px;
    padding-left: 8px;
    padding-right: 8px;
    letter-spacing: 0.04em;
  }
  .sermon .s-share {
    align-self: flex-end;
  }

  /* 모바일 한 줄 노출 대응: 글씨 크기 조절 및 간격 좁히기 */
  html.a11y-large .sermon .s-byline,
  html.a11y-large .sermon .s-byline .who,
  html.a11y-large .sermon .s-byline .when {
    font-size: clamp(12px, 3.5vw, 13.5px) !important;
  }
  .sermon .s-byline {
    gap: 4px;
    flex-wrap: wrap;
    row-gap: 2px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* 큰 화면: 두루마리를 화면 안쪽으로 살짝 들여 배치 */
@media (min-width: 1100px) {
  .scroll-overlay.left  .scroll-paper { margin-left: 6vw; }
  .scroll-overlay.right .scroll-paper { margin-right: 6vw; }
}

.scroll-overlay.open.left .scroll-paper,
.scroll-overlay.open.right .scroll-paper {
  transform: none !important;
}

@media (max-width: 720px) {
  .scroll-overlay.open.left .scroll-paper,
  .scroll-overlay.open.right .scroll-paper {
    transform: none !important;
  }
}

/* ============================================================
   크로스 플랫폼 UI/UX 고도화 최적화 (PC, 태블릿, 모바일)
   ============================================================ */

/* ── 1. 입력창 레이아웃 가드 (Narrow Viewport 방어) ── */
.search input {
  min-width: 0;
  text-overflow: ellipsis;
}

/* ── 2. 태블릿/아이패드 최적화 (721px ~ 1024px) ── */
@media (min-width: 721px) and (max-width: 1024px) {
  /* 두루마리 패널 중앙 대칭 모달 레이아웃 전환 */
  .scroll-overlay {
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
  }
  .scroll-overlay.right {
    justify-content: center !important;
  }

  .scroll-paper, 
  .scroll-overlay.right .scroll-paper {
    width: min(640px, 88vw) !important;
    height: 88% !important;
    max-height: 860px !important;
    margin: auto !important;
    border-radius: 12px !important;
    border: 1px solid var(--paper-edge) !important;
    box-shadow: 0 16px 48px rgba(50, 32, 12, 0.38), 
                inset 0 0 30px rgba(150, 116, 60, 0.05) !important;
    transform-origin: center center !important;
    transform: scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s !important;
  }

  /* 활성화 시 부드러운 스케일업 */
  .scroll-overlay.open.left .scroll-paper,
  .scroll-overlay.open.right .scroll-paper {
    transform: scale(1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    margin: auto !important;
  }

  /* 사이드 나무 목대 바 비활성화 (모달 중앙 배치에 맞춤) */
  .scroll-spindle,
  .scroll-overlay.right .scroll-spindle {
    display: none !important;
  }

  /* 닫기 버튼 정렬 및 touch target 규격화 */
  .scroll-close {
    top: 24px !important;
    right: 24px !important;
    left: auto !important;
    width: 44px !important;
    height: 44px !important;
    font-size: 20px !important;
  }

  /* 터치 타겟 최적화 (Fitts's Law) */
  .chip {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
  .s-btn {
    padding: 6px 14px !important;
    font-size: 12.5px !important;
  }
  .tab {
    padding: 10px 16px 12px !important;
    font-size: 14px !important;
  }
}

/* ── 3. 모바일 가로 모드 최적화 (Landscape) ── */
@media (max-height: 500px) and (max-width: 920px) {
  .scroll-overlay .scroll-paper,
  .scroll-overlay.right .scroll-paper {
    height: 96% !important;
  }
  .scroll-head {
    padding: 10px 20px 8px !important;
  }
  .scroll-head .kicker {
    margin-bottom: 4px !important;
    font-size: 10.5px !important;
  }
  .scroll-head h2 {
    font-size: 26px !important;
    line-height: 0.9 !important;
  }
  .scroll-head .h-en {
    font-size: 12px !important;
    margin-top: 2px !important;
  }
  .scroll-head .h-meta {
    margin-top: 6px !important;
    font-size: 11px !important;
  }
  .scroll-head .h-meta .pill {
    padding: 1px 8px !important;
    font-size: 10.5px !important;
  }
  .tabs {
    margin-top: 8px !important;
  }
  .tab {
    padding: 6px 12px 8px !important;
    font-size: 12.5px !important;
  }
  .series-tabs {
    padding: 6px 20px 2px !important;
  }
  .series-tab {
    padding: 3px 10px !important;
    font-size: 11px !important;
  }
  .sermon-sort-bar {
    padding: 4px 20px 4px !important;
  }
  .sermon-list {
    padding: 4px 20px 24px !important;
  }
  .sermon {
    padding: 10px 4px 10px 24px !important;
  }
  .sermon-expo,
  .sermon-series {
    padding-left: 24px !important;
    min-height: 72px !important;
  }
  .sermon:not(.sermon-detail).sermon-expo,
  .sermon:not(.sermon-detail).sermon-series {
    min-height: 0 !important;
  }
  .sermon .s-expo-mark {
    flex: 0 0 auto;
    width: 48px !important;
    min-height: 42px !important;
  }
  .sermon .s-expo-lecture {
    font-size: 14px !important;
  }
  .sermon h3 {
    font-size: 16px !important;
  }
  .sermon .s-byline {
    width: 100%;
    margin-left: 0;
  }
  .sermon .s-row2 {
    margin-top: 6px !important;
  }
}

/* ── 4. 모바일 세로 모드 필터 칩 — 줄바꿈 정렬(가로 스크롤 폐기) ──
   가로 스크롤 + scroll-snap 은 리렌더/탭 전환 때마다 좌측 패딩(20px)을
   먹으며 행 전체를 왼쪽으로 밀어버린다. 칩 수가 적은 이 필터들(최신순 5개,
   전체/구약/신약 4개)은 가운데 정렬로 자연스럽게 줄바꿈시키는 것이 안정적. */
@media (max-width: 720px) {
  .filters {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: visible !important;
    gap: 8px !important;
    padding: 0 14px 14px !important;
    width: 100% !important;
  }
  .chip {
    flex: 0 0 auto !important;
    font-size: 12px !important;
    padding: 6px 14px !important;
  }
  /* 보조 필터 선반: 모바일에서 가로 패딩 축소 */
  .subfilter-row { padding: 2px 12px 14px; }
  .subfilter-tray { padding: 8px 10px; gap: 6px 7px; }
}

/* ── 5. 터치 기기(Hover 불가 기기) 환경 보정 ── */
@media (hover: none) {
  /* 뚝뚝 끊기는 마우스 위치 추적 광원 대신 중앙 고정형 은은한 밤바다 촛불 효과 */
  .ambient-light {
    background: radial-gradient(
      650px 650px at 50% 30%,
      rgba(255, 250, 230, 0.15),
      rgba(255, 244, 214, 0.04) 40%,
      transparent 70%
    ) !important;
  }

  /* 끈적이는 Hover 효과 무력화 및 초기화 */
  .chip:hover {
    border-color: var(--ink-ghost) !important;
    color: var(--ink-soft) !important;
  }
  .chip.active:hover {
    background: var(--rubric) !important;
    border-color: var(--rubric) !important;
    color: var(--paper-0) !important;
  }
  .book-row:hover .book-tick {
    width: 26px !important;
    background: var(--ink-soft) !important;
  }
  .book-row.empty:hover .book-tick {
    width: 26px !important;
    background: var(--ink-ghost) !important;
  }
  .book-row.selected:hover .book-tick {
    width: 44px !important;
    background: var(--rubric) !important;
    height: 3px !important;
  }
  .sermon:hover h3 {
    color: var(--ink) !important;
  }
  .sermon:hover .s-tag {
    border-color: var(--ink-ghost) !important;
    color: var(--ink-faint) !important;
  }
  .s-btn:hover {
    border-color: var(--ink-ghost) !important;
    color: var(--ink-soft) !important;
    background: transparent !important;
  }
  .s-btn.disabled:hover {
    opacity: 0.34 !important;
  }
  .scroll-close:hover {
    background: rgba(248, 238, 210, 0.6) !important;
    color: var(--ink-soft) !important;
    border-color: var(--ink-ghost) !important;
    transform: none !important;
  }
  .tab:hover {
    color: var(--ink-faint) !important;
  }
  .tab.active:hover {
    color: var(--rubric) !important;
  }
  .series-tab:hover {
    border-color: var(--ink-ghost) !important;
    color: var(--ink-soft) !important;
  }
  .series-tab.first.active:hover {
    border-color: rgba(124, 74, 22, 0.32) !important;
    color: #6d4215 !important;
  }
  .series-tab.second.active:hover {
    border-color: rgba(47, 93, 74, 0.32) !important;
    color: #254a3b !important;
  }
  .sermon-sort-bar .sort-btn:hover {
    border-color: var(--ink-ghost) !important;
    color: var(--ink-soft) !important;
    background: transparent !important;
  }
  .sermon-sort-bar .sort-btn.active:hover {
    background: var(--rubric) !important;
    border-color: var(--rubric) !important;
    color: var(--paper-0) !important;
  }
  .sermon:hover .s-audio-path-guide {
    background: rgba(138, 49, 24, 0.04) !important;
    border-color: rgba(138, 49, 24, 0.15) !important;
  }

  /* 터치 기기용 가벼운 클릭 피드백 (:active) 장착 */
  .sermon:active {
    background: rgba(138, 49, 24, 0.04) !important;
  }
  .s-btn:active {
    background: rgba(138, 49, 24, 0.1) !important;
    border-color: var(--rubric) !important;
  }
  .chip:active {
    background: rgba(52, 40, 26, 0.06) !important;
  }
}

/* 모션 최소화 선호 */
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ============================================================
   큰글씨 보기 (고대비 포함) — 어르신 가독성 모드
   글씨 키우기 + 흐린 보조 텍스트 진하게 + 얇은 획 보강
   ============================================================ */
/* 1) 보조 텍스트 색을 전역으로 진하게(대비↑) */
html.a11y-large {
  --ink-soft: #3c2c1a;
  --ink-faint: #574125;
  --ink-ghost: rgba(40, 30, 18, 0.5);
}
/* 2) 본문/카드 — 핵심 읽을거리 확대
   (반응형 섹션이 !important 를 많이 써서, 접근성 모드도 !important 로 확실히 우선) */
html.a11y-large .masthead .sub { font-size: 18px !important; font-weight: 400 !important; letter-spacing: 0.08em !important; }
html.a11y-large .feed-head h2 { font-size: 30px !important; }
html.a11y-large .feed-head p { font-size: calc(16px * var(--kc-fs)) !important; line-height: 1.6 !important; }
html.a11y-large .section-kicker { font-size: 13px !important; }
html.a11y-large .feed-meta { font-size: 14px !important; }
html.a11y-large .sermon h3 { font-size: calc(22px * var(--kc-fs)) !important; line-height: 1.4 !important; }
html.a11y-large .sermon .s-byline,
html.a11y-large .sermon .s-byline .who,
html.a11y-large .sermon .s-byline .when { font-size: 15px !important; }
html.a11y-large .s-passage,
html.a11y-large .s-passage.expo-passage { font-size: calc(15px * var(--kc-fs)) !important; }
html.a11y-large .sermon .s-series-context { font-size: calc(16px * var(--kc-fs)) !important; line-height: 1.25 !important; }
html.a11y-large .s-type,
html.a11y-large .s-tag { font-size: 13px !important; }
html.a11y-large .s-btn { font-size: 14.5px !important; padding: 8px 16px !important; }
/* 3) 칩·탭·필터 */
html.a11y-large .chip { font-size: 14px !important; padding: 7px 15px !important; }
html.a11y-large .subfilter-tray .chip { font-size: 13px !important; }
/* 서브필터 1차 필터 알약 통일 — .chip 이 아닌 bare 버튼(성경책·시리즈·절기·설교자)도
   같은 큰글씨 규격으로 맞춘다(성경별 OT/NT 칩과 폰트·크기 일치). */
html.a11y-large .subfilter-tray button { font-size: 13px !important; padding: 7px 15px !important; min-height: 36px !important; }
html.a11y-large .subfilter-tray em { font-size: 12px !important; }
html.a11y-large .subfilter-label { font-size: 13px !important; }
html.a11y-large .archive-tabs button { font-size: clamp(18px, 2.2vw, 23px) !important; }
html.a11y-large .util-btn { font-size: 14px !important; }
html.a11y-large .share-fab { font-size: 14px !important; }
html.a11y-large .feed-more { font-size: 15px !important; }
/* 4) 교재·커뮤니티 카드 */
html.a11y-large .material-card h3,
html.a11y-large .community-card h3 { font-size: 20px !important; }
html.a11y-large .material-card p,
html.a11y-large .community-card p,
html.a11y-large .material-meta { font-size: calc(15px * var(--kc-fs)) !important; line-height: 1.6 !important; }
html.a11y-large .material-code { font-size: 16px !important; }
/* 5) 두루마리 설교 패널 */
html.a11y-large .scroll-head h2 { font-size: clamp(34px, 7vw, 48px) !important; }
html.a11y-large .scroll-head .h-meta,
html.a11y-large .scroll-head .h-meta .pill { font-size: 13px !important; }
html.a11y-large .tab { font-size: 15px !important; }
html.a11y-large .sermon-sort-bar,
html.a11y-large .series-tab { font-size: 14px !important; }
html.a11y-large .expo-sort-bar .sort-btn { font-size: 13px !important; }
html.a11y-large .expo-sort-bar .sort-label { font-size: 13px !important; }
/* 6) 검색창·푸터 */
html.a11y-large .search input { font-size: 17px !important; }
html.a11y-large .footer { font-size: 14px !important; }
html.a11y-large .footer-contact,
html.a11y-large .visit-count { font-size: 14px !important; }
html.a11y-large .footer-credit { font-size: 15.5px !important; }
/* 7) 성경 눈금자(성경별) */
html.a11y-large .book-ko { font-size: 23px !important; }
html.a11y-large .book-abbr { font-size: 14px !important; }
html.a11y-large .group-head span { font-size: 13px !important; }
/* 8) 홈(메인) */
html.a11y-large .verse-text { font-size: clamp(calc(18px * var(--kc-fs)), calc(2.5vw * var(--kc-fs)), calc(24px * var(--kc-fs))) !important; }
/* 읽기 본문 배율 추가분 — 댓글·설교 요약·자동 자막(기본 1배라 현행과 동일) */
html.a11y-large .comment-text { font-size: calc(15px * var(--kc-fs)) !important; }
html.a11y-large .s-summary { font-size: calc(13.5px * var(--kc-fs)) !important; }
html.a11y-large .ap-seg-text { font-size: calc(14.5px * var(--kc-fs)) !important; }
html.a11y-large .verse-ref { font-size: 15px !important; }
html.a11y-large .home-more { font-size: 15px !important; }
html.a11y-large .svc-name { font-size: 16.5px !important; }
html.a11y-large .svc-time { font-size: 15px !important; }
html.a11y-large .addr p { font-size: 16px !important; }
html.a11y-large .addr p b { font-size: 13px !important; }

/* ══════════ 행사 — 월력 캘린더 + 날짜 모달 + 앨범 라이트박스 ══════════ */
.events-shell {
  width: min(980px, calc(100vw - 34px));
  margin: 8px auto clamp(44px, 8vh, 88px);
  position: relative;
  z-index: 4;
}
/* 나눔 게시판 딥링크(?focus=fellowship) 착지점 — 고정 메뉴바 아래로 제목이 숨지 않게(.cheer-scroll-anchor 와 같은 값).
   스크롤 위치에만 영향을 주고 레이아웃은 그대로 둔다(.comments 의 margin-top 은 이 빈 래퍼를 통과해 상쇄된다). */
.ev-fellow-anchor { scroll-margin-top: 72px; }
.ev-cal {
  margin-top: 18px;
  background: radial-gradient(120% 90% at 50% 0%, var(--paper-0), var(--paper-1) 60%, var(--paper-2));
  border: 1px solid var(--paper-edge); border-radius: 14px;
  padding: 18px 16px 14px; box-shadow: inset 0 0 60px rgba(122, 98, 67, 0.10);
}
.ev-cal-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 14px; }
.ev-cal-nav {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--ink-ghost); background: var(--paper-0);
  color: var(--ink-soft); font-size: 22px; line-height: 1; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.ev-cal-nav:hover { border-color: var(--rubric); color: var(--rubric); }
.ev-cal-title { text-align: center; min-width: 120px; }
.ev-cal-kicker { display: block; font-family: var(--font-label); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.ev-cal-title strong { display: block; font-family: var(--font-display, var(--font-body)); font-size: 23px; font-weight: 600; color: var(--ink); line-height: 1.15; }
.ev-cal-today {
  display: inline-block; margin-top: 6px; padding: 4px 13px; border-radius: 999px;
  border: 1px solid var(--ink-ghost); background: var(--paper-0); color: var(--ink-soft);
  font-family: var(--font-label); font-size: 12px; letter-spacing: .08em; line-height: 1;
  cursor: pointer; transition: border-color .15s, color .15s, opacity .15s;
}
.ev-cal-today:hover { border-color: var(--rubric); color: var(--rubric); }
.ev-cal-today.is-current { opacity: .42; }
.ev-cal-today.is-current:hover { border-color: var(--ink-ghost); color: var(--ink-soft); }
.ev-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.ev-dow-row { margin-bottom: 5px; }
.ev-dow { text-align: center; font-family: var(--font-label); font-size: 12.5px; letter-spacing: .06em; color: var(--ink-faint); padding-bottom: 2px; }
.ev-dow.sun { color: var(--rubric); }
.ev-cell { min-height: 64px; background: var(--paper-0); border: 1px solid var(--ink-ghost); border-radius: 7px; padding: 5px 6px; position: relative; }
.ev-cell-empty { background: transparent; border: 1px dashed rgba(122, 98, 67, 0.16); }
.ev-cell-adj { background: var(--paper-0); border-color: rgba(122, 98, 67, 0.18); opacity: .82; }
.ev-cell-adj .ev-num { opacity: .78; }
.ev-cell-has { cursor: pointer; transition: border-color .15s, background .15s; }
.ev-cell-has:hover { border-color: var(--rubric); background: var(--paper-1); }
.ev-cell-has:focus-visible { outline: 2px solid var(--rubric); outline-offset: 1px; }
.ev-num { font-family: var(--font-label); font-size: 14.5px; color: var(--ink-soft); }
.ev-cell-sun .ev-num { color: var(--rubric); }
.ev-marks { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.ev-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.ev-dot-min { background: var(--gold); }
.ev-dot-ev { background: var(--rubric); }
.ev-dot-gal { background: var(--ink-faint); }
.ev-dot-period { background: #3f6b54; }
.ev-event-photos { margin-top: 8px; max-width: 160px; }
.ev-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-family: var(--font-body); font-size: 12.5px; color: var(--ink-faint); }
.ev-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ev-loading, .ev-empty { margin: 22px auto; text-align: center; font-family: var(--font-body); font-size: 14px; color: var(--ink-faint); }

/* 캘린더 하단 '이번 달 일정' 목록(어젠다) — 점 캘린더 보완, 클릭하면 기존 날짜 모달로 */
.ev-agenda { margin-top: 26px; display: flex; flex-direction: column; gap: 8px; }
.ev-agenda-title { font-family: var(--font-label); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--rubric); margin-bottom: 2px; }
.ev-agenda-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 12px 14px; border: 1px solid var(--ink-ghost); border-radius: 11px;
  background: var(--paper-0); cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.ev-agenda-row:hover { border-color: var(--gold-soft); background: var(--paper-1); }
.ev-agenda-date { flex: 0 0 auto; width: 44px; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.ev-agenda-dnum { font-family: var(--font-display, var(--font-body)); font-size: 22px; font-weight: 600; color: var(--ink); }
.ev-agenda-dow { font-family: var(--font-body); font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; }
.ev-agenda-date.sun .ev-agenda-dnum, .ev-agenda-date.sun .ev-agenda-dow { color: var(--rubric); }
.ev-agenda-items { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-left: 14px; border-left: 1px solid var(--ink-ghost); }
.ev-agenda-item { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.ev-agenda-text { font-family: var(--font-book, var(--font-body)); font-size: 14.5px; font-weight: 500; color: var(--ink); word-break: keep-all; }
.ev-agenda-meta { font-family: var(--font-body); font-size: 12.5px; color: var(--ink-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ev-agenda-go { flex: 0 0 auto; color: var(--ink-ghost); font-size: 20px; line-height: 1; }
.ev-agenda-row:hover .ev-agenda-go { color: var(--gold); }
.ev-day-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(40, 28, 12, 0.46); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.ev-day-panel {
  width: min(100%, 420px); max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain;
  background: radial-gradient(120% 80% at 50% 0%, var(--paper-0), var(--paper-1) 70%);
  border: 1px solid var(--paper-edge); border-radius: 14px;
  padding: 20px 20px 18px; box-shadow: 0 18px 50px rgba(40, 28, 12, 0.4);
}
.ev-day-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ev-day-nav {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--ink-ghost); background: var(--paper-0);
  color: var(--ink-soft); font-size: 20px; line-height: 1; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.ev-day-nav:hover { border-color: var(--rubric); color: var(--rubric); }
.ev-day-nav:focus-visible { outline: 2px solid var(--rubric); outline-offset: 1px; }
.ev-day-when { flex: 1 1 auto; min-width: 0; text-align: center; }
.ev-day-kicker { display: block; font-family: var(--font-label); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.ev-day-when strong { display: block; font-family: var(--font-display, var(--font-body)); font-size: 21px; font-weight: 600; color: var(--ink); }
.ev-day-when strong em { font-style: normal; color: var(--rubric); font-size: 16px; }
.ev-day-close { border: none; background: none; color: var(--ink-faint); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 2px; }
.ev-day-close:hover { color: var(--rubric); }
.ev-sec { margin-top: 16px; }
.ev-sec-label { display: block; font-family: var(--font-label); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--rubric); margin-bottom: 7px; }
.ev-min-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dotted var(--ink-ghost); font-family: var(--font-body); font-size: 15px; }
.ev-min-row:last-child { border-bottom: none; }
.ev-min-role { color: var(--ink-faint); }
.ev-min-name { color: var(--ink); font-weight: 500; }
.ev-min-note { font-family: var(--font-body); font-size: 13px; color: var(--ink-faint); padding: 0 0 8px; margin-top: -2px; line-height: 1.4; }
.ev-ev-row { padding: 9px 0; border-bottom: 1px dotted var(--ink-ghost); }
.ev-ev-row:last-child { border-bottom: none; }
.ev-ev-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-ev-title > span { font-family: var(--font-book, var(--font-body)); font-size: 15.5px; font-weight: 500; color: var(--ink); }
.ev-chip { font-family: var(--font-label); font-size: 12px; color: var(--rubric-deep); border: 1px solid var(--gold-soft); border-radius: 999px; padding: 2px 10px; background: var(--paper-0); }
.ev-ev-meta { margin-top: 3px; font-family: var(--font-body); font-size: 13px; color: var(--ink-faint); }
.ev-ev-desc { margin-top: 4px; font-family: var(--font-body); font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); word-break: keep-all; }
.ev-ev-link { display: inline-block; margin-top: 6px; font-family: var(--font-label); font-size: 13px; color: var(--rubric); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.ev-gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ev-gal-thumb { border: 1px solid var(--ink-ghost); border-radius: 9px; overflow: hidden; background: var(--paper-2); cursor: pointer; padding: 0; text-align: left; display: flex; flex-direction: column; }
.ev-gal-thumb:hover { border-color: var(--rubric); }
.ev-gal-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.ev-gal-ph { width: 100%; aspect-ratio: 1; background: var(--paper-3); display: block; }
.ev-gal-cap { font-family: var(--font-body); font-size: 11.5px; color: var(--ink-soft); padding: 5px 7px; line-height: 1.3; word-break: keep-all; }
.ev-day-none { font-family: var(--font-body); font-size: 14px; color: var(--ink-faint); }
.ev-viewer-nav { display: flex; justify-content: space-between; margin-top: 6px; }
.ev-viewer-nav button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.35); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.ev-viewer-nav button:hover { background: rgba(0,0,0,.6); }

/* ── 오늘 강조 — 달력 격자·일정 목록 (붉은 잉크로 '오늘'을 동그라미 친 느낌) ── */
.ev-cell-today { border-color: var(--rubric); background: var(--paper-1); box-shadow: inset 0 0 0 1.5px var(--rubric), inset 0 0 24px rgba(154, 68, 36, 0.06); }
.ev-cell-today .ev-num { color: var(--rubric); font-weight: 600; }
.ev-agenda-row.is-today { border-color: var(--rubric); background: rgba(154, 68, 36, 0.045); }
.ev-agenda-row.is-today .ev-agenda-dnum { color: var(--rubric); }
.ev-agenda-today { font-family: var(--font-label); font-size: 10.5px; letter-spacing: .12em; color: var(--rubric); margin-top: 1px; }
/* 지난 일정(이번 달·오늘 이전) — 기본 접힘 토글 + 펼치면 흐리게. 다가올 일정에 집중되게. */
.ev-agenda-past { display: flex; flex-direction: column; gap: 8px; }
.ev-agenda-past-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 9px 14px; border: 1px dashed var(--ink-ghost); border-radius: 11px;
  background: transparent; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.ev-agenda-past-toggle:hover { border-color: var(--gold-soft); background: var(--paper-1); }
.ev-agenda-past-caret { color: var(--ink-faint); font-size: 12px; line-height: 1; transition: transform .18s ease; }
.ev-agenda-past.open .ev-agenda-past-caret { transform: rotate(180deg); }
.ev-agenda-past-label { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.ev-agenda-past-hint { margin-left: auto; font-family: var(--font-label); font-size: 10.5px; letter-spacing: .1em; color: var(--ink-faint); }
.ev-agenda-row.is-past { opacity: .5; }
.ev-agenda-row.is-past:hover { opacity: .72; }
.ev-agenda-allpast { font-family: var(--font-body); font-size: 13px; color: var(--ink-faint); padding: 4px 2px; margin: 0; }

/* ── 이번 주 날씨 — 7일 예보(광명), 오늘 칸 강조. 달력 바로 아래. ── */
/* 날씨 — 달력 셀(이번 주 7일) 글리프: 숫자=좌상단, 날씨=우상단 한 줄, 일정 점은 그 아래 */
.ev-cell-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 3px; }
.ev-wx-mini { display: inline-flex; flex-direction: column; align-items: center; gap: 0; flex: 0 0 auto; color: var(--ink-soft); line-height: 0; }
.ev-wx-mini.wx-clear { color: var(--gold); }
.ev-wx-mini.wx-rain, .ev-wx-mini.wx-thunder { color: #4f7a88; }
.ev-wx-mini svg { width: 16px; height: 16px; }
.ev-wx-mini-drop { display: inline-flex; color: #4f7a88; margin-top: -1px; }
.ev-wx-mini-drop svg { width: 8px; height: 10px; }

/* 날짜 모달 — 날씨 상세(최고/최저 기온·강수) */
.ev-wx-detail-row { display: flex; align-items: center; gap: 12px; }
.ev-wx-detail-glyph { display: inline-flex; flex: 0 0 auto; color: var(--ink-soft); }
.ev-wx-detail-glyph.wx-clear { color: var(--gold); }
.ev-wx-detail-glyph svg { width: 30px; height: 30px; }
.ev-wx-detail-main { display: flex; flex-direction: column; gap: 1px; }
.ev-wx-detail-main strong { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink); }
.ev-wx-detail-temp { font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); }
.ev-wx-detail-precip { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-body); font-size: 12.5px; color: #46707e; }
.ev-wx-detail-precip svg { width: 11px; height: 13px; flex: 0 0 auto; }

@media (max-width: 560px) {
  .ev-cal { padding: 14px 10px 12px; }
  .ev-grid { gap: 3px; }
  .ev-cell { min-height: 50px; padding: 4px 4px; border-radius: 6px; }
  .ev-num { font-size: 13px; }
  .ev-dot { width: 6px; height: 6px; }
  .ev-marks { gap: 3px; margin-top: 4px; }
  .ev-cal-title strong { font-size: 20px; }
  .ev-gal-grid { grid-template-columns: repeat(2, 1fr); }
  .ev-agenda-row { gap: 11px; padding: 10px 11px; }
  .ev-agenda-date { width: 38px; }
  .ev-agenda-dnum { font-size: 19px; }
  .ev-agenda-items { padding-left: 11px; }
  .ev-agenda-text { font-size: 13.5px; }
  .ev-agenda-go { display: none; }
  .ev-cell-top { gap: 2px; }
  .ev-wx-mini svg { width: 13.5px; height: 13.5px; }
  .ev-wx-mini-drop svg { width: 7px; height: 9px; }
}

/* ══════════ 퀵링크 — 안내 빠른 링크 ══════════ */

/* 공유 버튼으로 진입했을 때 해당 교재 카드 잠깐 강조 */
@keyframes materialFlash {
  0% { box-shadow: 0 0 0 2px rgba(154, 68, 36, 0); }
  25% { box-shadow: 0 0 0 2px rgba(154, 68, 36, 0.5); background: rgba(154, 68, 36, 0.1); }
  100% { box-shadow: 0 8px 26px rgba(70, 44, 18, 0.06); }
}
.material-card.material-flash { animation: materialFlash 1.6s ease; }

/* 담임목사 소개 — 사진 + 교회 정체성 요약 카드(안내 탭, 공지와 '교회 안내' 사이) */
.pastor-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(18px, 2.6vw, 30px);
  align-items: start;
  border: 1px solid var(--ink-ghost);
  border-radius: 14px;
  background: rgba(248, 238, 210, 0.42);
  box-shadow: 0 8px 26px rgba(70, 44, 18, 0.06);
  padding: clamp(18px, 2.6vh, 28px) clamp(18px, 2.4vw, 26px);
}
.pastor-portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--ink-ghost);
  background: rgba(255, 250, 235, 0.4);
}
.pastor-portrait-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pastor-portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(160deg, rgba(166, 134, 63, 0.12), rgba(154, 68, 36, 0.08));
  color: var(--rubric);
}
.pastor-portrait-mark { font-size: 34px; line-height: 1; }
.pastor-portrait-sub {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.pastor-body { min-width: 0; }
.pastor-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  color: var(--ink);
}
.pastor-role {
  margin-left: 6px;
  font-family: var(--font-label);
  font-size: 0.6em;
  letter-spacing: 0.08em;
  color: var(--rubric);
}
.pastor-verse {
  margin: 10px 0 16px;
  padding-left: 12px;
  border-left: 2px solid var(--gold-soft);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  font-style: italic;
  color: var(--rubric-deep);
}
.pastor-verse-ref {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.pastor-greeting p {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
}
.pastor-greeting p:last-child { margin-bottom: 0; }
.pastor-points {
  list-style: none;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed rgba(52, 40, 26, 0.18);
}
.pastor-points li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(52, 40, 26, 0.12);
}
.pastor-points li:last-child { border-bottom: 0; padding-bottom: 0; }
.pastor-points b { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--ink); }
.pastor-points span { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 640px) {
  .pastor-card { grid-template-columns: 1fr; gap: 18px; }
  .pastor-portrait { max-width: 200px; margin: 0 auto; }
}
html.a11y-large .pastor-name { font-size: 28px !important; }
html.a11y-large .pastor-verse,
html.a11y-large .pastor-greeting p { font-size: 16px !important; }
html.a11y-large .pastor-points b { font-size: 15px !important; }
html.a11y-large .pastor-points span { font-size: 14px !important; }

/* 탭 공유 버튼 — 각 탭 헤더 우측. 그 탭으로 바로 들어오는 링크를 복사(카톡·밴드 공유용) */
.tab-share {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--rubric-deep);
  background: rgba(154, 68, 36, 0.08);
  border: 1px solid rgba(154, 68, 36, 0.28);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.tab-share:hover { background: rgba(154, 68, 36, 0.14); border-color: rgba(154, 68, 36, 0.5); }
.tab-share:active { transform: translateY(1px); }
.tab-share:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }
.tab-share .glyph { font-size: 13px; line-height: 1; }
html.a11y-large .tab-share { font-size: 13.5px !important; }
/* 홈은 헤더가 없어 상단 우측에 공유 버튼만 한 줄로 */
.home-share-row { display: flex; justify-content: flex-end; margin: 0 0 10px; }

/* ============================================================
   개인화 설정 패널 (나의 말씀 > 개인화 설정)
   글씨 크기·글꼴을 내 눈에 맞게. 이 기기(localStorage)에 저장.
   ============================================================ */
.view-settings-desc {
  margin: 2px 0 16px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.view-settings-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(52, 40, 26, 0.1);
}
.view-settings-label {
  flex: 0 0 64px;
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}
.view-settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* 어르신 가독성: 넉넉한 터치 타깃·또렷한 활성 표시. 본문 글꼴로 한글 가독성 우선. */
.vs-opt {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink-ghost);
  border-radius: 100px;
  color: var(--ink-soft);
  background: rgba(248, 238, 210, 0.5);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.vs-opt:hover { border-color: var(--ink-faint); color: var(--ink); }
.vs-opt.active {
  background: var(--rubric);
  border-color: var(--rubric);
  color: var(--paper-0);
  box-shadow: 0 2px 8px rgba(138, 49, 24, 0.28);
}
/* 글꼴 버튼은 각자 해당 글꼴로 미리 보이게 */
.vs-opt--serif { font-family: var(--font-body); }
.vs-opt--gothic { font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif; }
.vs-opt--batang { font-family: 'Gowun Batang', 'Noto Serif KR', serif; }
.view-settings-sample {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(250, 243, 222, 0.55);
  border: 1px solid rgba(52, 40, 26, 0.1);
  font-family: var(--font-body);
  font-size: calc(17px * var(--kc-fs));
  line-height: 1.7;
  color: var(--ink);
}
.view-settings-sample .vs-sample-ref {
  display: block;
  margin-top: 6px;
  font-size: calc(13px * var(--kc-fs));
  color: var(--ink-faint);
}

/* ── 알림 설정(나의 말씀) — 종류별 개인 토글 ── */
.notif-settings-msg {
  margin: 2px 0 0; font-family: var(--font-body); font-size: 14.5px; line-height: 1.6; color: var(--ink-soft);
}
.notif-settings-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.notif-toggle {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; border: 1px solid var(--ink-ghost); border-radius: 12px;
  background: rgba(250, 243, 222, 0.5); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.notif-toggle:hover { border-color: var(--gold-soft); background: var(--paper-1); }
.notif-toggle-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif-toggle-label { font-family: var(--font-book, var(--font-body)); font-size: 15.5px; font-weight: 600; color: var(--ink); }
.notif-toggle-desc { font-family: var(--font-body); font-size: 12.5px; line-height: 1.4; color: var(--ink-faint); }
.notif-toggle-switch {
  flex: 0 0 auto; position: relative; width: 46px; height: 27px; border-radius: 999px;
  background: rgba(52, 40, 26, 0.18); transition: background 0.18s ease;
}
.notif-toggle-knob {
  position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28); transition: transform 0.18s ease;
}
.notif-toggle.on .notif-toggle-switch { background: #2f5d4a; }
.notif-toggle.on .notif-toggle-knob { transform: translateX(19px); }
/* 재방문 초대 시각 — 그 토글이 켜졌을 때만 바로 아래 붙는다(들여쓰기로 종속 관계를 보인다) */
.notif-revisit-hour {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -4px 0 0 16px; padding: 10px 14px;
  border: 1px dashed var(--ink-ghost); border-radius: 10px;
  background: rgba(250, 243, 222, 0.35);
}
.notif-revisit-hour-label { font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); }
.notif-revisit-hour select {
  flex: 0 0 auto; padding: 6px 10px; border: 1px solid var(--ink-ghost); border-radius: 8px;
  background: var(--paper-1); font-family: var(--font-body); font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.notif-settings-off {
  margin-top: 14px; align-self: flex-start;
  background: none; border: none; padding: 4px 2px; cursor: pointer;
  font-family: var(--font-label); font-size: 12.5px; letter-spacing: 0.04em;
  color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px;
}
.notif-settings-off:hover { color: var(--rubric); }
.notif-settings-enable { margin-top: 4px; }

/* ── 7월 시상 이벤트(공동체 탭) ── */
.kc-awards {
  margin: 16px 0 4px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--gold-soft);
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(192, 162, 94, 0.16), transparent 60%),
    linear-gradient(170deg, var(--paper-0), var(--paper-1) 55%, var(--paper-2));
  box-shadow: inset 0 0 60px rgba(166, 134, 63, 0.08), 0 2px 10px rgba(52, 40, 26, 0.06);
}
.kc-awards-hero { text-align: center; padding: 4px 4px 12px; }
.kc-awards-kicker { font-family: var(--font-label); font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.kc-awards-hero h3 { font-family: var(--font-display, var(--font-body)); font-size: 20px; font-weight: 700; color: var(--ink); margin: 5px 0 7px; }
.kc-awards-hero p { font-family: var(--font-body); font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); margin: 0 auto; max-width: 33em; }
.kc-awards-hero strong { color: var(--ink); font-weight: 600; }

/* ── 이달의 영광(MonthlyHonors) — 관리자가 발표한 시상 결과, 회원 공개. 부문별 Top 3 + 베스트 댓글 ── */
.kc-honors {
  margin-top: 12px;
  padding: 14px 13px 12px;
  border-radius: 13px;
  border: 1px solid var(--gold-soft);
  background: rgba(192, 162, 94, 0.07);
}
.kc-honors-cap {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-display, var(--font-body));
  font-size: 16px; font-weight: 700; color: var(--ink);
  margin-bottom: 11px;
}
.kc-honors-trophy { font-size: 18px; }
.kc-honors-stage { margin-left: 5px; padding: 1px 8px; border-radius: 9px; font-size: 11.5px; font-weight: 700; color: #fff; background: #c0392b; letter-spacing: -.01em; }   /* 중간 집계=빨강(이미지 배지와 동일) */
.kc-honors-stage.is-final { background: #2e8a3a; }   /* 최종 시상자=초록 */
.kc-honors-share { margin-left: auto; }   /* 이달의 영광 캡 오른쪽에 공유 버튼 정렬 */
.kc-honors-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.kc-honors-grid + .kc-honors-grid { margin-top: 9px; }   /* 부문 그리드와 마일스톤·숨은기능 그리드가 붙지 않게 간격(best·foot 여백과 통일) */
@media (max-width: 480px) { .kc-honors-grid { grid-template-columns: 1fr; } }
.kc-honor {
  padding: 10px 11px; border-radius: 11px;
  border: 1px solid var(--ink-ghost); background: rgba(250, 243, 222, 0.6);
}
.kc-honor-h { display: flex; align-items: baseline; gap: 6px; margin-bottom: 7px; }
.kc-honor-h b { font-family: var(--font-display, var(--font-body)); font-size: 13.5px; font-weight: 700; color: var(--ink); }
.kc-honor-h span { font-family: var(--font-body); font-size: 11px; color: var(--ink-faint); }
.kc-honor-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.kc-honor-row { display: flex; align-items: center; gap: 7px; }
.kc-honor-medal { flex-shrink: 0; width: 18px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.kc-honor-row .comment-avatar { width: 22px; height: 22px; font-size: 11px; flex-shrink: 0; }
.kc-honor-name { flex: 1 1 auto; min-width: 0; font-family: var(--font-body); font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-honor-row.is-first .kc-honor-name { font-weight: 600; }
.kc-honor-val { flex-shrink: 0; font-family: var(--font-label); font-size: 12px; font-weight: 700; color: var(--gold); }
.kc-honor-best {
  margin-top: 9px; padding: 11px 12px; border-radius: 11px;
  border: 1px solid var(--gold-soft);
  background: linear-gradient(170deg, rgba(192, 162, 94, 0.1), rgba(192, 162, 94, 0.04));
}
.kc-honor-best-by { display: flex; align-items: center; gap: 7px; margin: 7px 0 6px; }
.kc-honor-best-by .comment-avatar { width: 24px; height: 24px; font-size: 12px; flex-shrink: 0; }
.kc-honor-best-by b { font-family: var(--font-body); font-size: 13px; color: var(--ink); }
.kc-honor-like { margin-left: auto; flex-shrink: 0; font-family: var(--font-label); font-size: 12px; font-weight: 700; color: var(--gold); }
.kc-honor-best-text { font-family: var(--font-body); font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin: 0; white-space: pre-wrap; word-break: break-word; }
.kc-honors-foot { margin: 11px 0 1px; font-family: var(--font-body); font-size: 11.5px; line-height: 1.5; color: var(--ink-faint); text-align: center; }

.poll-camp {
  margin-top: 12px;
  padding: 13px 13px 12px;
  border-radius: 13px;
  border: 1px solid var(--ink-ghost);
  background: rgba(250, 243, 222, 0.5);
}
.poll-camp-head { display: flex; align-items: flex-start; gap: 10px; }
.poll-badge {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display, var(--font-body)); font-size: 15px; font-weight: 700;
  color: var(--paper-0); background: linear-gradient(var(--gold), var(--gold-soft));
}
.poll-camp-headtext h4 { font-family: var(--font-display, var(--font-body)); font-size: 16px; font-weight: 600; color: var(--ink); margin: 1px 0 3px; }
.poll-camp-headtext p { font-family: var(--font-body); font-size: 12.5px; line-height: 1.55; color: var(--ink-faint); margin: 0; }

/* 예고(미리보기) 카드 — 제목만 노출, 참여 잠김. 시작까지 남은 일수(D-day)와 오픈 안내. */
.poll-camp.is-upcoming { border-style: dashed; background: rgba(192, 162, 94, 0.06); }
.poll-dday {
  display: inline-block; margin-left: 7px; vertical-align: middle;
  font-family: var(--font-label); font-size: 10.5px; letter-spacing: .06em; font-weight: 700;
  color: var(--paper-0); background: linear-gradient(var(--gold), var(--gold-soft));
  padding: 2px 7px; border-radius: 999px;
}
.poll-upcoming {
  margin-top: 10px; padding: 8px 11px; border-radius: 9px;
  font-family: var(--font-body); font-size: 12.5px; line-height: 1.5;
  color: var(--ink-soft); background: rgba(192, 162, 94, 0.1); border: 1px solid var(--gold-soft);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.poll-upcoming-lock { flex-shrink: 0; }
.poll-upcoming strong { color: var(--ink); font-weight: 700; }

.poll-form { display: flex; gap: 7px; margin-top: 11px; align-items: stretch; }
.poll-input {
  flex: 1; min-width: 0; font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--paper-0); border: 1px solid var(--ink-ghost); border-radius: 9px; padding: 8px 11px; resize: vertical;
}
.poll-input:focus { outline: none; border-color: var(--gold-soft); box-shadow: 0 0 0 2px rgba(192, 162, 94, 0.2); }
.poll-input::placeholder { color: var(--ink-ghost); }
.poll-submit { flex-shrink: 0; align-self: flex-start; }
.poll-login { margin-top: 11px; }

.poll-vote-status {
  margin-top: 10px; padding: 7px 11px; border-radius: 8px;
  font-family: var(--font-body); font-size: 12.5px; line-height: 1.5;
  background: rgba(122, 98, 67, 0.07); color: var(--ink-faint);
}
.poll-vote-status.can { background: rgba(166, 134, 63, 0.12); color: var(--ink-soft); border: 1px solid var(--gold-soft); }
.poll-closed { margin-top: 10px; font-family: var(--font-body); font-size: 12.5px; color: var(--ink-faint); }
.poll-msg { margin-top: 9px; font-family: var(--font-body); font-size: 12.5px; color: var(--rubric, #9a4424); }
.poll-loading, .poll-empty { margin-top: 11px; font-family: var(--font-body); font-size: 13px; color: var(--ink-faint); text-align: center; padding: 8px 0; }

.poll-list { list-style: none; margin: 11px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.poll-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: 10px;
  border: 1px solid var(--ink-ghost); background: var(--paper-0);
}
.poll-item.is-myvote { border-color: var(--gold-soft); box-shadow: inset 0 0 0 1px var(--gold-soft); background: rgba(192, 162, 94, 0.08); }
.poll-item.is-hidden { opacity: 0.5; }
.poll-rank {
  flex-shrink: 0; width: 20px; text-align: center;
  font-family: var(--font-display, var(--font-body)); font-size: 14px; font-weight: 700; color: var(--gold);
}
.poll-item:nth-child(n+4) .poll-rank { color: var(--ink-ghost); }
.poll-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.poll-text { font-family: var(--font-body); font-size: 14px; line-height: 1.4; color: var(--ink); word-break: break-word; }
/* 목록에선 한 줄 요약(…)만 — 전체 내용·댓글은 '자세히 보기'로 연다 */
.poll-text-btn { display: block; width: 100%; text-align: left; padding: 0; margin: 0; background: none; border: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poll-text-btn:hover { color: var(--rubric, #9a4424); }
.poll-detail-open { background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-body); font-size: 11.5px; color: var(--rubric, #9a4424); white-space: nowrap; }
.poll-detail-open:hover { text-decoration: underline; }
/* 제안 상세 모달 — 전체 내용 + 댓글(토론) */
.verse-card-box.poll-detail-modal { max-width: 480px; align-items: stretch; background: rgba(250, 243, 222, 0.98); border: 1px solid var(--ink-ghost, rgba(52,40,26,.28)); border-radius: 16px; padding: 18px; box-shadow: 0 18px 50px -12px rgba(0,0,0,.55); max-height: 88vh; display: flex; flex-direction: column; }
.poll-detail-head { display: flex; align-items: center; margin-bottom: 10px; }
.poll-detail-kicker { font-family: var(--font-label); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold, #a6863f); }
.poll-detail-close { margin-left: auto; background: none; border: none; font-size: 22px; line-height: 1; color: var(--ink-faint); cursor: pointer; padding: 0 4px; }
.poll-detail-close:hover { color: var(--rubric, #9a4424); }
.poll-detail-scroll { overflow-y: auto; flex: 1; min-height: 0; }
.poll-detail-text { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; word-break: break-word; margin: 0 0 10px; }
.poll-detail-meta { display: flex; align-items: center; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid rgba(52,40,26,.12); margin-bottom: 4px; }
.poll-detail-meta .comment-avatar { width: 22px; height: 22px; font-size: 11px; }
.poll-detail-by { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.poll-detail-votes { margin-left: auto; font-size: 12.5px; color: var(--ink-faint); }
.poll-detail-done { margin-top: 12px; width: 100%; }
.poll-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; row-gap: 3px; }
.poll-meta .comment-avatar { width: 17px; height: 17px; font-size: 9px; flex-shrink: 0; }
.poll-by { font-family: var(--font-body); font-size: 11.5px; color: var(--ink-faint); }
.poll-tag { font-family: var(--font-label); font-size: 9.5px; letter-spacing: .04em; padding: 1px 5px; border-radius: 6px; }
.poll-tag-mine { color: var(--paper-0); background: var(--gold-soft); }
.poll-tag-hidden { color: var(--rubric, #9a4424); border: 1px solid currentColor; }
.poll-votes { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1; min-width: 30px; }
.poll-votes b { font-family: var(--font-display, var(--font-body)); font-size: 16px; font-weight: 700; color: var(--ink); }
.poll-votes i { font-family: var(--font-label); font-size: 9.5px; font-style: normal; color: var(--ink-faint); margin-top: 2px; }
.poll-vote-btn {
  flex-shrink: 0; font-family: var(--font-label); font-size: 11px; letter-spacing: .08em;
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
  color: var(--paper-0); background: linear-gradient(var(--gold), var(--gold-soft)); border: none;
}
.poll-vote-btn:hover:not(:disabled) { filter: brightness(1.05); }
.poll-vote-btn.voted { color: var(--ink-soft); background: transparent; border: 1px solid var(--gold-soft); }
.poll-vote-btn:disabled { cursor: default; }
.poll-vote-btn:disabled:not(.voted) { color: var(--ink-ghost); background: transparent; border: 1px solid var(--ink-ghost); }
.poll-del {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1;
  color: var(--ink-faint); background: transparent; border: 1px solid var(--ink-ghost);
}
.poll-del:hover { color: var(--rubric, #9a4424); border-color: currentColor; }
.poll-total { margin-top: 9px; font-family: var(--font-body); font-size: 11.5px; color: var(--ink-faint); text-align: right; }
.kc-awards-teaser {
  margin-top: 14px; padding: 22px 16px; border-radius: 13px; text-align: center;
  border: 1px dashed var(--gold-soft); background: rgba(192, 162, 94, 0.07);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.kc-awards-teaser-lock { font-size: 26px; }
.kc-awards-teaser strong { font-family: var(--font-display, var(--font-body)); font-size: 17px; color: var(--ink); }
.kc-awards-teaser span:last-child { font-family: var(--font-body); font-size: 13px; color: var(--ink-faint); }

.kc-awards-auto {
  margin-top: 14px; padding: 13px 14px;
  border-radius: 13px; border: 1px dashed var(--gold-soft);
  background: rgba(250, 243, 222, 0.4);
}
.kc-awards-auto-tag {
  display: inline-block; font-family: var(--font-label); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper-0); background: var(--gold); padding: 2px 9px; border-radius: 7px; margin-bottom: 8px;
}
.kc-awards-auto > p { font-family: var(--font-body); font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 9px; }
.kc-awards-auto > p strong { color: var(--ink); font-weight: 600; }
.kc-awards-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.kc-awards-cats li {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 10px;
  border-radius: 9px; background: var(--paper-0); border: 1px solid var(--ink-ghost);
}
.kc-awards-cats li b { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ink); }
.kc-awards-cats li span { font-family: var(--font-body); font-size: 11px; color: var(--ink-faint); line-height: 1.4; }
.kc-awards-note { font-family: var(--font-body); font-size: 11.5px; color: var(--ink-faint); margin: 9px 0 0; text-align: center; }

@media (max-width: 520px) {
  .kc-awards { padding: 14px 11px 12px; }
  .poll-form { flex-direction: column; }
  .poll-submit { align-self: stretch; }
  .kc-awards-cats { grid-template-columns: 1fr; }
}

/* ── 앱 사용법 — 실제 화면을 담은 짧은 영상 안내(안내 탭 > 앱 사용법) ────────────── */
.howto-list { display: grid; gap: 12px; }

.howto-card {
  border: 1px solid rgba(52, 40, 26, 0.16);
  background: rgba(248, 238, 210, 0.34);
  box-shadow: 0 8px 26px rgba(70, 44, 18, 0.06);
  overflow: hidden;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.howto-card.open {
  border-color: var(--paper-edge);
  background: rgba(248, 238, 210, 0.62);
}
.howto-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.howto-head:focus-visible { outline: 2px solid var(--rubric); outline-offset: -3px; }
.howto-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 100px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(52, 40, 26, 0.18);
  background: var(--paper-2);
}
.howto-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.howto-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #f6efdd;
  background: rgba(52, 40, 26, 0.3);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}
.howto-text { display: grid; gap: 4px; min-width: 0; }
.howto-text strong { font-family: var(--font-book); font-size: 16px; color: var(--ink); line-height: 1.35; }
.howto-text span { font-size: 13px; line-height: 1.6; color: var(--ink-faint); }

.howto-player { display: grid; justify-items: center; gap: 8px; padding: 0 14px 14px; }
.howto-video {
  display: block;
  width: 100%;
  max-width: 292px;
  height: auto;
  border: 1px solid rgba(52, 40, 26, 0.2);
  border-radius: 9px;
  background: var(--paper-2);
  box-shadow: 0 12px 32px rgba(70, 44, 18, 0.16);
}
.howto-hint { margin: 0; font-size: 12px; color: var(--ink-faint); }
.howto-foot { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-faint); }

/* 홈 상단 안내 카드 — 설치 배너(fixed, top:0)와 겹치지 않게 흐름 안에 둔다 */
.howto-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  padding: 13px 14px;
  border: 1px solid var(--paper-edge);
  background: rgba(248, 238, 210, 0.5);
  box-shadow: 0 8px 24px rgba(70, 44, 18, 0.07);
}
.howto-banner-text { display: grid; gap: 3px; min-width: 0; }
.howto-banner-text strong { font-family: var(--font-book); font-size: 15px; color: var(--ink); }
.howto-banner-text span { font-size: 12.5px; line-height: 1.55; color: var(--ink-faint); }
.howto-banner-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.howto-banner-btn {
  padding: 7px 13px;
  border: 1px solid var(--rubric);
  border-radius: 999px;
  background: rgba(154, 68, 36, 0.08);
  color: var(--rubric);
  font-family: var(--font-body);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.howto-banner-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-faint);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.howto-banner-btn:focus-visible,
.howto-banner-close:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }

.monthly-certificate-status {
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-faint);
}
.monthly-certificate-list { display: grid; gap: 9px; margin-top: 14px; }
.monthly-certificate-card {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 72px;
  gap: 11px;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid var(--paper-edge);
  background: linear-gradient(135deg, rgba(251, 246, 231, 0.96), rgba(239, 226, 190, 0.58));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(70, 44, 18, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.monthly-certificate-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(166, 134, 63, 0.36);
  pointer-events: none;
}
.monthly-certificate-card:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 10px 21px rgba(70, 44, 18, 0.12); }
.monthly-certificate-card:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; }
.monthly-certificate-card-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(166, 134, 63, 0.52);
  border-radius: 50%;
  color: var(--rubric);
  background: rgba(255, 250, 236, 0.62);
  flex: 0 0 auto;
}
.monthly-certificate-card-copy { position: relative; z-index: 1; display: grid; min-width: 0; gap: 2px; }
.monthly-certificate-card-copy span { font-family: var(--font-label); font-size: 10.5px; letter-spacing: 0.06em; color: var(--gold); }
.monthly-certificate-card-copy strong { font-family: var(--font-book); font-size: 17px; line-height: 1.35; color: var(--ink); word-break: keep-all; }
.monthly-certificate-card-open { position: relative; z-index: 1; margin-left: auto; font-family: var(--font-label); font-size: 11px; color: var(--rubric); white-space: nowrap; }
.monthly-certificate-overlay { padding: 18px; }
.monthly-certificate-modal { position: relative; width: min(520px, 100%); }
.monthly-certificate-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(88, 49, 37, 0.22);
  border-radius: 50%;
  background: rgba(255, 250, 236, 0.88);
  color: var(--rubric);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(40, 26, 10, 0.14);
}
.monthly-certificate-close:hover { background: var(--paper-0); color: var(--rubric-deep); }
.monthly-certificate-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.monthly-certificate {
  position: relative;
  aspect-ratio: 1003 / 1536;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(250, 245, 228, 0.99), rgba(238, 223, 183, 0.9));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.38);
  isolation: isolate;
}
.monthly-certificate::before,
.monthly-certificate::after { content: ""; position: absolute; pointer-events: none; }
.monthly-certificate::before { inset: 14px; border: 1px solid rgba(166, 134, 63, 0.82); }
.monthly-certificate::after { inset: 20px; border: 1px solid rgba(166, 134, 63, 0.39); }
.monthly-certificate-logo {
  position: absolute;
  z-index: 0;
  top: 8%;
  left: 50%;
  width: 52%;
  max-height: 27%;
  object-fit: contain;
  opacity: 0.105;
  transform: translateX(-50%);
  filter: sepia(0.28) saturate(0.78);
  pointer-events: none;
}
.monthly-certificate-corner {
  position: absolute;
  z-index: 1;
  width: clamp(48px, 13vw, 74px);
  height: clamp(48px, 13vw, 74px);
  color: rgba(166, 134, 63, 0.72);
  pointer-events: none;
}
.monthly-certificate-corner-tl { top: 19px; left: 19px; }
.monthly-certificate-corner-tr { top: 19px; right: 19px; transform: scaleX(-1); }
.monthly-certificate-corner-bl { bottom: 19px; left: 19px; transform: scaleY(-1); }
.monthly-certificate-corner-br { right: 19px; bottom: 19px; transform: scale(-1); }
.monthly-certificate-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100%;
  padding: 29% clamp(30px, 7vw, 52px) 42px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  word-break: keep-all;
}
.monthly-certificate-date { margin: 0; font-family: var(--font-label); font-size: clamp(11px, 2.4vw, 15px); letter-spacing: 0.16em; color: var(--ink-soft); }
.monthly-certificate-rule { width: 54px; height: 1px; margin: 12px 0 13px; background: var(--gold); }
.monthly-certificate-kicker { margin: 0 0 7px; font-family: var(--font-label); font-size: clamp(10px, 2.2vw, 13px); letter-spacing: 0.24em; color: var(--gold); }
.monthly-certificate h3 { margin: 0; font-family: var(--font-book); font-size: clamp(31px, 7.3vw, 51px); font-weight: 600; line-height: 1.12; color: var(--rubric-deep); letter-spacing: -0.045em; }
/* 상장의 등급(금상·은상·동상) 글자 뒤에 깔리는 메달 무늬. isolation 으로 쌓임 맥락을 만들어
   z-index:-1 이 상장 배경까지 뚫고 내려가지 않게 하고, 글자만 그 위에 뜨게 한다.
   레이아웃에 영향을 주지 않도록 절대배치 — 제목 줄 간격·줄바꿈은 무늬가 없을 때와 같다. */
.certificate-grade { position: relative; display: inline-block; isolation: isolate; }
.certificate-grade-medal {
  /* 등급 글자 한가운데에서 자기 크기의 1/5 만큼 오른쪽·아래로 비켜 놓는다 — 정중앙에 두면
     상단 로고 워터마크와 축이 겹쳐 두 무늬가 한자리에서 뭉쳐 보인다. */
  position: absolute; left: 50%; top: 50%; transform: translate(-30%, -30%);
  z-index: -1; font-size: 1.76em; line-height: 1; opacity: 0.22;
  pointer-events: none; user-select: none;
}
.monthly-certificate-ornament { margin: 12px 0 16px; color: var(--gold); font-size: 17px; line-height: 1; }
.monthly-certificate-citation { max-width: 24em; margin: 0; font-family: var(--font-body); font-size: clamp(14px, 3.1vw, 19px); line-height: 1.72; color: var(--ink); }
.monthly-certificate-recipient { margin-top: clamp(22px, 5.2vw, 34px); font-family: var(--font-book); font-size: clamp(25px, 5.8vw, 39px); font-weight: 600; color: var(--ink); }
.monthly-certificate-encouragement { max-width: 24em; margin: 14px 0 0; font-family: var(--font-body); font-size: clamp(11.5px, 2.45vw, 15px); line-height: 1.65; color: var(--ink-soft); }
.monthly-certificate-church { margin: clamp(48px, 13vw, 88px) 0 0; font-family: var(--font-label); font-size: clamp(12px, 2.5vw, 16px); letter-spacing: 0.22em; color: var(--rubric); }
.monthly-certificate-seal {
  position: absolute;
  z-index: 1;
  right: 9%;
  bottom: 13%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(47px, 11vw, 74px);
  height: clamp(47px, 11vw, 74px);
  border: 2px solid rgba(255, 239, 206, 0.75);
  border-radius: 50%;
  background: var(--rubric);
  color: rgba(255, 243, 214, 0.94);
  box-shadow: inset 0 0 0 3px rgba(101, 42, 29, 0.42), 0 4px 12px rgba(69, 31, 19, 0.22);
  transform: rotate(-11deg);
}
.monthly-certificate-seal span { font-family: var(--font-display); font-size: clamp(19px, 4.8vw, 31px); line-height: 1; }
.monthly-certificate-seal i { position: absolute; bottom: 10px; font-family: var(--font-label); font-size: 7px; font-style: normal; letter-spacing: 0.04em; }

@media (max-width: 520px) {
  .monthly-certificate-overlay { align-items: flex-start; padding: 16px 12px; }
  .monthly-certificate-modal { width: min(100%, 390px); margin: auto 0; }
  .monthly-certificate-copy { padding-top: 28%; }
  .monthly-certificate-card-open { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .monthly-certificate-card { transition: none; }
}

/* ── 성취 알림 모달 — 마일스톤 환영·숨은 기능 발견·월간 상장 완료 공용 ──
   상장(monthly-certificate)과 같은 종이·먹색·금선 언어를 쓰되, 상장 자체가 아니라
   '알림'이므로 훨씬 작고 조용하게. 실제 상장은 여기서 '상장 보러 가기'로 넘어가 본다. */
.achv-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 18, 8, 0.52);
  backdrop-filter: blur(2px);
  animation: achv-fade 160ms ease-out;
}
.achv-card {
  position: relative;
  width: min(380px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 26px 22px 20px;
  text-align: center;
  border: 1px solid rgba(166, 134, 63, 0.45);
  border-radius: 16px;
  background: var(--paper, #fbf6e8);
  box-shadow: 0 18px 48px rgba(30, 18, 6, 0.3);
  animation: achv-rise 200ms cubic-bezier(0.2, 0.8, 0.3, 1);
}
.achv-card::before {   /* 안쪽 금선 — 상장 테두리와 같은 결 */
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(166, 134, 63, 0.28);
  border-radius: 11px;
  pointer-events: none;
}
.achv-emoji { display: block; font-size: 40px; line-height: 1; }
.achv-title {
  margin: 12px 0 0;
  font-family: var(--font-book);
  font-size: 19px;
  line-height: 1.4;
  color: var(--rubric);
  word-break: keep-all;
}
.achv-body {
  margin: 9px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  word-break: keep-all;
}
.achv-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.achv-btn {
  min-height: 44px;
  padding: 0 18px;
  font-family: var(--font-label);
  font-size: 13px;
  color: var(--ink);
  border: 1px solid rgba(88, 49, 37, 0.22);
  border-radius: 10px;
  background: rgba(255, 250, 236, 0.9);
  cursor: pointer;
}
.achv-btn-primary { color: #fff; border-color: transparent; background: var(--rubric); }
.achv-btn:hover { border-color: rgba(166, 134, 63, 0.6); }
@keyframes achv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes achv-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .achv-backdrop, .achv-card { animation: none; }
}

@media (max-width: 520px) {
  .howto-banner { flex-direction: column; align-items: stretch; }
  .howto-banner-actions { justify-content: space-between; }
  .howto-banner-btn { flex: 1; }
}
