:root {
  --bg: #FAF7F1;
  --surface: #FFFFFF;
  --paper: #F5EFE3;
  --line: #E7DFCF;
  --line-strong: #D4C8B2;
  --ink: #1E222B;
  --ink-2: #525866;
  --ink-3: #838996;
  --rose: #C43662;
  --rose-deep: #A1274E;
  --rose-soft: #FDF1F5;
  --rose-line: #F2C7D6;
  --gold: #9A7228;
  --gold-soft: #F9F3E6;
  --gold-line: #DFC896;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(30, 34, 43, 0.045);
  --shadow-md: 0 10px 28px rgba(30, 34, 43, 0.08);
  --serif: 'Gowun Batang', 'Batang', Georgia, serif;
  --sans: 'Noto Sans KR', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: var(--fs);
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.72;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

body.has-music-bar {
  padding-bottom: calc(174px + env(safe-area-inset-bottom));
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* 상단 바 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 3px solid var(--rose);
  border-bottom: 1px solid var(--line);
}

.topbar-in {
  max-width: 780px;
  margin: 0 auto;
  height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 28px;
  width: auto;
  flex: none;
}

.brand-sep {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
  flex: none;
}

.brand-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.06rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .topbar-in {
    padding: 0 12px;
    gap: 6px;
  }
  .brand {
    gap: 7px;
  }
  .brand-logo {
    height: 22px;
  }
  .brand-sep {
    height: 16px;
  }
  .brand-title {
    font-size: 0.96rem;
  }
  .topbar.in-topic .brand-logo,
  .topbar.in-topic .brand-sep {
    display: none;
  }
  .topbar.in-topic .brand-title {
    font-size: 1.06rem;
  }
}

.top-acts {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.icon-btn:hover {
  background: var(--paper);
  color: var(--ink);
}

.back-btn {
  margin-left: -6px;
  color: var(--ink);
}

.font-btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.font-btn small {
  font-size: 0.72em;
  margin-left: 1px;
}

.main-view {
  max-width: 780px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

/* 공통 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.12s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-rose {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196, 54, 98, 0.22);
}

.btn-rose:hover {
  background: var(--rose-deep);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-outline {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

.btn-soft {
  background: var(--paper);
  color: var(--ink);
}

.btn-soft:hover {
  background: var(--line);
}

.btn-sm {
  padding: 7px 12px;
  font-size: 0.8rem;
  border-radius: 9px;
}

.btn-text {
  padding: 6px 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
}

/* ===========================
   오늘(홈) 화면
   =========================== */
.greeting-block {
  padding: 6px 2px 18px;
}

.greeting-date {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}

.greeting-title {
  font-family: var(--serif);
  font-size: 1.56rem;
  line-height: 1.38;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}

.greeting-sub {
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* 마음 체크인 */
.checkin-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.checkin-head {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}

.mood-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mood-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.16s var(--ease);
}

.mood-pill:hover {
  border-color: var(--rose);
  background: var(--rose-soft);
  color: var(--rose-deep);
}

/* 오늘의 말씀 히어로 카드 */
.daily-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  background: #232833;
}

.daily-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.daily-card-scrim {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(16, 20, 28, 0.38) 0%, rgba(16, 20, 28, 0.62) 55%, rgba(16, 20, 28, 0.82) 100%);
  padding: 24px 22px 22px;
  color: #fff;
}

.daily-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.daily-pill {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #FFF6E6;
}

.daily-verse {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.88;
  color: #FFFFFF;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
  margin-bottom: 14px;
}

.daily-ref {
  font-size: 0.84rem;
  color: #F6DFBA;
  font-weight: 600;
  margin-bottom: 18px;
}

.daily-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  flex-wrap: wrap;
}

.daily-med-preview {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.88);
  flex: 1;
  min-width: 200px;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.32);
}

/* 섹션 머리글 */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 2px 12px;
}

.sec-head h2 {
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--ink);
}

.sec-head p {
  font-size: 0.8rem;
  color: var(--ink-3);
}

/* 12개 주제 일러스트 카드 그리드 */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

@media (min-width: 640px) {
  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
  }
}

.topic-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3.15;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(30, 34, 43, 0.08);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.topic-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.topic-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.topic-card:hover img {
  transform: scale(1.04);
}

.topic-card-in {
  position: relative;
  z-index: 1;
  padding: 14px 14px 13px;
  background: linear-gradient(180deg, rgba(16, 18, 24, 0.02) 0%, rgba(16, 18, 24, 0.56) 52%, rgba(16, 18, 24, 0.84) 100%);
  color: #fff;
}

.topic-card-title {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.28;
  margin-bottom: 3px;
}

.topic-card-sub {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 오늘의 묵상·실천 요약 바 */
.journey-strip {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.journey-strip-text strong {
  font-family: var(--serif);
  font-size: 0.98rem;
  display: block;
  margin-bottom: 2px;
}

.journey-strip-text span {
  font-size: 0.82rem;
  color: var(--ink-2);
}

/* ===========================
   주제 상세 페이지 (5단계 영적 여정)
   =========================== */
.topic-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-md);
}

.topic-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-hero-in {
  position: relative;
  z-index: 1;
  padding: 24px 22px 22px;
  background: linear-gradient(180deg, rgba(16, 20, 28, 0.42) 0%, rgba(16, 20, 28, 0.78) 100%);
  color: #fff;
}

.topic-group-tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #FFF4DF;
  margin-bottom: 10px;
}

.topic-hero h1 {
  font-family: var(--serif);
  font-size: 1.72rem;
  line-height: 1.3;
  margin-bottom: 6px;
}

.topic-hero p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
}

.topic-hero-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 주제 내 흐름 바로가기 바 */
.flow-nav {
  position: sticky;
  top: 58px;
  z-index: 20;
  margin: 0 -16px 16px;
  padding: 9px 16px;
  background: rgba(250, 247, 241, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.flow-nav::-webkit-scrollbar {
  display: none;
}

.flow-nav a {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.flow-nav a:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

/* 섹션 공통 */
.stage-sec {
  margin-bottom: 24px;
  scroll-margin-top: 118px;
}

.stage-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stage-title {
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.stage-step {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--topic-soft, var(--rose-soft));
  color: var(--topic-accent, var(--rose));
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}

/* =========================================================
   ① 말씀 카드뉴스 (핵심 시그니처: 말씀 영역 vs 묵상 영역 명확 분리)
   ========================================================= */
.ver-switch {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
}

.ver-switch button {
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 8px;
  transition: all 0.15s var(--ease);
}

.ver-switch button.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.cardnews-wrap {
  position: relative;
}

.cardnews-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.cardnews-track::-webkit-scrollbar {
  display: none;
}

.v-card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

/* 상단: 성경 말씀 영역 (분위기 이미지 + 고대비 세리프) */
.v-card-scripture {
  position: relative;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 22px 24px;
  color: #FFFFFF;
  background-color: var(--topic-deep, #1E2534);
  background-size: cover;
  background-position: center;
}

.v-card-scripture::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.50) 0%, rgba(14, 18, 26, 0.66) 65%, rgba(14, 18, 26, 0.80) 100%);
}

.v-card-scripture > * {
  position: relative;
  z-index: 1;
}

.v-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 18px;
}

.v-card-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #FFF7E8;
}

.v-card-num {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.v-card-text {
  font-family: var(--serif);
  font-size: 1.24rem;
  line-height: 1.9;
  color: #FFFFFF;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
  margin-bottom: 18px;
}

.v-card-citation {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #F7E1BE;
  font-weight: 600;
}

.v-card-citation::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: #E8C589;
  flex: none;
}

/* 하단: 묵상 글 & 묵상 질문 영역 (시각적 완벽 구분) */
.v-card-meditation {
  background: var(--surface);
  padding: 20px 22px 18px;
  border-top: 3px solid var(--topic-accent, var(--gold));
}

.v-med-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--topic-accent, var(--gold));
  margin-bottom: 6px;
}

.v-med-body {
  font-size: 0.94rem;
  line-height: 1.78;
  color: var(--ink);
  margin-bottom: 14px;
}

.v-question-box {
  background: var(--topic-soft, var(--gold-soft));
  border-left: 3px solid var(--topic-accent, var(--gold));
  border-radius: 0 12px 12px 0;
  padding: 13px 15px;
  margin-bottom: 14px;
}

.v-question-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--topic-accent, var(--gold));
  margin-bottom: 4px;
}

.v-question-text {
  font-size: 0.91rem;
  line-height: 1.68;
  color: var(--ink);
  font-weight: 500;
}

.v-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cardnews-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 4px;
}

.card-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: all 0.2s var(--ease);
}

.card-dot.on {
  width: 24px;
  background: var(--topic-accent, var(--rose));
}

.card-nav-btns {
  display: flex;
  gap: 6px;
}

.card-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--ink-2);
}

.card-nav-btn:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
}

/* =========================================================
   ② 인용문 (책 · 설교 출처 명확 표기 + 원본 링크)
   ========================================================= */
.quote-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 15px;
  box-shadow: var(--shadow-sm);
}

.quote-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.src-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}

.src-badge.book {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-line);
}

.src-badge.sermon {
  background: var(--rose-soft);
  color: var(--rose-deep);
  border: 1px solid var(--rose-line);
}

.quote-body {
  font-family: var(--serif);
  font-size: 0.99rem;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 12px;
}

.quote-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--paper);
  flex-wrap: wrap;
}

.quote-source {
  font-size: 0.81rem;
  color: var(--ink-2);
}

.quote-source strong {
  color: var(--ink);
  font-weight: 700;
}

/* =========================================================
   ③ 사랑하는교회 설교 & 쇼츠
   ========================================================= */
.seg-tabs {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 3px;
  margin-bottom: 12px;
}

.seg-tabs button {
  padding: 6px 14px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-2);
  border-radius: 8px;
}

.seg-tabs button.on {
  background: var(--surface);
  color: var(--rose-deep);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.media-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .media-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.media-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.media-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1B1F27;
  overflow: hidden;
  cursor: pointer;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(16, 18, 24, 0.22);
  transition: background 0.16s var(--ease);
}

.media-thumb:hover .media-play-badge {
  background: rgba(16, 18, 24, 0.36);
}

.media-play-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(196, 54, 98, 0.92);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.media-kind-pill {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}

.media-body {
  padding: 13px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.media-speaker {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--rose-deep);
  margin-bottom: 3px;
}

.media-title {
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.44;
  color: var(--ink);
  margin-bottom: 6px;
}

.media-desc {
  font-size: 0.82rem;
  color: var(--ink-2);
  line-height: 1.56;
  margin-bottom: 12px;
  flex: 1;
}

.media-acts {
  display: flex;
  gap: 6px;
}

/* 치유사역 핸드북 연동 배너 */
.companion-banner {
  margin-top: 12px;
  background: linear-gradient(135deg, #ECF5F1 0%, #F9F5EB 100%);
  border: 1px solid #C6DED4;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.companion-banner strong {
  font-family: var(--serif);
  font-size: 1rem;
  color: #164437;
  display: block;
  margin-bottom: 2px;
}

.companion-banner p {
  font-size: 0.83rem;
  color: #365C50;
}

/* =========================================================
   ④ 기도하기 (선포 기도문 + 기도 시작/음악 자동 재생 + 내 기도 적기)
   ========================================================= */
.prayer-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: var(--shadow-sm);
}

.prayer-start-bar {
  background: var(--topic-soft, var(--rose-soft));
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 15px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.prayer-start-info strong {
  font-size: 0.94rem;
  color: var(--ink);
  display: block;
  margin-bottom: 2px;
}

.prayer-start-info span {
  font-size: 0.79rem;
  color: var(--ink-2);
}

.timer-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.timer-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
}

.timer-pill.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.prayer-box {
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  border-radius: 15px;
  padding: 18px 18px 15px;
  margin-bottom: 16px;
}

.prayer-box-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prayer-text {
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.98;
  color: #2E2412;
  white-space: pre-line;
  margin-bottom: 14px;
}

.prayer-steps {
  margin-bottom: 18px;
}

.prayer-steps-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.prayer-step-item {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 0.87rem;
  color: var(--ink-2);
  line-height: 1.6;
}

.prayer-step-num {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
}

.my-prayer-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.my-prayer-form label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.my-prayer-form textarea {
  width: 100%;
  min-height: 82px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  resize: vertical;
  font-size: 0.91rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.my-prayer-form textarea:focus {
  outline: none;
  border-color: var(--rose);
  background: var(--surface);
}

/* =========================================================
   ⑤ 오늘의 작은 실천
   ========================================================= */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  width: 100%;
  transition: all 0.16s var(--ease);
}

.action-item.done {
  background: #F2F8F4;
  border-color: #BBD8C5;
}

.action-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 2px;
  color: #fff;
  transition: all 0.16s var(--ease);
}

.action-item.done .action-check {
  background: #236B4A;
  border-color: #236B4A;
}

.action-text {
  font-size: 0.91rem;
  color: var(--ink);
  line-height: 1.62;
}

.action-item.done .action-text {
  color: #2B5942;
}

/* =========================================================
   ⑥ 천국의 도서관 추천 도서
   ========================================================= */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.book-card {
  display: flex;
  gap: 15px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.book-cover {
  width: 82px;
  height: 118px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--paper);
  border: 1px solid var(--line);
  flex: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.book-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.book-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.book-shelf {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: #EDF4F0;
  color: #1F5B41;
}

.book-truth {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--gold-soft);
  color: var(--gold);
}

.book-title {
  font-family: var(--serif);
  font-size: 1.01rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.38;
  margin-bottom: 2px;
}

.book-author {
  font-size: 0.79rem;
  color: var(--ink-3);
  margin-bottom: 8px;
}

.book-reason {
  font-size: 0.86rem;
  color: var(--ink-2);
  line-height: 1.6;
  background: var(--bg);
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.book-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.book-price {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}

.book-price del {
  font-weight: 400;
  color: var(--ink-3);
  font-size: 0.78rem;
  margin-right: 4px;
}

/* =========================================================
   기도실 탭 & 구글 드라이브 음원 연동
   ========================================================= */
.sanctuary-hero {
  background: linear-gradient(150deg, #271934 0%, #442959 60%, #6D426C 100%);
  color: #fff;
  border-radius: 22px;
  padding: 24px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
}

.sanctuary-hero h1 {
  font-family: var(--serif);
  font-size: 1.56rem;
  margin-bottom: 6px;
}

.sanctuary-hero p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 16px;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 600;
  color: #FCE9C8;
  margin-bottom: 14px;
}

.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6EE7B7;
}

.source-dot.ambient {
  background: #FCD34D;
}

.sanctuary-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.vol-control-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.vol-row-lg {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.vol-row-lg input[type="range"],
.mb-vol-row input[type="range"] {
  flex: 1;
  accent-color: var(--rose);
  height: 5px;
  cursor: pointer;
}

.mood-filter-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}

.mood-filter-row::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
}

.chip-btn.on {
  background: var(--rose);
  color: #fff;
  border-color: var(--rose);
}

.track-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 20px;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
  width: 100%;
}

.track-item.playing {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.track-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  flex: none;
}

.track-item.playing .track-icon {
  background: var(--rose);
  color: #fff;
}

.track-meta {
  flex: 1;
  min-width: 0;
}

.track-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-folder {
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* 구글 드라이브 연동 설정 아코디언 */
.drive-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.drive-box summary {
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drive-box summary::-webkit-details-marker {
  display: none;
}

.drive-inner {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.field-group {
  margin-bottom: 14px;
}

.field-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--ink);
}

.field-group input[type="text"],
.field-group input[type="url"],
.field-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  font-size: 0.87rem;
}

.field-help {
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.55;
  margin-top: 6px;
}

/* =========================================================
   나의 기록 탭
   ========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
}

.stat-num {
  font-family: var(--serif);
  font-size: 1.48rem;
  font-weight: 700;
  color: var(--rose-deep);
}

.stat-lbl {
  font-size: 0.76rem;
  color: var(--ink-2);
}

.journal-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 10px;
}

.journal-item.answered {
  background: #F3F8F5;
  border-color: #C2DEC9;
}

.journal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.journal-text {
  font-size: 0.93rem;
  color: var(--ink);
  line-height: 1.68;
  white-space: pre-line;
  margin-bottom: 10px;
}

.journal-acts {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  padding: 30px 18px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--ink-2);
  font-size: 0.88rem;
}

/* =========================================================
   플로팅 기도음악 미니바
   ========================================================= */
.music-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 35;
  max-width: 760px;
  margin: 0 auto;
  background: rgba(29, 32, 42, 0.96);
  backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 16px;
  padding: 10px 14px 9px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.mb-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mb-eq {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
  width: 14px;
  flex: none;
}

.mb-eq span {
  flex: 1;
  background: #F4A6BD;
  border-radius: 2px;
  height: 5px;
}

.mb-eq.on span:nth-child(1) { animation: eq 0.9s infinite ease-in-out; }
.mb-eq.on span:nth-child(2) { animation: eq 0.7s infinite ease-in-out 0.2s; }
.mb-eq.on span:nth-child(3) { animation: eq 1.1s infinite ease-in-out 0.1s; }

@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 15px; }
}

.mb-info {
  flex: 1;
  min-width: 0;
}

.mb-title {
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mb-sub {
  font-size: 0.71rem;
  color: rgba(255, 255, 255, 0.7);
}

.mb-timer {
  font-size: 0.76rem;
  font-weight: 700;
  color: #F7D794;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.mb-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mb-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: grid;
  place-items: center;
}

.mb-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.mb-vol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mb-mute {
  color: rgba(255, 255, 255, 0.82);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
}

.mb-vol-val {
  font-size: 0.71rem;
  color: rgba(255, 255, 255, 0.72);
  width: 32px;
  text-align: right;
}

/* 하단 탭 바 */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
}

.tabbar button {
  flex: 1;
  padding: 8px 0 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-3);
}

.tabbar svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabbar button.on {
  color: var(--rose-deep);
  font-weight: 700;
}

.tabbar button.on svg {
  stroke-width: 2.2;
}

/* 푸터 */
.app-foot {
  max-width: 780px;
  margin: 0 auto;
  padding: 12px 16px 26px;
  text-align: center;
}

.foot-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.foot-links a,
.foot-links button {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
}

.foot-copy {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.foot-copy strong {
  color: var(--rose-deep);
}

/* =========================================================
   모달 공통 (큰 글씨 기도 리더 / 유튜브 영상 / 통합 검색)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 18, 24, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-backdrop[hidden] {
  display: none;
}

/* 큰 글씨 기도 집중 모드 */
.reader-modal {
  padding: 0;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  background: #FAF6EC;
  color: #251F16;
}

.reader-modal.dark {
  background: #14171F;
  color: #F4EFE5;
}

.reader-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(154, 114, 40, 0.22);
  flex-wrap: wrap;
}

.reader-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.96rem;
}

.reader-tools {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.reader-tools button {
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(154, 114, 40, 0.34);
  font-size: 0.8rem;
  font-weight: 600;
}

.reader-close {
  background: var(--rose);
  color: #fff;
  border-color: var(--rose) !important;
}

.reader-content {
  flex: 1;
  overflow-y: auto;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 60px;
  font-family: var(--serif);
  font-size: 1.38rem;
  line-height: 2.08;
  white-space: pre-line;
}

/* 영상 모달 */
.video-sheet {
  width: 100%;
  max-width: 700px;
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.video-head {
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.video-speaker {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--rose-deep);
}

.video-title {
  font-size: 0.98rem;
  line-height: 1.4;
}

.video-frame-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-foot {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.video-note {
  font-size: 0.81rem;
  color: var(--ink-2);
  flex: 1;
}

/* 통합 검색 모달 */
.search-modal {
  align-items: flex-start;
  padding-top: 24px;
}

.search-sheet {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  background: var(--bg);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.search-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
}

.search-input-wrap input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border-radius: 11px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  font-size: 0.93rem;
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--rose);
  background: var(--surface);
}

.search-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.search-tabs button {
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--paper);
}

.search-tabs button.on {
  background: var(--rose);
  color: #fff;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 20px;
}

.sr-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin: 12px 2px 7px;
}

.sr-group-title:first-child {
  margin-top: 2px;
}

.sr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 7px;
}

.sr-item:hover {
  border-color: var(--rose);
}

.sr-item-title {
  font-size: 0.89rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.sr-item-sub {
  font-size: 0.77rem;
  color: var(--ink-2);
}

/* 토스트 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  z-index: 80;
  background: rgba(24, 28, 36, 0.94);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  max-width: 90vw;
  text-align: center;
}

.toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
