/* ════════════════════════════════════════════════
   INTRO (ver2) — 로딩(%) → 밝은 배경 모자이크(사진 랜덤 등장) → 타이틀 → hero
   ════════════════════════════════════════════════ */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f6f8fc;        /* photo-wall 과 같은 흰/파스텔 톤 */
  overflow: hidden;
  cursor: pointer;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}
.intro-overlay.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 로딩 화면 — 밝은 배경 + 퍼센트 (이미지 다 받을 때까지) */
.intro-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  /* 반투명 종이색 veil — 마손리 사진이 살짝 비치고, multiply 한 펜선이 그 위에 올라옴 */
  background: rgba(246, 248, 252, 0.85);   /* 흰/파스텔 톤 반투명 */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
.intro-loader.gone { opacity: 0; pointer-events: none; }
.loader-inner { text-align: center; width: min(320px, 80vw); }
/* 펜스케치 — 로딩 %만큼 아래에서 위로 '그려지듯' 채워짐 (완성되어가는 과정) */
.loader-sketch {
  width: clamp(240px, 62vw, 360px);
  margin: 0 auto 16px;
}
.loader-sketch img {
  width: 100%;
  height: auto;
  display: block;
  /* multiply 블렌드 → 흰 종이는 사라지고 연필선만 배경 위에 진하게 남음.
     아래의 photo-wall과 자연스럽게 합쳐져 분리되어 보이지 않음. */
  mix-blend-mode: multiply;
  opacity: calc(0.14 + 0.86 * var(--p, 0));
  filter:
    blur(calc((1 - var(--p, 0)) * 9px))
    saturate(calc(0.5 + 0.5 * var(--p, 0)))
    contrast(calc(0.95 + 0.2 * var(--p, 0)));
  transform: scale(calc(1.05 - 0.05 * var(--p, 0)));
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}
.loader-pct {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Noto Serif KR", sans-serif;
  font-weight: 700;
  color: #4a6a8a;                            /* 차가운 블루 계열 — 새 스케치(흰·파랑) 톤 매칭 */
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: 0.02em;
  line-height: 1;
}
.loader-pct i { font-style: normal; font-size: 0.5em; margin-left: 3px; opacity: 0.6; }
.loader-label {
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Noto Serif KR", sans-serif;
  color: #6a7a9a;                            /* 차가운 회청 */
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin: 10px 0 0;
}

/* 컬럼 메이슨리 — 사진이 자연 비율(들쭉날쭉)로 컬럼에 쌓이고, 하나씩 랜덤하게 등장 */
.photo-wall {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px;
  background: #f6f8fc;                      /* 크림 → 흰/파스텔 블루 — 새 스케치 톤 */
  overflow: hidden;
}
.photo-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--off, 0px);   /* 컬럼별 랜덤 오프셋 → 줄이 안 맞고 organic */
}
.photo-cell {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  opacity: 0;
  transform: scale(1.06) translateY(6px);
  transition: opacity 0.5s ease, transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.photo-cell.in { opacity: 1; transform: none; }
.photo-cell img {
  width: 100%;
  height: auto;            /* 자연 비율 — 사진마다 높이 다르게 (masonry) */
  display: block;
}

/* 타이틀 단계 — 사진을 밝게 덮고 타이틀 등장 */
.wall-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at center, rgba(246,248,252,0.78) 0%, rgba(246,248,252,0.92) 60%, rgba(246,248,252,0.98) 100%);
  opacity: 0;
  transition: opacity 1.1s ease;
  pointer-events: none;
}
.intro-overlay.show-title .wall-scrim { opacity: 1; }

/* 타이틀 — 컨테이너는 즉시 표시, 자식 요소에서 손글씨/페이드 reveal */
.wall-title {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  pointer-events: none;
  opacity: 1;
}

/* 손글씨 reveal — 왼→오 clip-path 로 한 글자씩 써내려가듯 */
.wall-eyebrow,
.wall-name,
.wall-date { opacity: 0; }
.wall-eyebrow { transform: translateY(8px); transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s; }
.wall-name    { clip-path: inset(0 100% 0 0); transition: clip-path 2.0s cubic-bezier(0.65, 0, 0.35, 1) 0.55s, opacity 0.25s ease 0.55s; }
.wall-date    { transform: translateY(6px); transition: opacity 0.7s ease 2.6s, transform 0.7s ease 2.6s; }

.intro-overlay.show-title .wall-eyebrow { opacity: 1; transform: none; }
.intro-overlay.show-title .wall-name    { opacity: 1; clip-path: inset(0 0 0 0); }
.intro-overlay.show-title .wall-date    { opacity: 1; transform: none; }

.wall-eyebrow {
  font-family: "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.1vw, 1.85rem);
  color: #4a6a8a;                 /* 골드 → 차가운 블루 (새 스케치 톤) */
  letter-spacing: 0.08em;
  margin: 0 0 20px;
  text-shadow: 0 1px 2px rgba(20,30,60,0.16), 0 2px 16px rgba(255,255,255,0.85);
}

.wall-name {
  font-family: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.5rem);   /* 조금 작게 */
  color: var(--ink, #2a2a2a);
  margin: 0 0 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 22px rgba(255, 255, 255, 0.9), 0 0 50px rgba(255, 255, 255, 0.65);
}

.wall-date {
  font-family: "Noto Serif KR", serif;
  font-weight: 600;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: #3a3a3a;                 /* 더 진하게 — 가독성 ↑ */
  letter-spacing: 0.06em;
  margin: 0;
  text-shadow: 0 1px 14px rgba(255,255,255,0.9), 0 0 28px rgba(255,255,255,0.7);
}

@media (max-width: 768px) {
  .photo-wall { gap: 4px; padding: 4px; }
}
@media (max-width: 540px) {
  .wall-name { font-size: clamp(1.6rem, 6.8vw, 2.6rem); }
}

/* 인트로 활성 중에는 hero가 미리 reveal 되지 않게 차단 → 깜빡임 방지 */
body.intro-active #slide-hero .reveal,
body.intro-active #slide-hero .reveal.in {
  opacity: 0 !important;
  transform: translateY(28px) scale(1.06) !important;
}

/* ════════════════════════════════════════════════
   슬라이드 진입 reveal (ver2) — scale + fade
   ════════════════════════════════════════════════ */
.reveal {
  transform: scale(1.06);
  transition: opacity 1.4s ease, transform 1.6s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.reveal.in {
  transform: scale(1);
}

/* iris clip-path 효과 제거됨 — 섹션이 잘려 보이는 문제 발생.
   대신 .reveal scale-fade(위에서 정의)와 hero/gallery의 Ken Burns 모션으로
   slide-to-slide 전환에 cinematic 톤을 유지. */

/* ────────────────  네이버 나눔손글씨 "다시 시작해" 웹폰트  ──────────────── */
@font-face {
  font-family: 'StartOver';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/naverfont_09@1.0/Restart.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

/* ────────────────  tvN 즐거운이야기 — 무료 한글 웹폰트 (noonnu CDN)  ──────────────── */
@font-face {
  font-family: 'tvN Joyful';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2102@1.0/tvNEnjoystoriesOTF.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'tvN Joyful Bold';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2102@1.0/tvNEnjoystoriesBoldOTF.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

/* ────────────────  Base (White Tone)  ──────────────── */
:root {
  --bg:        #ffffff;
  --bg-alt:    #fafaf8;
  --ink:       #2a2a2a;
  --ink-2:     #6b6b6b;
  --ink-3:     #9a9a9a;
  --accent:    #b8a37e;   /* 부드러운 샴페인 골드 */
  --accent-2:  #d4c4a8;
  --line:      #ececec;
  --shadow:    0 14px 32px rgba(40, 40, 40, 0.08);
  --shadow-lg: 0 26px 56px rgba(40, 40, 40, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

/* 화면 폭에 비례하는 루트 폰트(맥 비율 기준) — 하한/상한으로 가독성 보호.
   윈도우(폭 1365px) ≈ 15.4px, 맥(폭 2469px) ≈ 18.9px 로 비율 일치.
   0.32vw + 11px: 두 기기 실측 폭으로 보정한 기울기. 모바일은 아래 @media에서 고정. */
html {
  font-size: clamp(15px, 0.32vw + 11px, 20px);
}

body {
  font-family: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  word-break: keep-all;        /* 한글 단어가 줄바꿈에서 중간에 끊기지 않게 */
  overflow-wrap: break-word;
}

h1, h2 { font-weight: 700; letter-spacing: -0.02em; }

/* ────────────────  PPT-style Scroll Snap  ──────────────── */
.slides {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }

.slide {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
  position: relative;
}

.slide-inner {
  width: 100%;
  max-width: 1100px;
}

/* ────────────────  Reveal Animation (per-slide entry)  ──────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* 섹션 진입 페이드 — 갤러리 캐러셀은 transform을 JS가 제어하므로 opacity만 사용.
   (다른 섹션은 내부 .reveal 요소가 fade+rise 처리) 스크롤로 진입하면 점차 드러남. */
.gallery-carousel {
  opacity: 0;
  transition: opacity 1.2s ease;
}
.gallery-carousel.in-view { opacity: 1; }

/* ────────────────  Page Nav Dots (right side)  ──────────────── */
.page-nav {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.page-nav .dot {
  display: block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--ink-3);
  transition: all .35s ease;
  text-decoration: none;
}
.page-nav .dot:hover { border-color: var(--accent); transform: scale(1.2); }
.page-nav .dot.active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.3);
}

/* ────────────────  Section Headings  ──────────────── */
h2.section-h, .slide h2 {
  font-size: 2rem;
  text-align: center;
  margin: 0 0 14px;
}
.slide h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin: 18px auto 0;
}
.section-sub {
  text-align: center;
  color: var(--ink-2);
  margin: 0 0 50px;
  font-size: 1rem;
}

/* ────────────────  Slide 1 · Hero (Fullscreen)  ──────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  display: block;       /* override .slide flex */
  /* 사진 로딩 전 밝은 톤 (이전 #111 → 크림) */
  background:
    radial-gradient(circle at 30% 20%, #fff8e8 0%, transparent 55%),
    radial-gradient(circle at 70% 80%, #f4ead6 0%, transparent 55%),
    #faf6ec;
}

/* Hero 배경 크로스페이드 — 화면 전체 */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}
.cf-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;  /* 인물 얼굴이 잘리지 않도록 약간 위 */
  opacity: 0;
  transition: opacity 1.2s ease-in-out, transform 7s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: scale(1);
  will-change: opacity, transform;
}
.cf-img.is-active {
  opacity: 1;
  transform: scale(1.14); /* Ver2: Ken Burns 더 dramatic (1.08 → 1.14) */
}

/* 텍스트 가독성용 그라데이션 스크림 — 상단은 transparent (가장자리 깔끔하게) */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      transparent 0%,
      transparent 45%,
      rgba(0,0,0,0.55) 100%
    );
  z-index: 1;
  pointer-events: none;
}

/* 히어로 파티클 컨테이너 — 사진 위, 텍스트 아래 */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* ─────────────  히어로 등장 연출 (인트로 끝→hero 진입 시 1회)  ───────────── */
/* 골드 라이트 스윕 — 대각선 빛이 화면을 한 번 훑고 지나감 */
.hero-sweep {
  position: absolute;
  inset: 0;
  z-index: 4;            /* 텍스트(3) 위로 살짝 빛이 스침 */
  pointer-events: none;
  overflow: hidden;
}
.hero.is-entering .hero-sweep::before {
  content: "";
  position: absolute;
  top: -25%;
  left: -75%;
  width: 55%;
  height: 150%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 240, 200, 0) 38%,
    rgba(255, 240, 200, 0.5) 50%,
    rgba(255, 240, 200, 0) 62%,
    transparent 100%
  );
  transform: skewX(-16deg);
  animation: heroSweep 1.7s cubic-bezier(.25, .6, .2, 1) 0.55s 1 both;
}
@keyframes heroSweep {
  from { left: -75%; opacity: 0; }
  18%  { opacity: 1; }
  to   { left: 135%; opacity: 0; }
}

/* 텍스트 스태거 라이즈 — 한 줄씩 아래에서 또렷해지며 떠오름 */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(30px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
.hero.is-entering .hero-text > *:not(.scroll-hint) {
  animation: heroRise 1.05s cubic-bezier(.2, .8, .2, 1) both;
}
.hero.is-entering .hero-text .eyebrow { animation-delay: 0.15s; }
.hero.is-entering .hero-text h1       { animation-delay: 0.40s; }
.hero.is-entering .hero-text .date    { animation-delay: 0.68s; }
.hero.is-entering .hero-text .lede    { animation-delay: 0.92s; }

@media (prefers-reduced-motion: reduce) {
  .hero.is-entering .hero-text > *,
  .hero.is-entering .hero-sweep::before { animation: none; }
}

/* 텍스트 오버레이 — 하단 중앙 */
.hero-text {
  position: absolute;
  left: 0; right: 0;
  bottom: 64px;        /* 화면 높이 무관 고정 — 해상도별 위치 출렁임 방지 */
  z-index: 3;
  text-align: center;
  color: #fff;
  padding: 0 28px;
  max-width: 760px;
  margin: 0 auto;
}

/* 네온 글로우(화이트) — 다층 text-shadow: dark crisp + dark wide + white halo */
.hero-text .eyebrow {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: 2.2rem;       /* 1.7 → 2.2rem */
  color: #fff;
  margin: 0 0 14px;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 0.85),
    0 0 18px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(255, 255, 255, 0.55),
    0 0 48px rgba(255, 255, 255, 0.3);
}
.hero-text h1 {
  font-size: 3rem;
  margin: 0 0 22px;
  line-height: 1.3;
  color: #fff;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.9),
    0 0 24px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(255, 255, 255, 0.55),
    0 0 70px rgba(255, 255, 255, 0.3);
}
.hero-text h1 .accent { color: #fff; }

.hero-text .date {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: 2.6rem;       /* 2 → 2.6rem */
  color: #fff;
  letter-spacing: 0.12em;
  margin: 0 0 24px;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(255, 255, 255, 0.55),
    0 0 60px rgba(255, 255, 255, 0.3);
}

.hero-text .lede {
  color: #fff;
  font-size: 1.1rem;
  margin: 0 0 36px;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(0, 0, 0, 0.55),
    0 0 32px rgba(255, 255, 255, 0.35);
}

.scroll-hint {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  color: #fff;
  font-size: 1.4rem;       /* 1.05 → 1.4rem */
  margin: 0;
  animation: bob 2.4s ease-in-out infinite;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.8),
    0 0 18px rgba(0, 0, 0, 0.4),
    0 0 28px rgba(255, 255, 255, 0.4);
}
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ────────────────  Slide 2 · About / Timeline  ──────────────── */
.about { background: var(--bg-alt); }
.about .slide-inner { max-width: 720px; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 50px auto 0;
  position: relative;
  max-width: 560px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 90px;
  top: 8px; bottom: 8px;
  width: 1px;
  background: var(--line);
}
.t-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 36px;
  position: relative;
}
.t-item::before {
  content: "";
  position: absolute;
  left: 86px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg-alt);
}
.t-year {
  text-align: right;
  font-weight: 600;
  color: var(--accent);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.t-item p { margin: 0; color: var(--ink-2); }

/* ────────────────  Gallery Intro Card (carousel's first card)  ──────────────── */
.gal-intro {
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-intro-inner {
  text-align: center;
  max-width: 1500px;       /* 그리드가 넓게 펼쳐지도록 (여백 축소) */
  width: 100%;
  padding: 0 28px;
}
.gal-intro h2 {
  font-size: 2rem;
  margin: 0 0 14px;
}
.gal-intro h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin: 18px auto 0;
}
/* 갤러리 인트로: 사진 썸네일 그리드 (클릭하면 해당 사진으로 이동) */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  grid-auto-rows: 10px;        /* 메이슨리 기본 행 — JS가 사진 높이만큼 span 부여 */
  column-gap: 16px;
  row-gap: 16px;
  width: 100%;
  max-width: 1420px;
  max-height: 56vh;          /* 제목이 위로 밀려 잘리지 않도록 낮춤 */
  overflow-y: auto;
  margin: 18px auto 4px;
  padding: 4px;
}
.gal-thumb--etc { cursor: default; }   /* etc 사진은 썸네일 전용(이동 없음) */
.gal-grid::-webkit-scrollbar { width: 6px; }
.gal-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 3px; }
.gal-thumb {
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  transition: transform .2s ease, box-shadow .2s ease;
  align-self: start;           /* 메이슨리: 행 시작점 정렬 */
}
.gal-thumb img {
  width: 100%;
  height: auto;          /* 자연 비율 — 메이슨리 자유 크기 */
  display: block;
}
.gal-thumb:hover,
.gal-thumb:focus-visible {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  outline: none;
}
.eyebrow-dark {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.8rem;
  margin: 0 0 14px;
  letter-spacing: 0.04em;
}
/* .scroll-hint(부모 클래스)가 정의한 text-shadow를 강제 제거하고 색상만 블링크 */
.gal-intro .scroll-hint-dark,
.scroll-hint.scroll-hint-dark {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: 1.7rem;
  margin-top: 56px;
  animation: hintBlink 1.4s ease-in-out infinite;
  text-shadow: none;       /* 글로우 완전 제거 */
  opacity: 1;              /* opacity 변화도 없음 */
  color: var(--ink);       /* 기본은 dark */
}
@keyframes hintBlink {
  0%, 100% { color: var(--ink);    }   /* dark */
  50%      { color: var(--accent); }   /* gold */
}

/* ────────────────  Gallery Carousel (horizontal swipe)  ──────────────── */
.gallery-carousel {
  position: relative;
  padding: 0;
  display: block;
  overflow: hidden;
  background: var(--bg-alt);   /* 다크 → 크림 톤으로 */
}

/* 크로스페이드 스택 — 사진이 슬라이드가 아니라 덧그리듯 겹쳐 바뀜 */
.gal-track {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.gal-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.gal-card.is-current {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.gal-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
  transition: transform 11s ease-in-out;
  will-change: transform;
}
/* Ken Burns 강화 — 줌 + 미세 수평 pan으로 dynamic 느낌 */
.gal-card.is-current .gal-bg {
  transform: scale(1.13) translateX(-1.5%);
}

/* ── 글자가 새겨진 정사각/세로 사진: 전체를 보여주고(contain) 양옆을 블러로 채움 ── */
.gal-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  filter: blur(30px) brightness(0.55);
}
.gal-bg.is-contain,
.gal-card.is-current .gal-bg.is-contain {
  object-fit: contain;
  transform: none;          /* Ken Burns 줌 끔 — 텍스트 잘림 방지 */
}

/* 듀오 카드: 구도가 비슷한 사진 2장을 한 화면에 좌우로 나란히.
   각 사진은 통째로(contain) 보이고 뒤는 블러로 채워 인물이 안 잘림 (다이프틱) */
.gal-duo { display: flex; flex-direction: row; }
.gal-half {
  position: relative;
  flex: 1 1 50%;
  height: 100%;
  overflow: hidden;
}
.gal-half + .gal-half { border-left: 2px solid rgba(255, 255, 255, 0.5); }
.gal-half .gal-bg,
.gal-half .gal-blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.gal-duo .gal-overlay { bottom: 30px; }
.gal-duo .gal-msg { font-size: 2.6rem; }    /* 단일 카드와 동일 크기로 통일 + 사용자 요청 키움 */
.gal-duo .gal-meta { font-size: 1.55rem; }  /* 명시 — 단일 카드와 통일 */
@media (max-width: 920px) {
  .gal-duo { flex-direction: column; }       /* 모바일: 위아래로 */
  .gal-half + .gal-half { border-left: none; border-top: 2px solid rgba(255, 255, 255, 0.5); }
}

/* ── 캐러셀 prev/next 버튼 제거 (썸네일 그리드·스와이프·키로만) ── */
.gal-nav { display: none !important; }

/* (gal-dots-inline 제거됨) */

.gal-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      transparent 0%,
      transparent 50%,
      rgba(0,0,0,0.62) 100%
    );
  z-index: 1;
  pointer-events: none;
}

/* gal-counter / gal-dots-inline 제거 — 사진을 깔끔하게 */

.gal-overlay {
  position: absolute;
  left: 0; right: 0;
  bottom: 72px;        /* 고정 — 해상도별 위치 출렁임 방지 */
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 0 36px;
  max-width: 880px;
  margin: 0 auto;
}

/* 단순 캡션 — 화이트 네온 */
.gal-caption {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.5;
  margin: 0;
  color: #fff;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 26px rgba(0, 0, 0, 0.7),
    0 0 38px rgba(255, 255, 255, 0.55),
    0 0 64px rgba(255, 255, 255, 0.3);
}

/* 성도님 메시지 (인용형) — 화이트 네온 */
.gal-msg {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1.5;
  margin: 0 0 22px;
  color: #fff;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 28px rgba(0, 0, 0, 0.7),
    0 0 42px rgba(255, 255, 255, 0.55),
    0 0 68px rgba(255, 255, 255, 0.3);
}
.gal-meta {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: 1.55rem;
  color: #fff;
  margin: 0;
  letter-spacing: 0.06em;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.85),
    0 0 18px rgba(0, 0, 0, 0.5),
    0 0 28px rgba(255, 255, 255, 0.35);
}

/* ────────────────  Slide 4 · Messages (paged carousel)  ──────────────── */
/* Desktop: 페이지마다 3x3 grid, Mobile: 페이지마다 1열 stack */
.messages { background: var(--bg-alt); }
.messages .slide-inner { max-width: 1240px; }

/* ── 메시지 섹션 = 손편지 (한 통씩 넘기기) ── */
#slide-messages {
  background:
    radial-gradient(circle at 50% 0%, #fbf5ea 0%, transparent 60%),
    linear-gradient(170deg, #f6eede 0%, #ece0c9 100%);
}
#slide-messages .slide-inner { max-width: 1500px; padding: 12px 12px 0; width: 100%; }
/* 섹션 헤더와 카드 사이 간격 조이기 — 여백 줄임 */
#slide-messages h2 { margin: 0 0 22px; }
#slide-messages h2::after { margin: 14px auto 0; }
/* 데스크탑도 한 장씩: 데스크탑 grid → 가로 한 페이지 캐러셀 */
#slide-messages .msg-track {
  display: flex;
  flex-direction: row;
  grid-template-columns: none;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 0;
  padding: 0;
}
#slide-messages .msg-track::-webkit-scrollbar { display: none; }
#slide-messages .msg-page {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  padding: 6px 10px;
}
#slide-messages .msg-carousel > .msg-nav { display: none; }   /* 좌우 화살표 제거 (도트·스와이프·키로만) */
#slide-messages .msg-dots { display: flex; }                  /* 도트 */

/* 편지지 카드 — 키움 */
#slide-messages .card {
  width: 100%;
  max-width: 1280px;                       /* 카드 더 넓게 */
  background: #fffdf6;
  border: 1px solid #e8dcc2;
  border-radius: 5px;
  box-shadow: 0 22px 50px rgba(120, 95, 50, 0.16);
  padding: 36px 44px 30px;                 /* 여백 축소 */
  display: block;
  transition: box-shadow .3s ease;
}
#slide-messages .card:hover { box-shadow: 0 26px 56px rgba(120, 95, 50, 0.22); transform: none; }
#slide-messages .card::before {
  content: "To. 원로목사님";
  position: static;
  display: block;
  font-family: "Gaegu", "Apple SD Gothic Neo", cursive;
  font-size: 1.85rem;                      /* 1.6 → 1.85 */
  color: var(--accent);
  line-height: 1.2;
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #e2d6bb;
}
#slide-messages .card .msg {
  font-family: "Noto Serif KR", serif;
  font-size: 1.15rem;                      /* 1.02 → 1.15 */
  line-height: 2.0;
  color: #4a4036;
  flex: none;
  margin: 0;
}
#slide-messages .card .from {
  margin: 30px 0 0;
  text-align: right;
  font-family: "Gaegu", "Apple SD Gothic Neo", cursive;
  font-size: 1.7rem;                       /* 1.5 → 1.7 */
  font-weight: 400;
  color: #8a7a5c;
}

/* ── 메시지: splitMessages() 호출 전엔 raw 텍스트가 잠깐 보이는 문제 방지 ── */
#slide-messages .msg { visibility: hidden; }
#slide-messages .msg[data-split] { visibility: visible; }

/* ── 메시지 한 문장씩 등장 ── */
#slide-messages .msg .msg-line {
  display: block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  margin-bottom: 4px;
}
#slide-messages .msg .msg-line.in {
  opacity: 1;
  transform: translateY(0);
}
#slide-messages .msg .msg-line:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  #slide-messages .card { padding: 40px 32px 32px; }
  #slide-messages .card::before { font-size: 1.5rem; }
  #slide-messages .card .msg { font-size: 1.05rem; line-height: 1.85; }
  #slide-messages .card .from { font-size: 1.4rem; }
}

/* ── 영상 섹션 (마무리 직전) — 따뜻한 크림 톤 (어두움→밝게) ── */
.video-section {
  background:
    radial-gradient(circle at 50% 0%, #fff8e8 0%, transparent 55%),
    linear-gradient(165deg, #f7eed4 0%, #ecdfb5 60%, #d8c490 100%);
}
.video-section .slide-inner { max-width: none; width: 100%; padding: 0 12px; text-align: center; }
.video-section h2 {
  color: var(--ink);
  margin: 0 0 18px;
}
.video-section h2::after {
  background: var(--accent);
  margin: 16px auto 0;
}
.video-frame {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  max-height: 82vh;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 8px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(184, 163, 126, 0.18);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 720px) {
  .video-section .slide-inner { padding: 0 8px; }
  .video-section h2 { font-size: 1.6rem; margin-bottom: 22px; }
  .video-frame { border-radius: 6px; }
}

/* ── 찬양 섹션: 진입 시 앨범아트·곡 정보·멘트 stagger reveal ── */
.songs-section .am-cover,
.songs-section .am-now,
.songs-section .am-progress,
.songs-section .am-wave-wrap,
.songs-section .am-times,
.songs-section .am-controls,
.songs-section .am-lyrics .am-line {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.songs-section.in-view .am-cover    { opacity: 1; transform: none; transition-delay: 0.20s; }
.songs-section.in-view .am-now      { opacity: 1; transform: none; transition-delay: 0.50s; }
.songs-section.in-view .am-progress { opacity: 1; transform: none; transition-delay: 0.70s; }
.songs-section.in-view .am-wave-wrap { opacity: 1; transform: none; transition-delay: 0.70s; }
.songs-section.in-view .am-times    { opacity: 1; transform: none; transition-delay: 0.78s; }
.songs-section.in-view .am-controls { opacity: 1; transform: none; transition-delay: 0.85s; }
.songs-section.in-view .am-lyrics .am-line { opacity: 1; transform: none; transition-delay: 1.10s; }

/* ── 찬양 섹션 — 풀뷰 (애플뮤직 Now Playing): 섹션은 어두운 베이스, .am-page 가 풀스크린 깔림 ── */
.songs-section {
  background: #0d0b09;
  padding: 0;                       /* 풀뷰: 좌우·상하 패딩 제거 */
}
.songs-section > .slide-inner {
  padding: 0;                        /* h2 가 absolute 라 padding 불필요 */
  position: relative;
  min-height: 100vh;
  display: block;
}

/* 풀뷰 내부 헤더 — 다른 섹션 h2 (.slide padding-top 60 + 자체) 와 비슷한 위치로 맞춤 */
.songs-section h2 {
  position: absolute;
  top: 60px;
  left: 0; right: 0;
  z-index: 5;
  margin: 0;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0,0,0,0.55), 0 0 28px rgba(0,0,0,0.35);
}
.songs-section .songs-eyebrow { display: none; }    /* 음표 아이콘 제거 — 타이틀과 겹침 */
.songs-section h2 {
  font-size: 2rem;                                        /* 다른 섹션 h2 와 동일 */
  padding: 0 16px;
  line-height: 1.3;
  /* font-family 명시 없음 → 다른 섹션과 동일 Noto Serif KR 사용 */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

/* 곡 제목 밑 실제 가수/팀 표시 (성도 이름은 가사 끝 .who 에 유지) */
.songs-section .am-artist {
  display: block;
  margin: 5px 0 0;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.74);
}
@keyframes songTitleShine { to { background-position: 200% center; } }
.songs-section h2::after { display: none; }      /* 풀뷰: 언더라인 장식 제거 */

/* 풀뷰 상단 scrim 제거 — 사용자 요청. 타이틀 가독성은 drop-shadow 와 grad shine 으로만 처리 */

/* 풀뷰 내부에 떠 있는 도트 인덱스 */
.songs-section .msg-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  z-index: 5;
  display: flex;
  gap: 9px;
}
/* 이전 색/언더라인 룰 제거 — 손글씨체+흰색 단색 룰이 위에서 적용 */
.songs-section .slide-inner {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
/* 풀뷰 몰입 — 타이틀은 라이트로 표시, 소제목만 숨김 */
.songs-section .section-sub { display: none; }
/* 음표 아이콘은 풀뷰 디자인에서 제거 — display: none 으로 숨김 (위에서 한 번 더 명시) */
.songs-section .songs-eyebrow { display: none !important; }
/* 중복 .songs-section h2 grad shine 룰 제거 — 위 손글씨체 단색 룰만 적용 */
@keyframes songTitleShine { to { background-position: 200% center; } }
.songs-section .msg-carousel { margin-top: 0; }
.songs-section .msg-carousel > .msg-nav { display: none; }
.songs-section .msg-dots { display: flex; margin-top: 18px; }
.songs-section .msg-dots span { background: rgba(255, 255, 255, 0.32); }
.songs-section .msg-dots span.active { background: #fff; }
/* ── 애플뮤직 풀뷰(Now Playing) — 한 화면 한 곡: 앨범 커버 블러 배경 + 왼쪽 플레이어 + 오른쪽 가사(메시지) ── */
.am-page {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 78vh;
  border-radius: 18px;
  display: flex;
  align-items: stretch;
  color: #fff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  isolation: isolate;
  /* 애플뮤직 체 — Mac/iOS는 시스템 SF, 그 외는 Pretendard(SF 호환) */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.am-page::after {                 /* 앨범 커버를 페이지 전체 블러 배경으로 */
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: var(--art, #5b6680) center / cover no-repeat;
  filter: blur(46px) brightness(0.72) saturate(1.15);
  transform: scale(1.25);
}
.am-page::before {                /* 가독성 스크림 */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(18,16,14,.30) 0%, rgba(18,16,14,.52) 100%);
}

/* 왼쪽: 앨범 커버 + 곡 정보 + 컨트롤 */
.am-player {
  flex: 0 0 42%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px; padding: 40px 28px;
}
.am-cover {
  width: min(340px, 74%);
  aspect-ratio: 1 / 1;
  background: var(--art, #5b6680) center / cover no-repeat;
  border-radius: 10px;
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.am-now { text-align: center; }
.am-song { margin: 0; font-size: 1.4rem; font-weight: 700; }
.am-artist { margin: 4px 0 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.72); }
.am-progress {
  width: min(340px, 74%); height: 18px; border-radius: 2px;   /* 클릭 영역 확대 */
  position: relative; cursor: pointer; background: transparent;
}
.am-progress::before {            /* 보이는 트랙 (4px, 세로 중앙) */
  content: ''; position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.26); pointer-events: none;
}
.am-progress i {                  /* 재생된 부분 (4px, 세로 중앙) */
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  display: block; width: 0; height: 4px; background: rgba(255, 255, 255, 0.85);
  border-radius: 2px; transition: width .3s linear; pointer-events: none;
}
/* 파형 스크러버 (얇은 바 대체) + 경과/남은시간 */
.am-wave-wrap { width: min(340px, 74%); height: 46px; cursor: default; pointer-events: none; }
.am-wave { width: 100%; height: 100%; display: block; }
.am-times {
  width: min(340px, 74%);
  display: flex; justify-content: space-between;
  margin-top: 7px;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.7);
}
.am-controls { display: flex; align-items: center; gap: 28px; margin-top: 2px; }
.songs-section .am-controls button {
  background: none; border: none; color: #fff; cursor: pointer;
  width: auto; padding: 6px; margin: 0; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; opacity: 0.92;
  transition: transform .15s ease, opacity .15s ease;
}
.songs-section .am-controls button:hover { transform: scale(1.14); opacity: 1; }
.songs-section .am-toggle { font-size: 1.95rem; }
.songs-section .am-toggle.am-toggle--static { cursor: default; }
.am-ic::after { content: "▶"; margin-left: 3px; }       /* 삼각형 시각 보정 */
.am-toggle--static .am-ic::after { content: "♪"; margin-left: 0; }
.songs-section .am-toggle.playing .am-ic::after { content: "⏸"; margin-left: 0; }

/* 오른쪽: 메시지를 가사처럼 (현재 강조 / 나머지 흐리게) */
.am-lyrics {
  position: relative;
  flex: 1 1 58%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 56px 70px;
  overflow-y: auto;
}
.am-lyrics.has-multi { cursor: pointer; }     /* 클릭하면 다음 메시지 */
.am-lyrics::-webkit-scrollbar { width: 6px; }
.am-lyrics::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.3); border-radius: 3px; }
/* 메시지를 가사처럼 한 번에 하나씩 */
.am-line {
  display: none;
  margin: 0;
  font-size: 1.55rem; font-weight: 600; line-height: 1.62;
  letter-spacing: -0.015em;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.am-line.is-active { display: block; }

/* 멘트 본문을 문장 단위로 한 줄씩 등장 — JS 가 <span class="am-sentence"> 으로 감쌈 */
.am-sentence {
  display: block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  margin-bottom: 10px;
}
/* JS 가 .reveal 클래스를 명시 토글 — display:none 부모에서 transition 발화 안 되던 문제 우회 */
.am-sentence.reveal { opacity: 1; transform: none; }
.am-sentence.reveal:nth-of-type(1)  { transition-delay: 0.30s; }
.am-sentence.reveal:nth-of-type(2)  { transition-delay: 0.80s; }
.am-sentence.reveal:nth-of-type(3)  { transition-delay: 1.30s; }
.am-sentence.reveal:nth-of-type(4)  { transition-delay: 1.80s; }
.am-sentence.reveal:nth-of-type(5)  { transition-delay: 2.30s; }
.am-sentence.reveal:nth-of-type(6)  { transition-delay: 2.80s; }
.am-sentence.reveal:nth-of-type(n+7){ transition-delay: 3.30s; }
@keyframes amLineIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.am-line .who {
  display: block; margin-top: 16px;
  font-size: 0.95rem; font-weight: 500; color: rgba(255, 255, 255, 0.66);
}
/* 메시지 여러 개일 때 하단 도트 */
.am-ldots {
  position: absolute; left: 0; right: 0; bottom: 26px;
  display: flex; justify-content: center; gap: 9px;
}
.am-ldots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.32); cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.am-ldots span.on { background: #fff; transform: scale(1.15); }

@media (max-width: 920px) {
  .am-page { flex-direction: column; min-height: auto; border-radius: 14px; }
  .am-player { flex: none; padding: 30px 20px 18px; gap: 14px; }
  .am-lyrics { flex: none; max-height: none; padding: 24px 24px 32px; gap: 22px; }
  .am-line { font-size: 1.15rem; }
}

.msg-carousel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
  position: relative;
}

/* Desktop default: 9개의 .msg-page wrapper를 display:contents로 평탄화 → cards가 grid의 직접 자식 */
.msg-track {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 28px;
  padding: 14px;
  overflow: visible;
  box-sizing: border-box;
}
.msg-page {
  display: contents;
}

/* Desktop은 캐러셀 UI 숨김 — 카드 전부 grid로 보임 */
.msg-carousel > .msg-nav { display: none; }
.msg-dots { display: none; }

/* 찬양 섹션: 곡별로 한 화면(1곡 = 1페이지), 좌우로 넘김.
   같은 곡은 한 화면에 여러 성도 메시지 + 재생 버튼 1개 */
#slide-songs .msg-track {
  display: flex;
  flex-direction: row;
  grid-template-columns: none;
  grid-auto-rows: auto;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 0;
  padding: 0;
}
#slide-songs .msg-track::-webkit-scrollbar { display: none; }
#slide-songs .msg-page {
  display: flex;
  align-items: stretch;
  flex: 0 0 100%;
  scroll-snap-align: start;
  box-sizing: border-box;
  padding: 0;          /* 풀뷰 — 페이지 마진 제거 */
}
#slide-songs .am-page {
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  box-shadow: none;
  padding-top: 120px;                /* h2 (top 60px + ~40px 높이) + 살짝 여유 */
  padding-bottom: 58px;
  box-sizing: border-box;
}
@media (max-width: 920px) {
  #slide-songs .am-page { padding-top: 100px; padding-bottom: 52px; }
}
#slide-songs .am-page::after {
  filter: blur(48px) brightness(0.88) saturate(1.2);   /* 사용자 요청 — 좀 더 밝게 (0.78 → 0.88) */
  transform: scale(1.3);
}
#slide-songs .msg-carousel > .msg-nav { display: none; }   /* 풀뷰: 화살표 숨김(트랜스포트가 대체) */
#slide-songs .msg-dots { display: flex; }

.song-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.card-song.song-head {           /* 곡 제목 + 재생버튼: 가운데, 카드 내부용 스타일 해제 */
  width: auto;
  text-align: center;
  align-items: center;
  border-bottom: none;
  padding: 4px 8px 0;
  margin: 0;
}
.song-head .song-label { font-size: 0.8rem; }
.song-head .song-title { font-size: 1.5rem; font-weight: 700; }
.song-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  width: 100%;
}
.song-cards > .card { flex: 1 1 300px; max-width: 360px; }

.card {
  background: #fff;
  padding: 40px 36px 28px;     /* 내부 breathing 늘림 */
  border: 1px solid var(--line);
  position: relative;
  margin: 0;
  transition: box-shadow .3s ease, transform .3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card::before {
  content: "“";
  position: absolute;
  top: -6px; left: 22px;
  font-size: 3.6rem;
  color: var(--accent);
  font-family: Georgia, serif;
  line-height: 1;
}
.card .msg { margin: 0; color: var(--ink); font-size: 0.98rem; line-height: 1.7; flex: 1; }
.card .from {
  margin: 0;
  text-align: right;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
}
/* 찬양 헤더가 있는 카드는 장식용 따옴표 숨김(겹침 방지) */
.card.has-song::before { display: none; }
/* 찬양(원로목사님 하면 생각나는 곡) 헤더 — 카드 상단, YouTube 링크 */
.card-song {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  padding: 0 0 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
  transition: opacity .2s ease;
  /* button 으로 써도 자연스럽게 — 기본 버튼 스타일 리셋 */
  font: inherit;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  text-align: left;
  width: 100%;
}
.card-song[data-yt] { cursor: pointer; }       /* 재생 가능한 카드만 포인터 */
.card-song[data-yt]:hover { opacity: 0.75; }
.card-song .song-label {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  font-weight: 500;
}
.card-song .song-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.card-song[data-yt] .song-title::after {   /* ▶/⏸ 는 재생 가능한(링크 있는) 카드에서만 */
  content: " ▶";
  font-size: 0.7rem;
  color: var(--accent);
  vertical-align: middle;
}
.card-song.playing .song-title::after { content: " ⏸"; }
.card-song.playing .song-label { color: var(--accent); }
.card-song.playing .song-title { color: var(--accent); }

.msg-nav {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  transition: all .25s ease;
  line-height: 1;
}
.msg-nav:hover { border-color: var(--accent); color: var(--accent); }
.msg-nav:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

.msg-dots {
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  /* display 는 base (.msg-dots { display: none }) + mobile @media (display: flex) 가 제어 */
}
.msg-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: all .25s ease;
}
.msg-dots span.active {
  background: var(--accent);
  transform: scale(1.5);
}

/* ────────────────  Slide 5 · Video  ──────────────── */
.video .slide-inner { max-width: 900px; }
.video-wrap { margin-top: 30px; }
.video-placeholder {
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-size: 1.5rem;
}
.video-placeholder code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 8px 14px;
}

/* ────────────────  Slide 6 · Closing (interactive)  ──────────────── */
.closing {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  padding: 0 28px 72px;        /* 하단 고정 — 화면 높이 무관 */
  align-items: flex-end;       /* body·button·small은 하단 */
  justify-content: center;
}

/* 배경 사진 — assets/closing/JHP_9165.jpg */
.closing-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('assets/closing/JHP_9165.jpg');
  background-size: cover;
  background-position: center 45%;   /* 인물군을 중앙에 — 상단과 하단 둘 다 텍스트 공간 확보 */
  opacity: 0;                        /* 진입 시 시네마틱 효과로 등장 (in-view) */
  transform: scale(1.18);
  filter: blur(16px) saturate(0.65) brightness(0.85);
  z-index: 0;
}
/* 슬라이드 진입 → 블러·줌에서 또렷하게 풀리며 등장, 이후 아주 느린 드리프트 */
.closing.in-view .closing-bg-img {
  animation:
    closingPhotoIn 2.4s cubic-bezier(.22, .7, .2, 1) 2.0s both,   /* 손글씨가 올라가기 시작할 때 등장 */
    closingDrift 20s ease-in-out 4.4s infinite alternate;
}
@keyframes closingPhotoIn {
  from { opacity: 0; transform: scale(1.18); filter: blur(16px) saturate(0.65) brightness(0.85); }
  55%  { opacity: 1; }
  to   { opacity: 1; transform: scale(1.04); filter: blur(0) saturate(1) brightness(1); }
}
@keyframes closingDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}
/* 오버레이: 상단(hand)·하단(body) 둘 다 white scrim, 중앙 photo 시원하게 */
.closing-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      transparent 0%,                            /* 상단 어두운 scrim 제거 — hand 가독성은 text-shadow 로만 */
      transparent 58%,
      rgba(255, 255, 255, 0.4) 74%,              /* 하단: 흰 scrim — closing-body 가독성 */
      rgba(255, 255, 255, 0.8) 88%,
      rgba(255, 255, 255, 0.94) 100%
    );
  z-index: 1;
}

.closing-particles,
.gallery-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;            /* 캐러셀 캐드보다 위, 텍스트 오버레이와 비슷 */
  overflow: hidden;
}
/* .particle: hero / closing 공용 — 글로벌 스코프 */
.particle {
  position: absolute;
  pointer-events: none;
  user-select: none;
  font-family: serif;
  will-change: transform, opacity;
  animation: particleFloat var(--duration, 6s) ease-out forwards;
}
@keyframes particleFloat {
  0%   { transform: translate(0, 0) scale(0.7) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translate(var(--drift-x, 0), -110vh) scale(1.15) rotate(var(--rot-end, 40deg)); opacity: 0; }
}

.closing-inner {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
/* hand는 closing 슬라이드의 상단에 absolute 고정 */
.closing .hand {
  position: absolute;
  top: 56px;
  left: 0;
  right: 0;
  margin: 0 auto;
  display: block;
  /* viewport 폭에 비례 — 1512 와 3024 두 해상도에서 같은 비율로 보임 */
  width: clamp(300px, 24vw, 760px);
  height: auto;
  z-index: 100;
  opacity: 0;          /* 진입 시 등장 */
  /* 흰색 글로우 — 강하게 (사용자 요청: 더 줘봐) */
  filter:
    drop-shadow(0 0 22px rgba(255, 255, 255, 0.85))
    drop-shadow(0 0 44px rgba(255, 255, 255, 0.55))
    drop-shadow(0 0 70px rgba(255, 255, 255, 0.35))
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}
/* 진입 연출: 화면 중앙에서 손글씨처럼 좌→우로 써진 뒤(clip), 위 제자리로 올라감.
   사진/본문/글로우는 글씨가 올라가기 시작할 때 맞춰 등장(아래 delay). */
/* handWrite duration 3.2s → 4.2s (조금만 느리게) */
.closing.in-view .hand {
  /* 진입 즉시 발화 — delay 제거. 사용자 답답함 해결 */
  animation: handWrite 3.5s cubic-bezier(.4, 0, .2, 1) 0s both;
}
/* hand ::after 언더라인 효과 제거 — img 는 pseudo element 불가, 이미지 자체로 충분 */
@keyframes handWrite {
  0%   { opacity: 1; transform: scale(0.94); clip-path: inset(0 100% 0 0); }   /* 즉시 보임 */
  60%  { opacity: 1; transform: scale(1);    clip-path: inset(0 0 0 0); }
  100% { opacity: 1; transform: scale(1);    clip-path: inset(0 0 0 0); }
}
@keyframes handPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
@keyframes handColor {
  0%, 100% { color: var(--accent); }     /* 골드 */
  50%      { color: #d18ba2; }            /* 따뜻한 핑크 */
}
@keyframes handUnderline {
  0%, 100% { width: 60px;  opacity: 0.5; }
  50%      { width: 140px; opacity: 1; }
}
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}
/* 본문 뒤 따뜻한 골드 글로우 — 진입 시 켜지고 은은히 숨쉼 */
.closing-glow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 72vmin;
  height: 72vmin;
  transform: translateX(-50%);
  background: radial-gradient(circle,
    rgba(255, 214, 170, 0.5) 0%,
    rgba(255, 198, 208, 0.22) 38%,
    transparent 68%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}
.closing.in-view .closing-glow {
  animation: closingGlowIn 2s ease 2.4s both, glowBreath 6s ease-in-out 4.4s infinite;
}
@keyframes closingGlowIn { to { opacity: 1; } }
@keyframes glowBreath {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateX(-50%) scale(1.08); }
}

/* 장식 eyebrow — 양쪽 ✦ 와 함께 스크립트 골드 */
.closing-eyebrow {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  text-shadow:
    0 0 6px rgba(255, 255, 255, 1),
    0 0 14px rgba(255, 255, 255, 0.9),
    0 1px 3px rgba(0, 0, 0, 0.35);
}
.closing-eyebrow::before,
.closing-eyebrow::after {
  content: "✦";
  font-size: 0.72em;
  margin: 0 0.55em;
  opacity: 0.85;
  vertical-align: 0.12em;
}

/* 하단 텍스트 한 줄씩 떠오름 (사진 등장 직후) */
.closing-inner > * { opacity: 0; }
@keyframes closingRise {
  from { opacity: 0; transform: translateY(24px); filter: blur(5px); }
  to   { opacity: 1; transform: none;             filter: blur(0); }
}
.closing.in-view .closing-inner > * {
  animation: closingRise 1s cubic-bezier(.2, .8, .2, 1) both;
}
.closing.in-view .closing-eyebrow { animation-delay: 3.4s; }
.closing.in-view .closing-body    { animation-delay: 3.65s; }
.closing.in-view .closing-replay  { animation-delay: 3.95s; }

@media (prefers-reduced-motion: reduce) {
  .closing.in-view .closing-bg-img,
  .closing.in-view .closing-glow,
  .closing.in-view .hand,
  .closing.in-view .hand::after,
  .closing.in-view .closing-inner > * { animation: none; }
  .closing-bg-img { opacity: 1; transform: none; filter: none; }
  .closing .hand, .closing .hand::after, .closing-inner > *, .closing-glow { opacity: 1; }
}

.closing-body {
  color: var(--ink);
  font-weight: 600;
  /* viewport 기반 — 작은 화면에서 비율적으로 커지던 문제 해결 */
  font-size: clamp(0.9rem, 0.95vw, 1.4rem);
  line-height: 1.95;
  margin: 0 0 34px;
  text-shadow:
    0 0 5px rgba(255, 255, 255, 1),
    0 0 12px rgba(255, 255, 255, 1),
    0 0 22px rgba(255, 255, 255, 0.95),
    0 0 36px rgba(255, 255, 255, 0.7);
}
.closing-replay {
  font-family: "Noto Serif KR", inherit;
  font-size: 1rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--accent);
  padding: 14px 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .3s ease;
  margin-bottom: 36px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.04em;
}
.closing-replay:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(184, 163, 126, 0.45);
}
.closing .small { margin: 0; color: var(--ink-3); font-size: 0.9rem; }
.closing-hint {
  margin: 18px 0 0;
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700;
  color: var(--ink-3);
  font-size: 1.4rem;
  animation: bob 2.4s ease-in-out infinite;
}

/* 배경 사진이 없으면 .closing-bg-img 의 background-image url이 깨지면서
   브라우저가 빈 박스로 렌더 → opacity 만 살짝 보임. 그대로 둬도 무해. */

/* ────────────────  Responsive  ──────────────── */
@media (max-width: 920px) {
  html { font-size: 17px; }   /* 태블릿/좁은 창: 한 단계 낮춤 */
  .page-nav { right: 14px; }

  /* 히어로: 모바일은 텍스트 화면 가운데로 (bottom → vertical center) */
  .hero-text {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 22px;
  }
  .hero-text h1 { font-size: 2rem; }
  .hero-text .eyebrow { font-size: 1.4rem; }
  .hero-text .date { font-size: 1.6rem; }
  .hero-text .lede { font-size: 1rem; }
  .lede br { display: none; }

  /* 갤러리 */
  .gal-overlay { bottom: 8vh; padding: 0 22px; }
  .gal-msg { font-size: 1.6rem; }
  .gal-caption { font-size: 1.5rem; }
  .gal-meta { font-size: 1.05rem; }
  .gal-nav { display: none; }  /* 모바일: 스와이프로 충분 */

  /* 메시지: 모바일은 카드 1장이 한 페이지 가득 (크고 시원하게) */
  .msg-track {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    grid-template-columns: none;
    padding: 0;
    gap: 0;
  }
  .msg-track::-webkit-scrollbar { display: none; }
  .msg-page {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 100vw;          /* 한 페이지가 viewport 폭 전체 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 14px 22px;
    box-sizing: border-box;
  }
  .msg-page .card {
    width: 100%;
    max-width: 380px;
    min-height: 50vh;          /* 카드 시원하게 키움 */
    padding: 38px 28px 24px;
  }
  .msg-page .card .msg { font-size: 1.05rem; line-height: 1.7; }
  .msg-page .card .from { font-size: 0.95rem; margin-top: 18px; }
  .msg-carousel > .msg-nav { display: flex; }
  .msg-dots { display: flex; }

  /* ─── 모바일 갤러리: fullscreen 크롭으로 복귀, 인라인 object-position이 face safe ─── */
  .gal-card:not(.gal-intro) {
    display: block;
    background: var(--bg-alt);   /* 다크 → 크림 톤 fallback */
  }
  .gal-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* object-position은 각 img의 인라인 style 그대로 사용 (이미 사진별 보정값 있음) */
    transform: scale(1);
    transition: transform 9s ease-in-out;
    margin: 0;
    max-height: none;
  }
  .gal-card:not(.gal-intro).is-current .gal-bg {
    transform: scale(1.08);
  }
  .gal-scrim { display: block; }
  .gal-overlay {
    position: absolute;
    bottom: 9vh;
    left: 0; right: 0;
    flex: none;
    display: block;
    padding: 0 24px;
    text-align: center;
  }
  /* 사진 위 흰 텍스트 + dark/white halo */
  .gal-msg, .gal-caption {
    color: #fff !important;
    text-shadow:
      0 0 10px rgba(0, 0, 0, 0.9),
      0 0 24px rgba(0, 0, 0, 0.65),
      0 0 38px rgba(255, 255, 255, 0.55),
      0 0 64px rgba(255, 255, 255, 0.3) !important;
  }
  .gal-meta {
    color: #fff !important;
    text-shadow:
      0 0 8px rgba(0, 0, 0, 0.85),
      0 0 18px rgba(0, 0, 0, 0.5) !important;
  }

  .closing .hand { font-size: 2rem; }
  .slide h2 { font-size: 1.6rem; }
}

@media (max-width: 540px) {
  html { font-size: 16px; }   /* 폰: 가장 작은 단계 */
  .slide { padding: 40px 18px; }
  /* 풀스크린 섹션: .slide 모바일 padding 오버라이드 — dark bg가 테두리로 보이는 것 방지 */
  .hero, .gallery-carousel { padding: 0; }
  .closing { padding: 6vh 18px 0; }
  .hero-text h1 { font-size: 1.6rem; }
  .hero-text .lede { display: none; }

  /* 메시지 모바일 컴팩트 — 헤딩 영역만 줄이고 카드는 유지 */
  .messages h2 { margin: 0 0 6px; font-size: 1.5rem; }
  .messages .section-sub { margin: 0 0 16px; font-size: 0.92rem; }
  .msg-carousel { margin-top: 8px; }
  .msg-dots { margin-top: 14px; }
  /* 카드 사이즈는 위 920px 블록 그대로 — 시원하게 */

  /* 클로징 모바일 — hand는 상단에서 적당히 작게, 본문은 하단 컴팩트 */
  .closing .hand { font-size: 1.6rem; top: 5vh; }
  .closing-body { font-size: 1rem; margin-bottom: 18px; }
  .closing-replay { padding: 11px 24px; margin-bottom: 18px; font-size: 0.92rem; }
  .gal-msg { font-size: 1.35rem; }
  .gal-caption { font-size: 1.3rem; }

  /* 약력(걸어오신 길): 모바일은 stack + 중앙정렬 */
  .timeline {
    max-width: 100%;
    align-items: center;
    gap: 22px;
  }
  .timeline::before { display: none; }
  .t-item {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: center;
  }
  .t-item::before { display: none; }
  .t-year { text-align: center; }
}

/* ────────────  세로가 짧은 화면(노트북/창 축소 등) — 히어로 텍스트가 인물 얼굴을 덮지 않도록 ──────────── */
/* 윈도우 1365×945처럼 가로는 넓지만 세로가 짧은 경우: 폭 기준 @media엔 안 걸리므로 높이 기준으로 별도 처리 */
@media (max-height: 1000px) and (min-width: 921px) {
  .hero-text { bottom: 44px; }
  .hero-text .eyebrow { font-size: 1.7rem; margin-bottom: 8px; }
  .hero-text h1     { font-size: 2.2rem; margin-bottom: 14px; }
  .hero-text .date  { font-size: 1.9rem; margin-bottom: 14px; }
  .hero-text .lede  { font-size: 1rem;   margin-bottom: 18px; }
  .scroll-hint      { font-size: 1.1rem; }
}
@media (max-height: 780px) and (min-width: 921px) {
  .hero-text { bottom: 36px; }
  .hero-text .eyebrow { font-size: 1.5rem; margin-bottom: 6px; }
  .hero-text h1     { font-size: 1.9rem; margin-bottom: 10px; }
  .hero-text .date  { font-size: 1.6rem; margin-bottom: 10px; }
  .hero-text .lede  { display: none; }   /* 아주 짧은 화면: 본문 숨겨 얼굴 확보 */
  .scroll-hint      { font-size: 1rem; }
}

/* ── 모바일: 추억 썸네일 그리드를 여러 열로 꽉 채움 (썸네일 작아도 OK) ── */
@media (max-width: 920px) {
  .gal-intro-inner { padding: 0 16px; }
  .gal-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    column-gap: 10px;
    row-gap: 10px;
    max-height: 62vh;
  }
}
@media (max-width: 540px) {
  .gal-intro-inner { padding: 0 12px; }
  .gal-grid {
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    column-gap: 7px;
    row-gap: 7px;
    max-height: 62vh;
    margin-top: 14px;
  }
}

/* ════════════════════════════════════════════════
   라이트박스 — 갤러리 사진 크게 보기
   ════════════════════════════════════════════════ */
.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 8, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  padding: 28px;
  cursor: zoom-out;
}
.gal-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.gal-lightbox .gal-lb-img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 14px 60px rgba(0,0,0,0.5);
  transform: scale(0.96);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: zoom-out;             /* 사진 다시 누르면 닫힘을 시각적으로 안내 */
}
.gal-lightbox.is-open .gal-lb-img { transform: scale(1); }
.gal-lightbox .gal-lb-cap {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #f6efdf;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: min(720px, 92vw);
  padding: 10px 18px;
  background: rgba(0,0,0,0.35);
  border-radius: 6px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.gal-lightbox .gal-lb-cap:empty { display: none; }
.gal-lightbox .gal-lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #f6efdf;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}
.gal-lightbox .gal-lb-close:hover { background: rgba(255,255,255,0.22); }

/* 멘트 없는 사진 카드 — overlay 없이 표시 */
.gal-card.gal-nocap .gal-overlay { display: none; }
.gal-bg, .gal-thumb { cursor: zoom-in; }

/* ════════════════════════════════════════════════
   책자 섹션 — 한 페이지씩 책 넘기듯
   ════════════════════════════════════════════════ */
.book-section {
  background: linear-gradient(180deg, #efe4c8 0%, #d9c8a5 100%);
  color: #4a3a26;
  padding: 0;                       /* .slide 기본 60 28 padding 무력화 — 풀스크린 */
}
.book-section .slide-inner {
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;                        /* 24 → 14 여백 줄임 */
  padding: 12px 8px 8px;
}
.book-section .book-title {
  margin: 0;
  /* font-family 명시 없음 → 다른 섹션 h2 와 동일 Noto Serif KR */
  font-weight: 700;
  font-size: 2rem;
  color: #5a4628;
}

.book {
  position: relative;
  /* aspect-ratio 3:2 자연 유지 — 1920 화면에서 약 1500×1000 으로 자동, 가로 늘어남 방지 */
  width: min(95vw, 1500px);
  max-height: 86vh;                /* 화면 높이 넘으면 width 도 같이 줄어듦 (object-fit 처럼) */
  aspect-ratio: 3 / 2;
  perspective: 2600px;
  margin: 0 auto;
}
.book-spread {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 2px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);        /* 자연스럽게 위에서 fade-up */
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}
.book-spread img {
  flex: 1 1 50%;
  height: 100%;
  width: 50%;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(60,40,16,0.32), 0 0 0 1px rgba(0,0,0,0.04);
}
/* 첫 표지: 한 장만 가운데 표시 */
.book-spread.book-cover { justify-content: center; }
.book-spread.book-cover img { flex: 0 0 50%; width: 50%; }
.book-spread.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 2;
}
.book-spread.is-flipping-next {
  opacity: 0;
  transform: translateY(-18px);   /* 위로 살짝 빠지면서 사라짐 */
  z-index: 1;
}
.book-spread.is-flipping-prev {
  opacity: 0;
  transform: translateY(-18px);
  z-index: 1;
}

.book-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 4px;
}
.book-section .book-nav button {
  background: rgba(90,70,40,0.10);
  border: 1px solid rgba(90,70,40,0.32);
  color: #5a4628;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.18s ease;
}
.book-section .book-nav button:hover {
  background: rgba(90,70,40,0.18);
  transform: scale(1.06);
}
.book-section .book-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.book-counter {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: rgba(74,58,38,0.78);
  min-width: 60px;
  text-align: center;
}

@media (max-width: 720px) {
  .book { width: 92vw; }
  .book-section .book-title { font-size: 1.4rem; }
}

/* ── 모바일에서만 prev/next 아이콘을 단순화 (데스크탑은 ⏮⏭ 그대로) ── */
@media (max-width: 768px) {
  .songs-section .am-prev,
  .songs-section .am-next {
    font-size: 0 !important;
  }
  .songs-section .am-prev::after { content: '‹'; font-size: 1.8rem; }
  .songs-section .am-next::after { content: '›'; font-size: 1.8rem; }
}

/* ── 책자 모바일: 한 페이지씩 표시 ── */
@media (max-width: 768px) {
  .book {
    aspect-ratio: 3 / 4;             /* 단일 페이지 비율 */
    max-height: 78vh;
  }
  .book-spread.book-mobile-single img {
    flex: 0 0 100%;
    width: 100%;
  }
}


/* ───────── 갤러리 영상 카드 (성도 영상 메시지) ───────── */
.gal-card.gal-video { background: #14100b; }
.gal-video-el {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;          /* 세로/가로 무관 — 영상 전체 표시 */
  background: #14100b;
  z-index: 0;
}
.gal-vid-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(0,0,0,0.35) 0%, transparent 22%, transparent 50%, rgba(0,0,0,0.80) 100%);
}
.gal-vid-info {
  position: absolute; left: 0; right: 0; bottom: 64px;
  z-index: 2; text-align: center; color: #fff;
  padding: 0 32px; max-width: 900px; margin: 0 auto;
  pointer-events: auto;          /* 긴 스크립트 스크롤 허용 */
}
.gal-vid-script {
  font-family: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  font-weight: 500; font-size: 1.15rem; line-height: 1.7;
  margin: 0 0 14px; color: #fff;
  max-height: 34vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95), 0 0 14px rgba(0,0,0,0.85);
}
.gal-vid-name {
  font-family: "StartOver", "Gaegu", "Apple SD Gothic Neo", cursive;
  font-weight: 700; font-size: 1.5rem; color: #fff; margin: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(0,0,0,0.9), 0 0 28px rgba(0,0,0,0.7);
}
.gal-vid-ctrl {
  position: absolute; top: 16px; right: 16px; z-index: 4;
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,0.42); border-radius: 999px;
  padding: 7px 14px; backdrop-filter: blur(4px);
}
.gal-vid-mute {
  background: none; border: none; color: #fff;
  cursor: pointer; line-height: 0; padding: 0;
  display: inline-flex; align-items: center;
}
.gal-vid-mute svg { display: block; }
.gal-vid-vol { width: 84px; cursor: pointer; accent-color: #d8c08a; }
@media (max-width: 767px) {
  .gal-vid-info { bottom: 9vh; padding: 0 20px; }
  .gal-vid-script { font-size: 1.02rem; max-height: 30vh; }
  .gal-vid-name { font-size: 1.2rem; }
  .gal-vid-ctrl { top: 12px; right: 12px; padding: 6px 12px; }
  .gal-vid-vol { width: 70px; }
}


/* ───────── 갤러리 인트로 그리드: 영상 썸네일(첫 프레임) + 재생 뱃지 ───────── */
.gal-thumb video { width: 100%; height: auto; display: block; }
.gal-thumb-video { position: relative; }
.gal-thumb-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.46); pointer-events: none;
}
.gal-thumb-play::after {
  content: ''; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
}
