/* Hallmark · shape: app screen · posture: restrained · nav: topbar + bottom-nav · footer: recipient CTA */
:root {
  --bg: #FAF7F1;
  --surface: #FCFBF8;
  --surface-pure: #FDFCFA;
  --paper: #F4EDE0;
  --paper-2: #ECE2D0;
  --line: #E5DBCB;
  --line-strong: #CEBFA6;
  --ink: #1E222B;
  --ink-2: #484F5E;
  --ink-3: #5A6272;
  --on-accent: #FCFBF8;
  --on-dark: #F7F4EC;
  --on-dark-muted: #E3DBC9;
  --dark-surface: #1B2233;
  --dark-surface-2: #253048;
  --dark-scrim: rgba(20, 24, 34, 0.56);
  --rose: #B82E59;
  --rose-deep: #962247;
  --rose-soft: #FDF1F5;
  --rose-line: #EFC2D2;
  --gold: #785517;
  --gold-deep: #5E4211;
  --gold-soft: #F9F2E4;
  --gold-line: #DEC693;
  --gold-light: #F3D999;
  --sage: #255D44;
  --sage-soft: #ECF6F0;
  --sage-line: #BEDCC9;
  --navy: #274375;
  --banner-a: #FDF6EA;
  --banner-b: #FAF0F3;
  --hero-glow: rgba(184, 46, 89, 0.06);
  --grad-top: rgba(20, 24, 34, 0.16);
  --grad-bot: rgba(20, 24, 34, 0.72);
  --badge-bg: rgba(252, 251, 248, 0.94);
  --focus-ring: rgba(184, 46, 89, 0.14);
  --prayer-card-bg: rgba(252, 251, 248, 0.09);
  --prayer-card-line: rgba(243, 217, 153, 0.3);
  --kakao-bg: #FEE500;
  --kakao-line: #DEC800;
  --kakao-ink: #191919;
  --naver-bg: #027A37;
  --naver-line: #01612B;
  --tmap-bg: #2347A6;
  --tmap-line: #1B3886;
  --shadow-sm: 0 2px 8px rgba(30, 34, 43, 0.05);
  --shadow-md: 0 8px 24px rgba(30, 34, 43, 0.08);
  --shadow-lg: 0 16px 40px rgba(30, 34, 43, 0.16);
  --shadow-rose: 0 4px 12px rgba(184, 46, 89, 0.22);
  --shadow-gold: 0 4px 12px rgba(120, 85, 23, 0.2);
  --shadow-sage: 0 4px 12px rgba(37, 93, 68, 0.2);
  --shadow-text: 0 2px 8px rgba(20, 24, 34, 0.4);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --serif: 'Gowun Batang', 'Batang', Georgia, serif;
  --sans: 'Noto Sans KR', 'Malgun Gothic', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fs: 16px;
}

html.font-lg {
  --fs: 18.5px;
}

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

html, body {
  overflow-x: clip;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.68;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

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

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

.hidden {
  display: none !important;
}

/* ================= 상단 바 ================= */
.studio-shell {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-top: 3px solid var(--rose);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.brand-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.brand-sub {
  font-family: var(--serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  padding-left: 8px;
  border-left: 1px solid var(--line-strong);
  white-space: nowrap;
}

@media (max-width: 440px) {
  .brand-sub {
    display: none;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.church-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
  max-width: 164px;
}

.church-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.icon-chip {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.icon-chip.active,
.icon-chip:hover {
  border-color: var(--rose);
  color: var(--rose);
  background: var(--rose-soft);
}

/* 데스크톱 상단 탭 */
.desktop-tabs {
  display: none;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 12px;
  gap: 8px;
}

.dtab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

.dtab.active {
  background: var(--rose);
  color: var(--on-accent);
  box-shadow: var(--shadow-rose);
}

@media (min-width: 760px) {
  .desktop-tabs {
    display: flex;
  }
  .bottom-nav {
    display: none !important;
  }
  .studio-shell {
    padding-bottom: 48px;
  }
}

/* 모바일 하단 네비 */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.bnav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.bnav-btn.active {
  color: var(--rose);
  background: var(--rose-soft);
}

/* ================= 메인 컨테이너 ================= */
.main-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

.tab-panel {
  display: none;
  animation: fadeSlide 0.26s var(--ease);
}

.tab-panel.active {
  display: block;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 교역자 성회 프리셋 배너 */
.campaign-banner {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--banner-a) 0%, var(--banner-b) 100%);
  border: 1px solid var(--gold-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.campaign-banner-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.campaign-banner-sub {
  font-size: 0.82rem;
  color: var(--ink-2);
  margin-top: 4px;
}

/* ================= 공통 카드 & 헤더 ================= */
.hero-intro {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.hero-intro::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at top right, var(--hero-glow), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--rose-deep);
  background: var(--rose-soft);
  border: 1px solid var(--rose-line);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.eyebrow.gold {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: var(--gold-line);
}

.eyebrow.sage {
  color: var(--sage);
  background: var(--sage-soft);
  border-color: var(--sage-line);
}

.page-title {
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.36;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.page-desc {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--ink-2);
}

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

.step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--rose);
  color: var(--on-accent);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--ink);
}

.step-sub {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--ink-3);
}

/* ================= 버튼 시스템 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.14s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

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

.btn-primary {
  background: var(--rose);
  color: var(--on-accent);
  box-shadow: var(--shadow-rose);
}

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

.btn-gold {
  background: var(--gold);
  color: var(--on-accent);
  box-shadow: var(--shadow-gold);
}

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

.btn-sage {
  background: var(--sage);
  color: var(--on-accent);
  box-shadow: var(--shadow-sage);
}

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

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

.btn-soft {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

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

.btn-sm {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* ================= 폼 요소 ================= */
.field {
  margin-bottom: 12px;
}

.field:last-child {
  margin-bottom: 0;
}

.label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.input, .textarea, .select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-pure);
  font-size: 0.94rem;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.6;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================= 탭 1: 4종 전도 목적 카드 ================= */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.mode-card {
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--surface-pure);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mode-card:hover {
  border-color: var(--rose-line);
  background: var(--rose-soft);
}

.mode-card.active {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.mode-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rose-deep);
}

.mode-name {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
}

.mode-desc {
  font-size: 0.78rem;
  color: var(--ink-2);
  line-height: 1.42;
}

/* 칩 목록 */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}

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

.chip.active {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--on-accent);
  font-weight: 600;
}

.chip.gold.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-accent);
}

/* 검색 자동완성 결과 */
.search-box {
  position: relative;
}

.search-results {
  margin-top: 8px;
  max-height: 224px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.search-item {
  width: 100%;
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
}

.search-item:last-child {
  border-bottom: 0;
}

.search-item:hover {
  background: var(--rose-soft);
}

.search-cat {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--paper);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* 선택된 질병/주제 요약 상자 */
.selected-pill-box {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--paper);
  border: 1px solid var(--line-strong);
}

.selected-pill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.selected-pill-title {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

/* 쇼츠 선택 카드 */
.short-pick-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.short-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.short-pick.picked {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.short-thumb {
  width: 68px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--dark-surface);
  flex-shrink: 0;
}

.short-pick-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.38;
  flex: 1;
}

.short-pick-check {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  flex-shrink: 0;
  color: transparent;
}

.short-pick.picked .short-pick-check {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--on-accent);
}

/* 테마 그리드 */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (min-width: 640px) {
  .theme-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

.theme-tile {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--surface);
  text-align: center;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.theme-tile.active {
  border-color: var(--rose);
  transform: translateY(-2px);
}

.theme-tile img {
  width: 100%;
  height: 64px;
  object-fit: cover;
}

.theme-tile-name {
  padding: 8px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
}

/* 스위치 토글 */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
}

.toggle-chip input {
  accent-color: var(--rose);
  width: 16px;
  height: 16px;
}

/* 라이브 미니 프리뷰 + 공유 액션 바 */
.live-preview-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  margin-bottom: 16px;
}

.live-preview-banner {
  position: relative;
  height: 156px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.live-preview-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--grad-top) 0%, var(--grad-bot) 100%);
}

.live-preview-banner > * {
  position: relative;
  z-index: 1;
}

.lp-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--badge-bg);
  color: var(--rose-deep);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.lp-title {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--on-accent);
  text-shadow: var(--shadow-text);
}

.lp-body {
  padding: 16px;
}

.lp-msg {
  font-size: 0.88rem;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lp-meta {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .action-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ================= 탭 2: 현장 치유전도 1분 모드 ================= */
.street-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 600px) {
  .street-quick-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.street-qbtn {
  padding: 12px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--surface-pure);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.street-qbtn:hover,
.street-qbtn.active {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--on-accent);
}

.street-decl-box {
  background: var(--surface-pure);
  border: 1.5px solid var(--gold-line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 12px 0;
}

.street-decl-item {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--ink);
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-strong);
}

.street-decl-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.street-decl-item:first-child {
  padding-top: 0;
}

.pain-meter {
  background: var(--sage-soft);
  border: 1px solid var(--sage-line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

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

.pain-row label {
  font-size: 0.84rem;
  font-weight: 600;
  min-width: 76px;
}

.pain-row input[type="range"] {
  flex: 1;
  accent-color: var(--sage);
}

.pain-val {
  min-width: 28px;
  text-align: right;
  font-weight: 700;
  color: var(--sage);
  font-variant-numeric: tabular-nums;
}

.pain-delta {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--sage);
  text-align: center;
}

/* ================= 탭 3: 태신자(VIP) 노트 ================= */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

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

.stat-num {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--rose);
  font-variant-numeric: tabular-nums;
}

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

.vip-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.vip-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.vip-name {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
}

.vip-rel {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
}

.vip-note {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.stage-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin: 12px 0;
}

.stage-step {
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.stage-step.reached {
  background: var(--gold-soft);
  border-color: var(--gold-line);
  color: var(--gold);
}

.stage-step.current {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--on-accent);
}

.vip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* ================= 탭 4: 새가족 4주 & FAQ ================= */
.week-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}

.week-head {
  width: 100%;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.week-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--rose-soft);
  color: var(--rose-deep);
  margin-right: 8px;
}

.week-done .week-badge {
  background: var(--sage-soft);
  color: var(--sage);
}

.week-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.verse-card {
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 12px 0;
}

.verse-text {
  font-family: var(--serif);
  font-size: 0.96rem;
  line-height: 1.72;
  color: var(--ink);
}

.verse-ref {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  padding: 16px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: 0.94rem;
}

.faq-a {
  padding: 12px 16px 16px;
  font-size: 0.9rem;
  color: var(--ink-2);
  border-top: 1px solid var(--line);
}

/* 생태계 연결 카드 */
.eco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.eco-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s var(--ease), transform 0.16s var(--ease);
}

.eco-card:hover {
  border-color: var(--rose);
  transform: translateY(-2px);
}

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

.eco-desc {
  font-size: 0.78rem;
  color: var(--ink-2);
}

/* ================= 2. 받는 분 전용 감성 뷰 ================= */
.recipient-shell {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 56px;
}

.preview-return-bar {
  position: relative;
  z-index: 60;
  background: var(--dark-surface);
  color: var(--on-dark);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 600;
}

.btn-return {
  background: var(--rose);
  color: var(--on-accent);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
}

.recipient-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 0 28px;
}

.rcpt-hero {
  position: relative;
  min-height: 312px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 20px 28px;
  overflow: hidden;
}

@media (min-width: 580px) {
  .recipient-wrap {
    padding-top: 24px;
  }
  .rcpt-hero {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
  }
}

.rcpt-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--grad-top) 0%, var(--grad-bot) 100%);
}

.rcpt-hero > * {
  position: relative;
  z-index: 1;
}

.rcpt-eyebrow {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--badge-bg);
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.rcpt-title {
  font-family: var(--serif);
  font-size: 1.62rem;
  font-weight: 700;
  line-height: 1.38;
  color: var(--on-accent);
  text-shadow: var(--shadow-text);
}

.rcpt-date {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--on-dark-muted);
  font-weight: 500;
}

.rcpt-body {
  padding: 16px 16px 0;
}

.letter-paper {
  background: var(--surface-pure);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  margin-top: -20px;
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}

.letter-to {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rose-deep);
  margin-bottom: 12px;
}

.letter-msg {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.88;
  color: var(--ink);
  white-space: pre-line;
}

.letter-from {
  margin-top: 16px;
  text-align: right;
  font-family: var(--serif);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink-2);
}

.rcpt-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px 16px;
  margin-bottom: 16px;
}

.rcpt-sec-title {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.rcpt-sec-sub {
  font-size: 0.84rem;
  color: var(--ink-2);
  margin-bottom: 12px;
}

/* 인앱 유튜브 쇼츠 카드 */
.video-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--dark-surface);
  color: var(--on-dark);
  transition: border-color 0.2s var(--ease);
}

.video-card:hover {
  border-color: var(--rose);
}

.video-card:last-child {
  margin-bottom: 0;
}

.video-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--dark-surface);
  overflow: hidden;
  display: block;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.video-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.video-caption {
  padding: 12px;
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.video-iframe-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--dark-surface);
}

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

/* 갤러리 가로 스와이프 */
.gallery-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}

.gallery-slide {
  flex: 0 0 78%;
  scroll-snap-align: start;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.gallery-slide img {
  width: 100%;
  height: 168px;
  object-fit: cover;
}

.gallery-cap {
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
}

/* 지교회 안내 박스 */
.church-info-box {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 16px;
}

.church-info-name {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.church-info-row {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.map-btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.map-btn {
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.map-btn.kakao { background: var(--kakao-bg); border-color: var(--kakao-line); color: var(--kakao-ink); }
.map-btn.naver { background: var(--naver-bg); border-color: var(--naver-line); color: var(--on-accent); }
.map-btn.tmap  { background: var(--tmap-bg); border-color: var(--tmap-line); color: var(--on-accent); }

.tt-list {
  margin-top: 12px;
  border-top: 1px solid var(--line-strong);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tt-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
}

.tt-name {
  font-weight: 600;
  color: var(--ink);
}

.tt-time {
  color: var(--ink-2);
  text-align: right;
}

/* ================= 모달 ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--dark-scrim);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: sheetUp 0.24s var(--ease);
}

@media (min-width: 640px) {
  .modal-sheet {
    border-radius: var(--radius-xl);
  }
}

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-head {
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.modal-body {
  padding: 16px 16px 24px;
  overflow-y: auto;
  flex: 1;
}

/* 지교회 선택 리스트 */
.church-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.church-row {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  background: var(--surface);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.church-row.active {
  border-color: var(--rose);
  background: var(--rose-soft);
}

.church-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.church-row-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.church-row-reg {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.church-row-addr {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--ink-2);
}

/* QR 모달 */
.qr-stage {
  background: var(--surface-pure);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.qr-stage canvas {
  margin: 0 auto;
  border-radius: var(--radius-sm);
  width: 260px;
  max-width: 100%;
  height: auto;
}

.qr-caption {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.qr-sub {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--ink-2);
}

/* 기도 타이머 모달 */
.prayer-stage {
  background: linear-gradient(160deg, var(--dark-surface) 0%, var(--dark-surface-2) 100%);
  color: var(--on-dark);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  text-align: center;
}

.prayer-timer-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--gold-light);
  margin: 12px 0;
}

.prayer-vip-focus {
  background: var(--prayer-card-bg);
  border: 1px solid var(--prayer-card-line);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

/* 토스트 */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: var(--dark-surface);
  color: var(--on-dark);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  max-width: 90vw;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 760px) {
  .toast {
    bottom: 28px;
  }
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.ver-toggle {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}

.ver-btn {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ink-2);
}

.ver-btn.active {
  background: var(--surface);
  color: var(--rose-deep);
}

.empty-box {
  text-align: center;
  padding: 28px 16px;
  color: var(--ink-3);
  font-size: 0.9rem;
}

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