/* ============================================================
   Welle Fotografien — 미리보기 사이트 공통 스타일
============================================================ */
:root {
  --ink: #1d2328;
  --ink-soft: #4f4f4f;
  --muted: #8a8f93;
  --line: #e7e9eb;
  --paper: #ffffff;
  --paper-2: #f7f8f9;
  --accent: #0d1b26;
  --serif: "EB Garamond", "Noto Serif KR", serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font: 400 14px/1.75 var(--sans);
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- 헤더 ---------- */
/* 헤더는 화면에 고정하고, 원래 높이만큼 자리를 비워 둠.
   (헤더가 작아져도 페이지 높이가 변하지 않아 스크롤이 튀지 않음) */
.header-space { height: var(--header-h, 190px); }
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, padding .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  max-width: var(--max); margin: 0 auto;
  padding: 26px var(--gutter) 14px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: padding .3s ease, gap .3s ease;
}
.site-header.is-scrolled .site-header__inner { padding-top: 12px; padding-bottom: 8px; gap: 6px; }
.logo { display: block; width: clamp(170px, 26vw, 250px); transition: width .3s ease; }
.site-header.is-scrolled .logo { width: clamp(120px, 16vw, 160px); }
.logo img, .logo svg { width: 100%; height: auto; display: block; }

.nav { display: flex; gap: clamp(18px, 4.5vw, 54px); }
.nav a {
  font: 400 15px/1 var(--serif);
  letter-spacing: .06em;
  color: #212121;
  padding: 8px 2px;
  position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 2px;
  height: 1px; background: currentColor; transition: left .3s ease, right .3s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { left: 2px; right: 2px; }

/* ---------- 공통 레이아웃 ---------- */
main { min-height: 50vh; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.page-head { text-align: center; padding: clamp(36px, 7vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 {
  margin: 0; font: 400 clamp(28px, 4.4vw, 40px)/1.1 var(--serif);
  letter-spacing: .04em; color: var(--ink);
}
.page-head p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.eyebrow {
  display: block; font: 400 12px/1 var(--serif); letter-spacing: .24em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
}

/* ---------- 홈: 슬라이드 ---------- */
/* 사진 원래 비율(3:2)로 보여주고, 화면보다 커질 때만 높이를 제한.
   제한되어 잘릴 때는 사진마다 지정한 인물 위치(--fx, --fy)를 기준으로 자름 */
.hero {
  position: relative; width: 100%;
  aspect-ratio: 3 / 2;
  max-height: calc(100vh - var(--header-h, 190px) + 40px);
  max-height: calc(100svh - var(--header-h, 190px) + 40px);
  background: var(--paper-2);
}
.hero__slide {
  position: absolute; inset: 0; overflow: hidden;
  opacity: 0; transition: opacity 1.6s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero { isolation: isolate; }
.hero__slide.is-prev { opacity: var(--po, 1); transition: none; z-index: -1; }   /* 교차할 때 아래에 깔리는 이전 사진 (누른 순간의 투명도 그대로) */
.hero__slide.is-prev2 { opacity: 1; transition: none; z-index: -2; }
.hero__slide:not(.is-active):not(.is-prev):not(.is-prev2) { z-index: -3; }   /* 정리된 이전 사진이 사라지는 동안 현재 사진 위로 올라오지 않게 */                /* 교차 도중 다시 눌렀을 때 그 밑장 */
.hero__slide img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--fx, 50%) var(--fy, 50%);
  transform-origin: var(--fx, 50%) var(--fy, 50%);
  transform: scale(1.03); transition: transform 7s ease-out;
}
.hero__slide.is-active img { transform: scale(1); }

/* 넘김 표시: 사진 왼쪽에 세로로 쌓인 짧은 막대
   - 현재 사진의 막대는 길어지고, 다음 사진까지 남은 시간만큼 흰색으로 차오름 */
.hero__dots {
  position: absolute; left: clamp(16px, 2.6vw, 36px); top: 50%; z-index: 3;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-start;
  filter: drop-shadow(0 0 1px rgba(0,0,0,.6)) drop-shadow(0 0 4px rgba(0,0,0,.25));
}
.hero__dots button {
  position: relative; display: block; width: 34px; height: 13px; padding: 0; border: 0;
  background: none; cursor: pointer;
}
.hero__dots button::before, .hero__dots button i {
  content: ""; position: absolute; left: 0; top: 5.5px; height: 2px; border-radius: 2px;
}
.hero__dots button::before { width: 12px; background: rgba(255,255,255,.72); transition: width .45s ease, background .3s; }
.hero__dots button:hover::before { width: 20px; background: rgba(255,255,255,.9); }
.hero__dots button.is-active::before { width: 34px; background: rgba(255,255,255,.45); }
.hero__dots button i { width: 0; background: #fff; display: block; }
.hero.is-playing .hero__dots button.is-active i { animation: heroFill var(--slide-ms, 5000ms) linear forwards; }
.hero:not(.is-playing) .hero__dots button.is-active i { width: 34px; }
@keyframes heroFill { from { width: 0; } to { width: 34px; } }
@media (max-width: 760px) {
  .hero__dots button { width: 26px; height: 10px; }
  .hero__dots button::before, .hero__dots button i { top: 4px; }
  .hero__dots button::before { width: 9px; }
  .hero__dots button.is-active::before { width: 26px; }
  .hero:not(.is-playing) .hero__dots button.is-active i { width: 26px; }
  @keyframes heroFill { from { width: 0; } to { width: 26px; } }
}
@media (prefers-reduced-motion: reduce) { .hero.is-playing .hero__dots button.is-active i { animation: none; width: 100%; } }

/* 사진 위 하단 정보 — 옅은 흰 글씨 + 얇은 그림자 테두리로 어떤 색 위에서도 읽힘 */
.hero__info {
  position: absolute; right: clamp(16px, 2.6vw, 36px); bottom: 30px; z-index: 3;
  max-width: min(440px, 46%); text-align: right; pointer-events: none;
  color: rgba(255,255,255,.82); font-size: 11px; line-height: 1.7; letter-spacing: .01em;
  text-shadow: 0 0 1px rgba(0,0,0,.55), 0 0 2px rgba(0,0,0,.35), 0 1px 8px rgba(0,0,0,.3);
}
.hero__info a { pointer-events: auto; color: inherit; }
.hero__info .row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 10px; }
.hero__info .ig {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font: 400 16px/1 var(--serif); letter-spacing: .06em; color: #fff;
  animation: igHop 7s ease-in-out 2.5s infinite;
}
.hero__info .ig svg { width: 22px; height: 22px; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)) drop-shadow(0 1px 6px rgba(0,0,0,.25)); }
.hero__info .ig:hover { animation-play-state: paused; opacity: 1; }
.hero__info .ig:hover span { text-decoration: underline; text-underline-offset: 3px; }
/* 가끔 두 번 통통 튀어서 눌러보게 */
@keyframes igHop {
  0%, 82%, 100% { transform: translateY(0); }
  86% { transform: translateY(-7px); }
  89% { transform: translateY(0); }
  92% { transform: translateY(-4px); }
  95% { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .hero__info .ig { animation: none; } }
.hero__info .copy { font: 400 11px/1.6 var(--serif); letter-spacing: .05em; opacity: .85; }
@media (max-width: 760px) {
  .hero__info { font-size: 9px; line-height: 1.55; bottom: 10px; max-width: 64%; }
  .hero__info .row { gap: 0 7px; }
  .hero__info .ig { font-size: 13px; margin-bottom: 5px; }
  .hero__info .ig svg { width: 18px; height: 18px; }
  .hero__info .copy { font-size: 9.5px; }
}
.home .site-footer { display: none; }   /* 홈은 사진 위에 같은 정보가 있음 */
}

/* ---------- 인스타그램 섹션 ---------- */
.insta { padding: clamp(48px, 8vw, 88px) 0; text-align: center; }
.insta__head h2 { margin: 0; font: 400 clamp(22px, 3vw, 28px)/1.2 var(--serif); letter-spacing: .05em; color: var(--ink); }
.insta__head a { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.insta__head a:hover { color: var(--ink); }
.insta__grid {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
.insta__grid a { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.insta__grid img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform .6s ease, opacity .3s; }
.insta__grid a:hover img { transform: scale(1.04); opacity: .9; }
@media (max-width: 760px) { .insta__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 갤러리 목록 ---------- */
.albums {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.4vw, 28px); padding-bottom: clamp(56px, 8vw, 96px);
}
.album-card { display: block; }
.album-card__img { aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper-2); }
.album-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.album-card:hover .album-card__img img { transform: scale(1.04); }
.album-card__meta { padding: 14px 2px 0; text-align: center; }
.album-card__title { font: 400 18px/1.3 var(--serif); letter-spacing: .03em; color: var(--ink); }
.album-card__count { font-size: 12px; color: var(--muted); }
@media (max-width: 860px) { .albums { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .album-card__title { font-size: 16px; } }

/* ---------- 앨범 상세 ---------- */
.album-nav {
  display: flex; justify-content: space-between; align-items: center;
  font: 400 14px/1 var(--serif); letter-spacing: .05em; color: var(--muted);
  padding: 0 0 24px;
}
.album-nav a:hover { color: var(--ink); }
/* 앨범: 아임웹 상세설명처럼 한 줄로, 올린 순서 그대로 — 사진 한 장이 한 화면에 다 들어오게 */
.masonry { display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 4vw, 48px); padding-bottom: clamp(56px, 8vw, 96px); }
.masonry a { display: block; max-width: 100%; cursor: zoom-in; }
.masonry img {
  display: block; width: auto; height: auto; max-width: 100%;
  max-height: calc(100vh - 176px);    /* 스크롤하면 작아지는 헤더 높이 + 여백 */
  max-height: calc(100svh - 176px);
  opacity: 0; transition: opacity .6s ease;
}
.masonry img.is-loaded { opacity: 1; }
/* 물결 전환으로 이미 보여준 페이지: 사진이 다시 서서히 나타나지 않게 */
html.seamless .masonry img { transition: none; }
@media (max-width: 640px) { .masonry { gap: 12px; } .masonry img { max-height: calc(100svh - 148px); } }

/* ---------- 라이트박스 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(255,255,255,.97);
  display: none; align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  cursor: zoom-out;   /* 누르면 다시 작아짐 */
  max-width: min(92vw, 1400px); max-height: 86vh; width: auto; height: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.lightbox button {
  position: absolute; border: 0; background: none; cursor: pointer;
  color: var(--ink); font: 300 28px/1 var(--serif); padding: 16px;
}
.lightbox__close { top: 8px; right: 12px; }
.lightbox__prev { left: 6px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 6px; top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  font: 400 13px/1 var(--serif); letter-spacing: .1em; color: var(--muted);
}

/* ---------- 상품 안내 ---------- */
.notice {
  max-width: 760px; margin: 0 auto clamp(40px, 6vw, 64px);
  padding: 0; list-style: none; font-size: 14px; color: var(--ink-soft);
}
.notice li { position: relative; padding-left: 16px; margin: 6px 0; }
.notice li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }
.notice li.note { color: var(--muted); font-size: 13px; margin-top: 14px; }
.notice li.note::before { content: "*"; }

.pkg { max-width: 880px; margin: 0 auto clamp(40px, 6vw, 64px); }
.pkg__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.pkg__head h2 { margin: 0; font: 500 18px/1.3 var(--sans); color: var(--ink); letter-spacing: -.01em; }
.pkg__head span { font: 400 14px/1 var(--serif); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.pkg-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.pkg-table th, .pkg-table td { border-top: 1px solid var(--line); padding: 16px 14px; text-align: center; vertical-align: middle; }
.pkg-table tr:last-child th, .pkg-table tr:last-child td { border-bottom: 1px solid var(--line); }
.pkg-table thead th { font-weight: 500; color: var(--ink); background: var(--paper-2); }
.pkg-table tbody th { width: 120px; font-weight: 500; color: var(--ink); text-align: left; }
.pkg-table td small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pkg-table td .sub { display: block; margin-top: 4px; }
@media (max-width: 600px) {
  .pkg-table { font-size: 13px; }
  .pkg-table th, .pkg-table td { padding: 12px 8px; }
  .pkg-table tbody th { width: 72px; }
}
.cta-row { text-align: center; padding-bottom: clamp(56px, 8vw, 96px); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 200px; padding: 15px 28px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
  font: 400 14px/1 var(--serif); letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; transition: background .25s, color .25s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn--solid { background: var(--ink); color: #fff; }
.btn--solid:hover { background: #000; }
.btn--kakao { background: #fee500; border-color: #fee500; color: #191919; font-family: var(--sans); letter-spacing: 0; text-transform: none; font-weight: 500; }
.btn--kakao:hover { background: #f5dc00; color: #191919; }

/* ---------- 예약 ---------- */
.consult { max-width: 640px; margin: 0 auto; text-align: center; padding-bottom: clamp(48px, 7vw, 80px); }
.consult p { margin: 0 0 6px; }
.consult .btn { margin-top: 22px; }
.divider { height: 1px; background: var(--line); max-width: 880px; margin: 0 auto; }

.contract { max-width: 760px; margin: 0 auto; padding: clamp(48px, 7vw, 80px) 0 clamp(56px, 8vw, 96px); }
.contract h2 { text-align: center; margin: 0 0 6px; font: 400 clamp(24px, 3.4vw, 30px)/1.2 var(--serif); letter-spacing: .05em; color: var(--ink); }
.contract .lead { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 32px; }
.demo-badge {
  display: block; width: fit-content; margin: 0 auto 28px;
  padding: 6px 14px; border-radius: 999px; background: #fff6e0; color: #8a6a1c;
  font-size: 12px; letter-spacing: .02em;
}
.terms {
  border: 1px solid var(--line); background: var(--paper-2);
  height: 280px; overflow-y: auto; padding: 20px 22px;
  font-size: 13px; line-height: 1.8; white-space: pre-line; color: var(--ink-soft);
}
.terms h3 { margin: 0 0 8px; font-size: 14px; color: var(--ink); }
.field { margin: 26px 0 0; }
.field > label, .field > .label { display: block; font-weight: 500; color: var(--ink); margin-bottom: 8px; font-size: 14px; }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
.input, .textarea {
  width: 100%; border: 1px solid #d9dcdf; background: #fff; border-radius: 0;
  padding: 13px 14px; font: 400 15px/1.4 var(--sans); color: var(--ink);
  transition: border-color .2s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); }
.textarea { min-height: 120px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 12px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: block; padding: 12px 14px; border: 1px solid #d9dcdf; cursor: pointer;
  font-size: 14px; transition: border-color .2s, background .2s;
}
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.yn { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.yn:first-child { border-top: 1px solid var(--line); }
.yn .choices { grid-template-columns: repeat(2, 90px); }
.yn .choice span { padding: 8px 10px; text-align: center; }
details.privacy { margin-top: 12px; border: 1px solid var(--line); }
details.privacy summary { cursor: pointer; padding: 12px 14px; font-size: 13px; color: var(--ink-soft); }
details.privacy .terms { border: 0; border-top: 1px solid var(--line); height: 240px; }
.submit-row { margin-top: 36px; text-align: center; }
@media (max-width: 560px) {
  .choices { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
}

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 20px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 300;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 푸터 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px var(--gutter) 48px; text-align: center; font-size: 12px; color: #6b7075; }
.site-footer .insta-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font: 400 13px/1 var(--serif); letter-spacing: .08em; margin-bottom: 18px; }
.site-footer .insta-link svg { width: 18px; height: 18px; }
.site-footer .info { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 0 auto 10px; max-width: 760px; }
.site-footer .copy { color: var(--muted); font-family: var(--serif); letter-spacing: .04em; font-size: 13px; }

/* ============================================================
   홈 첫 화면 — 스크롤과 함께 움직이는 물결 전환
   - 맨 위: 사진이 로고·메뉴 뒤까지 꽉 참 (흰 로고)
   - 스크롤한 만큼 위에서 흰 물결이 차오르고 로고가 검게 바뀜
   - 레이아웃 크기는 그대로, 보이는 것만 바뀌어서 스크롤이 튀지 않음
   (진행도 --p 와 위쪽 확장 --ext 는 스크립트가 스크롤에 맞춰 넣음)
============================================================ */
.js-hero .hero { aspect-ratio: auto; max-height: none; height: var(--hero-h); }
/* 페이지가 짧아도 물결 전환을 끝까지 볼 수 있게 최소 길이 확보 */
.js-hero { min-height: calc(100vh + var(--span, 400px) + 2px); }
/* 사진을 헤더 뒤까지 위로 늘림 (스크롤할수록 줄어듦) */
.js-hero .hero__slide { top: calc(-1 * var(--ext, 0px)); bottom: var(--exb, 0px); }
.js-hero .hero__shade { top: calc(-1 * var(--ext, 0px)); }
.hero { cursor: pointer; }
.hero a, .hero button { cursor: pointer; }

/* 홈 헤더: 배경은 물결 그림이 대신함 */
.home .site-header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.home .site-header.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; }
.hdr-wave { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% + 90px); z-index: -1; pointer-events: none; overflow: visible; }
.hdr-wave path { fill: rgba(255, 255, 255, .97); }
/* 물결 아래 사진을 살짝 흐리게 — 아래로 갈수록 선명 */
.hdr-blur {
  position: absolute; left: 0; right: 0; top: 0; height: 0; z-index: -2; pointer-events: none;
  -webkit-backdrop-filter: blur(var(--tb, 0px)); backdrop-filter: blur(var(--tb, 0px));
  -webkit-mask-image: linear-gradient(#000 45%, transparent);
          mask-image: linear-gradient(#000 45%, transparent);
  transition: opacity .3s ease;
}
.home .logo img { transition: width .3s ease; }

/* 사진 위 은은한 그늘 (흰 로고가 밝은 하늘 위에서도 보이게) */
.hero__shade {
  position: absolute; left: 0; right: 0; height: 42%; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .32), rgba(0, 0, 0, 0));
  opacity: 0;
}


/* ============================================================
   자체 스크롤바 (마우스 쓰는 기기)
   기본 스크롤바는 화면 폭을 차지해서, 나타나고 사라질 때 화면이 툭 끊김.
   기본 것은 숨기고 화면 위에 얇게 떠 있는 스크롤바를 씀.
============================================================ */
@media (hover: hover) and (pointer: fine) {
  html { scrollbar-width: none; }
  html::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
.sbar {
  position: fixed; top: 0; right: 0; bottom: 0; width: 14px; z-index: 150;
  opacity: 0; transition: opacity .45s ease;
}
.sbar.is-on, .sbar:hover, .sbar.is-drag { opacity: 1; }
.sbar.is-off { display: none; }
.sbar__thumb {
  position: absolute; top: 0; right: 4px; width: 4px; min-height: 36px; border-radius: 4px;
  background: rgba(29, 35, 40, .34);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .55);
  transition: width .2s ease, right .2s ease, background .2s ease;
  cursor: grab;
}
.sbar:hover .sbar__thumb, .sbar.is-drag .sbar__thumb { width: 7px; right: 3px; background: rgba(29, 35, 40, .55); }
.sbar.is-drag .sbar__thumb { cursor: grabbing; }
.sbar-dragging, .sbar-dragging * { user-select: none !important; cursor: grabbing !important; }

/* 사진 아래 경계를 살짝 흐리게 */
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 56px; z-index: 2; pointer-events: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%);
  background: linear-gradient(rgba(255,255,255,0) 0%, rgba(255,255,255,0) 35%, rgba(255,255,255,.55) 80%, #fff 100%);
}
@media (max-width: 760px) { .hero__fade { height: 34px; -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* PC: 스크롤하면 사진 위로 포토카드가 회전하며 올라옴 (카드별 위치·각도는 스크립트가 매 프레임 넣음) */
.has-dock main { position: relative; }   /* 화면 아래 끝 밖의 카드는 화면(스크롤 없음)에서 잘려 '아래에서 올라오는' 모습 */
.has-dock .flow {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 0 0 clamp(26px, 4.5vh, 52px); background: none;
  overflow: visible;   /* 위로 솟은 카드와 블러가 띠 윗선에서 잘리지 않게 */
}
.has-dock .flow__track { padding: 90px 0; margin: -90px 0; }       /* 곡선으로 내려간 카드가 잘리지 않게 여유 */
.has-dock .flow__row a {
  opacity: 0; will-change: transform; transform-origin: 50% 100%;
  border-radius: 3px; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .45);
}
.has-dock .flow__row a:hover img { transform: none; }
.has-dock .flow__row { gap: 16px; padding-right: 16px; }
.has-dock .flow__row img { height: clamp(120px, 10vw, 190px); }   /* 사진 위에 얹히는 작은 포토카드 크기 */
.has-dock .hero__fade { display: none; }
/* 스크롤 없는 한 화면 */
html.no-scroll, html.no-scroll body { overflow: hidden; height: 100%; height: 100lvh; }
.has-dock.js-hero { min-height: 0; }
/* 카드가 내려가 있을 땐 'Gallery' 블러가 뜨지 않게 */
.has-dock .flow:not(.is-up) .flow__hover { opacity: 0 !important; pointer-events: none; }
html.no-scroll, html.no-scroll body { overscroll-behavior: none; }
html.no-scroll { background-color: #111; transition: background-color 1.2s ease; }
html.no-scroll body { background: transparent; }
/* 모바일: 카드 크기를 화면 폭에 맞춤, 'Gallery' 글자는 카드가 올라왔을 때만 */
@media (max-width: 760px) {
  .has-dock .flow__row { gap: 10px; padding-right: 10px; }
  .has-dock .flow__row img { height: clamp(104px, 29vw, 150px); }
  /* 카드는 아래 도구막대에 가리지 않게 보이는 화면(svh) 안쪽에 */
  .has-dock .flow { padding-bottom: clamp(34px, 6vh, 60px); padding-bottom: clamp(34px, 6svh, 60px); }   /* 기울어진 카드 모서리가 화면 아래에서 잘리지 않게 */
  .has-dock .flow__cta, .has-dock .flow__stage::after { transition: opacity .45s ease; }
  .has-dock .flow:not(.is-up) .flow__cta, .has-dock .flow:not(.is-up) .flow__stage::after { opacity: 0; pointer-events: none; }
}

/* 홈 아래: 갤러리 사진이 천천히 옆으로 흐르는 띠 */
.flow { position: relative; padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 8vw, 88px); overflow: hidden; }
.flow__track {
  display: flex; width: max-content;
  animation: flow 140s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.flow__row { display: flex; gap: 10px; padding-right: 10px; }
.flow__row a { flex: none; display: block; background: var(--paper-2); overflow: hidden; }
.flow__row img { height: clamp(170px, 22vw, 300px); width: auto; display: block; transition: transform .8s ease, opacity .3s; }
.flow__row a:hover img { transform: scale(1.03); }
@keyframes flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* 모바일: 흐르는 사진 위에 흰 'Gallery' 글자를 겹쳐 보여줌 */
.flow__cta {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%);
  font: 400 clamp(30px, 9vw, 40px)/1 "Domine", var(--serif); letter-spacing: .03em; color: #fff; white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0,0,0,.45), 0 4px 22px rgba(0,0,0,.35);
  padding: 14px 18px;
}
.flow__cta span { display: inline-block; margin-left: .22em; font-size: .72em; transition: transform .3s ease; }
.flow__cta:hover span { transform: translateX(5px); }
@media (max-width: 760px) {
  .flow { padding: 14px 0 22px; }
  .flow__row img { height: 240px; }
  /* 글자가 잘 읽히도록 사진 띠 가운데를 살짝 어둡게 */
  .flow__stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(0,0,0,.22), transparent 75%); }
}
@media (prefers-reduced-motion: reduce) { .flow__track { animation: none; } .flow { overflow-x: auto; } }

/* 마우스를 올리면: 사진은 계속 흐르고, 위에 블러 막 + 'Gallery' 표시 + 물결 */
.flow__stage { position: relative; }
.flow__hover { display: none; }
@media (hover: hover) and (pointer: fine) {
  .flow__hover {
    display: flex; align-items: center; justify-content: center;
    position: absolute; inset: -110px 0; z-index: 2;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255,255,255,.2), rgba(255,255,255,0));
    -webkit-backdrop-filter: blur(7px) saturate(115%); backdrop-filter: blur(7px) saturate(115%);
    /* 경계가 보이지 않게: 가운데는 흐리고 바깥으로 갈수록 서서히 사라짐 */
    -webkit-mask-image: radial-gradient(ellipse 52% 50% at 50% 50%, #000 45%, transparent 100%);
            mask-image: radial-gradient(ellipse 52% 50% at 50% 50%, #000 45%, transparent 100%);
    opacity: 0; transition: opacity .55s ease; cursor: pointer;
  }
  .flow__stage:hover .flow__hover, .flow__hover:focus-visible { opacity: 1; }
  /* 'Gallery' 글자만 — 버튼 모양 없이 Domine 서체로 */
  .flow__label {
    position: relative; z-index: 1;
    font: 400 clamp(34px, 4vw, 58px)/1 "Domine", var(--serif); letter-spacing: .03em; color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,.45), 0 4px 22px rgba(0,0,0,.35);
    transform: translateY(8px);
    transition: transform .7s ease, opacity .3s ease;
  }
  .flow__stage:hover .flow__label { transform: translateY(0); }
  .flow__hover:active .flow__label { opacity: .7; }
  .flow__label span { display: inline-block; margin-left: .22em; font-size: .72em; transition: transform .4s ease; }
  .flow__hover:hover .flow__label > span { transform: translateX(8px); }
  .flow__ripple { position: absolute; inset: 110px 0; width: 100%; height: calc(100% - 220px); pointer-events: none; image-rendering: auto; filter: blur(3px); }
  .flow__cta { display: none; }   /* PC는 마우스를 올리면 뜨는 표시로 대신 */
}

/* ============================================================
   페이지 전환: 누른 자리에서부터 새 페이지가 번지듯 서서히 드러남
   (지원 브라우저: 최신 크롬·엣지·사파리 / 그 밖에는 부드럽게 나타나기만)
   누른 위치(--wx, --wy)는 페이지 머리의 작은 스크립트가 넣음
============================================================ */
@property --wr { syntax: '<length>'; inherits: true; initial-value: 0px; }
@view-transition { navigation: auto; }
html.water-nav::view-transition-old(root) { animation: none; }
html.water-nav::view-transition-new(root) {
  animation: waterReveal 1.9s cubic-bezier(.4, 0, .3, 1) both;
  /* 경계를 넓게 흐리고, 중심이 살짝 다른 두 원을 겹쳐 물이 번지듯 불규칙하게 */
  -webkit-mask-image:
    radial-gradient(circle at var(--wx, 50%) var(--wy, 50%), #000 calc(var(--wr) - 160px), transparent var(--wr)),
    radial-gradient(ellipse 115% 90% at calc(var(--wx, 50%) + 4%) calc(var(--wy, 50%) - 3%), #000 calc(var(--wr) * .9 - 180px), transparent calc(var(--wr) * .9));
          mask-image:
    radial-gradient(circle at var(--wx, 50%) var(--wy, 50%), #000 calc(var(--wr) - 160px), transparent var(--wr)),
    radial-gradient(ellipse 115% 90% at calc(var(--wx, 50%) + 4%) calc(var(--wy, 50%) - 3%), #000 calc(var(--wr) * .9 - 180px), transparent calc(var(--wr) * .9));
}
@keyframes waterReveal { from { --wr: 0px; } to { --wr: calc(160vmax + 200px); } }   /* 화면 끝까지 딱 닿는 크기 */
html.water-nav::view-transition-group(root) { animation-duration: 1.9s; }
/* 페이지 전환을 지원하지 않는 브라우저 */
html.page-fade body { animation: pageFade .7s ease both; }
/* 물결 전환 뒤 실제 이동: 이전 화면(이미 새 페이지 모습)을 잠깐 덮어 두었다가 살며시 걷어냄 → 다시 로딩되는 느낌 없음 */
html.seamless::view-transition-new(root) { animation: none; }
html.seamless::view-transition-old(root) { animation: seamOut .45s ease .15s both; }
@keyframes seamOut { to { opacity: 0; } }
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html.water-nav::view-transition-new(root) { animation: none; -webkit-mask-image: none; mask-image: none; }
}

/* 버튼 → 갤러리: 미리 불러온 페이지를 누른 자리에서부터 번지듯 드러냄 */
.page-reveal {
  position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2147483000;
  background: #fff; pointer-events: none;
  --wr: 0px;
  -webkit-mask-image:
    radial-gradient(circle at var(--wx, 50%) var(--wy, 50%), #000 calc(var(--wr) - 160px), transparent var(--wr)),
    radial-gradient(ellipse 115% 90% at calc(var(--wx, 50%) + 4%) calc(var(--wy, 50%) - 3%), #000 calc(var(--wr) * .9 - 180px), transparent calc(var(--wr) * .9));
          mask-image:
    radial-gradient(circle at var(--wx, 50%) var(--wy, 50%), #000 calc(var(--wr) - 160px), transparent var(--wr)),
    radial-gradient(ellipse 115% 90% at calc(var(--wx, 50%) + 4%) calc(var(--wy, 50%) - 3%), #000 calc(var(--wr) * .9 - 180px), transparent calc(var(--wr) * .9));
}
.page-reveal.is-go { animation: waterReveal 1.9s cubic-bezier(.4, 0, .3, 1) forwards; }
html.is-leaving, html.is-leaving * { cursor: progress !important; }
html.is-leaving .flow__label { opacity: .7; }   /* 불러오는 동안 살짝 눌린 느낌 */

/* ============================================================
   갤러리 — 왼쪽 큰 칸(사진 디졸브) + 오른쪽 8칸 (스크롤 없이 한 화면)
============================================================ */
.compact main { min-height: 0; }
.gx {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px;
  height: calc(100vh - var(--header-h, 100px) - 28px);
  height: calc(100svh - var(--header-h, 100px) - 28px);
  min-height: 460px; max-width: 1560px; margin: 8px auto 20px; padding: 0 var(--gutter);
}
.gx__big { position: relative; display: block; overflow: hidden; background: var(--paper-2); color: #fff; }
.gx__stage { position: absolute; inset: 0; }
.gx__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1.4s ease, transform 6s ease-out;
}
.gx__img.is-on { opacity: 1; transform: scale(1); }
html.seamless .gx__img { transition: none; transform: none; }
.gx__shade { position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(transparent, rgba(0,0,0,.18) 45%, rgba(0,0,0,.55)); }
.gx__meta { position: absolute; z-index: 1; left: clamp(18px, 2.4vw, 34px); bottom: clamp(16px, 2.2vw, 30px); transition: opacity .26s ease, transform .26s ease; }
/* 밝은 사진(흰 커튼 등) 위에서도 글자가 보이도록 글자 뒤에 아주 옅은 어둠을 깔아 줌 */
.gx__meta::before { content: ""; position: absolute; inset: -40px -70px -30px -50px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0,0,0,.32), rgba(0,0,0,0)); }
.gx__title { display: block; font: 400 clamp(30px, 3.6vw, 52px)/1.05 var(--serif); letter-spacing: .02em; text-shadow: 0 1px 14px rgba(0,0,0,.3); }
.gx__count { display: block; margin-top: 8px; font: 400 13px/1 var(--serif); letter-spacing: .16em; text-transform: uppercase; opacity: .9; text-shadow: 0 0 2px rgba(0,0,0,.45), 0 1px 10px rgba(0,0,0,.4); }
.gx__big.is-swapping .gx__meta { opacity: 0; transform: translateY(8px); }
/* 큰 칸을 한 번 더 누르면 앨범이 열린다는 표시: 글자 + 천천히 숨 쉬듯 늘었다 줄어드는 화살표 */
.gx__go { display: inline-flex; align-items: center; gap: 12px; margin-top: 16px; font: 400 12px/1 var(--serif); letter-spacing: .22em; text-transform: uppercase; color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.5), 0 1px 12px rgba(0,0,0,.45); }
.gx__go i { position: relative; display: block; width: 30px; height: 1px; background: currentColor; box-shadow: 0 0 2px rgba(0,0,0,.5), 0 1px 8px rgba(0,0,0,.35); animation: goNudge 2.8s ease-in-out infinite; transition: width .45s ease; }
.gx__go i::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
@keyframes goNudge { 0%, 100% { width: 30px; } 50% { width: 44px; } }
@media (hover: hover) and (pointer: fine) { .gx__big:hover .gx__go i { animation: none; width: 60px; } }
/* 작은 칸을 눌러 큰 칸으로 바뀐 직후: 표시가 두 번 반짝여 '한 번 더 누르면 열림'을 알려 줌 */
.gx__big.is-new .gx__go { animation: goPulse .9s ease-in-out 2; }
@keyframes goPulse { 0%, 100% { opacity: 1; transform: none; } 50% { opacity: .45; transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .gx__go i, .gx__big.is-new .gx__go { animation: none; } }
/* 마우스를 올리면: 사진이 살짝 확대되고 아래가 조금 어두워짐 (큰 칸 전체가 앨범 링크) */
.gx__stage { transition: transform .9s ease; }
.gx__shade { transition: height .5s ease, background .5s ease; }
@media (hover: hover) and (pointer: fine) {
  .gx__big:hover .gx__stage { transform: scale(1.025); }
  .gx__big:hover .gx__shade { height: 60%; background: linear-gradient(transparent, rgba(0,0,0,.5)); }
}

/* 오른쪽 8칸 */
.gx__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 4), minmax(0, 1fr)); gap: 12px; }   /* 앨범 수에 맞춰 줄 수가 바뀜 */
.gx__tile {
  position: relative; overflow: hidden; display: block; padding: 0; border: 0; cursor: pointer;
  background: var(--paper-2); color: #fff; text-align: left;
}
.gx__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  transition: transform .8s ease, opacity .26s ease; }
.gx__tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,.45)); transition: background .4s ease; }
.gx__tile:hover img { transform: scale(1.05); }
.gx__tile:hover::after { background: linear-gradient(transparent 30%, rgba(0,0,0,.55)); }
.gx__tmeta { position: absolute; left: 14px; right: 14px; bottom: 11px; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; transition: opacity .26s ease; }
.gx__tname { font: 400 clamp(15px, 1.35vw, 20px)/1.15 var(--serif); letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.gx__tcount { font: 400 11px/1 var(--serif); letter-spacing: .1em; opacity: .85; }
.gx__tile.is-swapping img, .gx__tile.is-swapping .gx__tmeta { opacity: 0; }

@media (max-width: 760px) {
  .gx { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; padding: 0 10px; min-height: 0; margin-top: 4px; }
  .gx__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: none; gap: 6px; }
  .gx__tile { aspect-ratio: 1 / 1.05; }
  .gx__tmeta { left: 6px; right: 6px; bottom: 5px; }
  .gx__tname { font-size: 12px; }
  .gx__tcount { display: none; }
  .gx__title { font-size: 28px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
