/* 기본 리셋 & 타이포그래피 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-Thin.ttf")
    format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-ExtraLight.ttf")
    format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-Light.ttf")
    format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-Regular.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-Medium.ttf")
    format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-DemiBold.ttf")
    format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-Bold.ttf")
    format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-Extrabold.ttf")
    format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "NeverMind Bauhaus";
  src: url("nevermind-bauhaus_font/NeverMindBauhaus/NeverMindBauhaus-Heavy.ttf")
    format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-bauhaus: "NeverMind Bauhaus", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* 하단 고정: 로고 높이(대략) */
  --logo-block-height: 100px;
  /* 하단 고정 전체(컬렉션 + 로고 + 여유) */
  --footer-reserve: 320px;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-bauhaus);
  background-color: #ffffff; /* 흰색 배경 */
  color: #111111;
  padding-bottom: calc(env(safe-area-inset-bottom) + var(--footer-reserve));
}

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

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

/* 메인 페이지: 컬렉션 네비 → 로고 바로 위, 하단 중앙에 붙임 */
body.main-page .collection-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(
    --nav-clearance,
    calc(env(safe-area-inset-bottom) + var(--logo-block-height) + 1.25rem)
  );
  padding: 0 1.5rem 1rem 1.5rem;
  background: transparent;
  z-index: 5;
  width: max-content;
  min-width: max-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.1rem;
}

/* 목록이 짧으면 로고 위에 붙이고, 길면 맨 위 항목(Where Colors Fall)부터 스크롤 */
body.main-page .collection-nav::before {
  content: "";
  flex: 1 0 0px;
  min-height: 0;
  width: 100%;
}

/* 메인 페이지 로고: 컬렉션 페이지와 동일한 위치·폰트·크기 */
body.main-page .site-header {
  margin-left: 0;
}

body.main-page .site-header .header-inner {
  padding: 1.25rem 1rem;
}

body.main-page .site-header .site-title,
body.main-page .site-header .site-subtitle {
  font-family: var(--font-bauhaus);
}

body.main-page main {
  margin-left: 0;
  width: 100%;
}

/* 홈: 버튼으로 흰/검 배경 전환 */
html.home-theme-dark body.main-page,
body.main-page.theme-dark {
  background-color: #141414;
  color: #ffffff;
}

html.home-theme-dark body.main-page .site-header,
body.main-page.theme-dark .site-header {
  background-color: #141414;
}

html.home-theme-dark body.main-page .site-title,
html.home-theme-dark body.main-page .site-title-link,
body.main-page.theme-dark .site-title,
body.main-page.theme-dark .site-title-link {
  color: #ffffff;
}

html.home-theme-dark body.main-page .music-toggle,
body.main-page.theme-dark .music-toggle {
  color: #ffffff;
}

html.home-theme-dark body.main-page .collection-nav a:hover,
body.main-page.theme-dark .collection-nav a:hover {
  color: #ffffff;
}

/* 컬렉션 링크 (메인 + 기타에서 재사용) */
.sidebar-link,
.collection-nav a {
  font-family: var(--font-bauhaus);
  color: #666666;
  text-decoration: none;
  font-size: 2.85rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
  display: block;
  white-space: nowrap;
  min-width: min-content;
  text-align: center;
}

/* WALL 링크 다음에 간격 추가 */
body.main-page .collection-nav .wall-link {
  margin-bottom: 2.0rem;
}

/* 데스크톱 홈: 글씨 크게 + 로고 위쪽에 여유 두고 붙임 (Ant 잘림 방지) */
@media (min-width: 901px) {
  body.main-page .collection-nav {
    top: max(0.4rem, env(safe-area-inset-top));
    bottom: var(
      --nav-clearance,
      calc(env(safe-area-inset-bottom) + var(--logo-block-height) + 1.35rem)
    );
    gap: 0.12rem;
    padding: 0 1.5rem 0.65rem 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body.main-page .collection-nav a,
  body.main-page .sidebar-link {
    font-size: clamp(2.1rem, 4.2vh, 2.85rem);
    letter-spacing: 0.08em;
    padding: 0.35vh 0;
    line-height: 1.2;
  }

  body.main-page .collection-nav .wall-link {
    margin-bottom: 1.25rem;
  }
}

.sidebar-link:hover,
.collection-nav a:hover {
  color: #111111;
}

.sidebar-link.active,
.collection-nav a.active {
  color: #111111;
  font-weight: 500;
}

/* 홈: 한 번 누른 컬렉션 → 단색 (라이트=검정, 다크=흰색) */
body.main-page .collection-nav a.is-opened,
body.main-page .collection-nav a.is-opened span {
  color: #111111 !important;
}

html.home-theme-dark body.main-page .collection-nav a.is-opened,
html.home-theme-dark body.main-page .collection-nav a.is-opened span,
body.main-page.theme-dark .collection-nav a.is-opened,
body.main-page.theme-dark .collection-nav a.is-opened span {
  color: #ffffff !important;
}

/* 레이아웃: 로고 = 화면 맨 아래 중앙 고정 */
.site-header {
  background-color: #ffffff;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: 10;
}

.header-inner {
  width: 100%;
  margin: 0;
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-title {
  font-size: clamp(3.2rem, 8vw, 6.4rem); /* 로고 2배 */
  letter-spacing: 0.12em;
  text-transform: none;
  margin: 0;
  line-height: 1.05;
  white-space: nowrap;
}

.site-title-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.site-title-link:hover {
  opacity: 0.7;
}

.site-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #666666;
}

main {
  margin-left: 240px;
  padding: 1.5rem 1.5rem 3rem;
  box-sizing: border-box;
  width: calc(100% - 240px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 컬렉션 페이지: 사이드바 없음, 전체 너비 */
body.collection-page main.main-full {
  margin-left: 0;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

body.collection-page {
  font-family: var(--font-bauhaus);
  padding-bottom: 1.5rem;
}

/* 컬렉션 페이지에서는 하단 고정 로고 숨김 */
body.collection-page .site-header {
  display: none;
}

/* 컬렉션 제목: 폴더명과 동일하게 표시(대소문자 그대로) */
.collection-title {
  font-family: var(--font-bauhaus);
  font-size: clamp(1.15rem, 4.2vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  margin: 0 0 1.5rem;
  color: #111111;
  white-space: normal;
  text-align: center;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding-inline: 0.4em;
  box-sizing: border-box;
}

/* 컬렉션 페이지 하단 도달 시 표시되는 메인 이동 버튼 */
.collection-back-to-main {
  position: fixed;
  left: 50%;
  transform: translate(-50%, 8px);
  bottom: 0.35rem;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #111111;
  font-family: var(--font-bauhaus);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  letter-spacing: 0.02em;
  -webkit-text-stroke: 0.8px #111111;
  text-shadow: 0 0 0 #111111;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  padding: 0 0.2em;
}

.collection-back-to-main:hover {
  color: #444444;
}

.collection-back-to-main.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* 메인 화면: 로고 아래 흰 공백 */
main.main-blank {
  flex: 1;
  min-height: 50vh;
}

/* 시작 화면: 오락실 버튼 — 위에서 내려다본 원형 (6색) */
.cursed-refresh {
  --cursed-size: 48px;
  --cursed-rot: 0deg;
  --btn-face: #e60000;
  --btn-face-hi: #ff4d4d;
  --btn-face-lo: #b30000;
  position: fixed;
  z-index: 8;
  width: var(--cursed-size);
  height: var(--cursed-size);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transform: rotate(var(--cursed-rot));
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.22));
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.cursed-refresh:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
}

/* 바깥 검정 단 (가장 넓은 링) */
.cursed-refresh-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #0d0d0d;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.85);
}

/* 안쪽 검정 링 */
.cursed-refresh-rim {
  position: absolute;
  inset: 7%;
  border-radius: 50%;
  background: #171717;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.9),
    inset 0 2px 3px rgba(0, 0, 0, 0.55);
}

/* 컬러 플런저 (정면/평면) */
.cursed-refresh-face {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background:
    radial-gradient(
      circle at 32% 28%,
      var(--btn-face-hi) 0%,
      var(--btn-face) 42%,
      var(--btn-face-lo) 100%
    );
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.28),
    inset 0 -2px 3px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

.cursed-refresh.is-white .cursed-refresh-face {
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.7),
    inset 0 -2px 3px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.28);
}

.cursed-refresh.is-pressed {
  transform: rotate(var(--cursed-rot)) scale(0.94);
  filter: brightness(0.9) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.cursed-refresh.is-pressed .cursed-refresh-face {
  inset: 18%;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -1px 3px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
  .cursed-refresh {
    z-index: 8;
  }
}

/* 오락실 버튼 5회 → 전 사진 벽 이스터에그 */
.photo-wall-easter {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: none;
  background: #ffffff;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.photo-wall-easter[hidden] {
  display: none !important;
}

.photo-wall-easter-frame {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.25rem 1.25rem 0;
  background: #ffffff;
  overflow-x: hidden;
}

.photo-wall-easter-mosaic {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: #ffffff;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.photo-wall-easter-mosaic img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: top;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

body.photo-wall-open .collection-nav,
body.photo-wall-open .site-header,
body.photo-wall-open .music-toggle {
  visibility: hidden;
  pointer-events: none;
}

.photo-wall-easter-exit {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 4.5rem;
  margin: 0;
  padding: 1.1rem 1rem 1.4rem;
  border: none;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.photo-wall-easter-exit:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.photo-wall-lightbox {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1.25rem;
  box-sizing: border-box;
  background: #ffffff;
  cursor: zoom-out;
  -webkit-tap-highlight-color: transparent;
}

.photo-wall-lightbox[hidden] {
  display: none !important;
}

.photo-wall-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.photo-wall-easter-exit-arrow {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 400;
  transform: translateY(0);
  transition: transform 0.15s ease;
}

.photo-wall-easter-exit:hover .photo-wall-easter-exit-arrow,
.photo-wall-easter-exit:focus-visible .photo-wall-easter-exit-arrow {
  transform: translateX(-3px);
}

.photo-wall-easter-exit:focus-visible {
  outline: none;
}

.photo-wall-easter-exit:focus-visible .photo-wall-easter-exit-arrow {
  outline: 2px solid #111111;
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .photo-wall-easter-frame {
    padding: 0.9rem 0.9rem 0;
  }

  .photo-wall-easter-exit {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
  }
}

@media (max-width: 640px) {
  .photo-wall-easter-frame {
    padding: 0.65rem 0.65rem 0;
  }

  .photo-wall-easter-exit {
    min-height: 4rem;
  }
}

.intro {
  margin-bottom: 1.5rem;
  max-width: 720px;
  font-size: 0.98rem;
  line-height: 1.7;
  color: #444444;
}

.intro-sub {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #888888;
}

/* 사진 갤러리: 행 높이 고정, 원본 비율 유지, 각 행의 사진이 위·아래 끝에 맞춤 */
.gallery {
  --gallery-row-height: 280px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
  max-width: 1400px;
  align-content: flex-start;
  justify-content: center;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: #ffffff;
  height: var(--gallery-row-height);
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.gallery-item img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
  filter: brightness(1.02);
}

/* 세로 2장 / 가로 1장 레이아웃 (about.layout = pair) — 그리드로 모바일 줄바꿈 방지 */
.gallery.gallery-layout-pair {
  --pair-gap: 0.35rem;
  --pair-row-gap: 0.8rem;
  --gallery-row-height: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--pair-gap);
  row-gap: var(--pair-row-gap);
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  align-items: start;
}

.gallery.gallery-layout-pair .gallery-item {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  background-color: transparent;
  box-sizing: border-box;
  min-width: 0;
}

.gallery.gallery-layout-pair .gallery-item.landscape {
  grid-column: 1 / -1;
  width: 100%;
}

/* 세로가 한 장만 남는 행 → 중앙 배치 */
.gallery.gallery-layout-pair .gallery-item.gallery-item-solo {
  grid-column: 1 / -1;
  width: calc(50% - var(--pair-gap) / 2);
  justify-self: center;
}

.gallery.gallery-layout-pair .gallery-item.gallery-item-solo.solo-right {
  justify-self: end;
}

.gallery.gallery-layout-pair .gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.gallery.gallery-layout-pair .gallery-item:hover img {
  transform: none;
  filter: none;
}

.gallery.gallery-layout-pair > .collection-about-after-first {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
}

/* 한 장씩 세로 나열 (about.layout = stack) */
.gallery.gallery-layout-stack {
  --gallery-row-height: auto;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
}

.gallery.gallery-layout-stack .gallery-item {
  flex: 0 0 auto !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: transparent;
}

/* 세로 사진은 절반 크기 */
.gallery.gallery-layout-stack .gallery-item.portrait {
  width: 50% !important;
  max-width: 450px;
}

.gallery.gallery-layout-stack .gallery-item.landscape {
  width: 100% !important;
  max-width: 900px;
}

.gallery.gallery-layout-stack .gallery-item img {
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
  display: block;
  object-fit: contain !important;
}

.gallery.gallery-layout-stack .gallery-item:hover img {
  transform: none;
  filter: none;
}

/* Mars 등: 데스크톱에서 한 장씩, 한 화면에 전체가 들어오게 */
@media (min-width: 901px) {
  .gallery.gallery-layout-stack.gallery-layout-stack-large {
    --stack-view-h: calc(
      (
          100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) -
            var(--logo-block-height) - 3.5rem
        ) * 0.95
    );
    max-width: min(1254px, 89vw);
    gap: 1.5rem;
  }

  .gallery.gallery-layout-stack.gallery-layout-stack-large .gallery-item {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    max-width: min(1254px, 89vw);
    max-height: var(--stack-view-h);
  }

  .gallery.gallery-layout-stack.gallery-layout-stack-large .gallery-item.landscape,
  .gallery.gallery-layout-stack.gallery-layout-stack-large .gallery-item.portrait {
    width: 100% !important;
    max-width: min(1254px, 89vw);
  }

  .gallery.gallery-layout-stack.gallery-layout-stack-large .gallery-item img {
    width: auto !important;
    height: auto !important;
    max-width: min(1254px, 89vw) !important;
    max-height: var(--stack-view-h) !important;
    object-fit: contain !important;
  }
}

/* 한 팔레트 (about.layout = grid)
   기본/휴대폰: 1열 (사진 크게)
   맥북/데스크톱(901px+): 2열 */
.gallery.gallery-layout-grid {
  --gallery-row-height: auto;
  --grid-gap: 0.35rem;
  --grid-cols: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 2rem;
  padding: 0.2rem;
  background: #f3f1ec;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  gap: var(--grid-gap) !important;
  column-count: unset !important;
  align-items: start;
}

.gallery.gallery-layout-grid .gallery-item {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  flex: unset !important;
  break-inside: auto;
}

/* 맥북/데스크톱 — 2열 메이슨리 */
@media (min-width: 901px) {
  .gallery.gallery-layout-grid {
    --grid-gap: 0.25rem;
    --grid-cols: 2;
    display: block !important;
    grid-template-columns: unset !important;
    column-count: 2 !important;
    column-gap: var(--grid-gap) !important;
    gap: unset !important;
  }

  .gallery.gallery-layout-grid .gallery-item {
    display: inline-block !important;
    width: 100% !important;
    margin: 0 0 var(--grid-gap) !important;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
  }
}

.gallery.gallery-layout-grid .gallery-item.portrait,
.gallery.gallery-layout-grid .gallery-item.landscape {
  width: 100%;
  max-width: none;
}

.gallery.gallery-layout-grid .gallery-item img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  transition: none;
}

.gallery.gallery-layout-grid .gallery-item:hover img {
  transform: none;
  filter: none;
}

.gallery.gallery-layout-grid > .collection-about-after-first {
  break-inside: avoid;
  grid-column: 1 / -1;
  width: 100%;
}

/* 오솔길: 크레파스 줄기 — 사진 뒤로만 통과 (about.layout = path) */
body.collection-path-page {
  background: #fafaf8;
}

.gallery.gallery-layout-path {
  /* 데스크톱도 모바일과 같은 좁은 오솔길 폭 */
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0 !important;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0.35rem 0.35rem 3.5rem;
  box-sizing: border-box;
  isolation: isolate;
  overflow: visible !important;
}

.gallery.gallery-layout-path .forest-path-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.gallery.gallery-layout-path .forest-path-svg .path-stroke-back {
  fill: none;
  stroke: #1b6b2a;
  stroke-width: 30;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
}

.gallery.gallery-layout-path .forest-path-svg .path-stroke-mid {
  fill: none;
  stroke: #2f9a3c;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

.gallery.gallery-layout-path .forest-path-svg .path-stroke-edge {
  fill: none;
  stroke: #7dce5c;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.gallery.gallery-layout-path .gallery-item,
.gallery.gallery-layout-path > .collection-about-after-first {
  position: relative;
  z-index: 2;
}

.gallery.gallery-layout-path .gallery-item {
  flex: 0 0 auto !important;
  width: min(var(--path-w, 62%), 250px) !important;
  max-width: 250px;
  height: auto !important;
  margin: 0 0 var(--path-mb, 2.1rem) 0 !important;
  padding: 0 !important;
  background: #fafaf8;
  box-shadow: 0 8px 22px rgba(20, 40, 20, 0.1);
  border-radius: 2px;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery.gallery-layout-path .gallery-item.landscape {
  width: min(94%, 100%) !important;
  max-width: 100%;
  align-self: center !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  transform: none !important;
}

.gallery.gallery-layout-path .gallery-item.path-side-left {
  align-self: flex-start;
  margin-left: var(--path-inset, 2%) !important;
  margin-right: 0 !important;
  transform: rotate(var(--path-tilt, -0.8deg));
}

.gallery.gallery-layout-path .gallery-item.path-side-right {
  align-self: flex-end;
  margin-right: var(--path-inset, 2%) !important;
  margin-left: 0 !important;
  transform: rotate(var(--path-tilt, 0.8deg));
}

.gallery.gallery-layout-path .gallery-item img {
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: contain !important;
  border-radius: 2px;
  position: relative;
  z-index: 1;
  background: #fafaf8;
}

.gallery.gallery-layout-path .gallery-item:hover img {
  transform: none;
  filter: none;
}

.gallery.gallery-layout-path > .collection-about-after-first {
  width: min(92%, 100%);
  align-self: center;
  margin: 0.2rem 0 1.6rem;
  padding: 0.85rem 1rem 1rem;
  background: rgba(250, 250, 248, 0.94);
  border: 1px solid rgba(47, 138, 58, 0.12);
  box-shadow: 0 6px 16px rgba(30, 60, 30, 0.06);
}

.gallery.gallery-layout-path .gallery-item.is-path-visible {
  animation: path-photo-settle 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes path-photo-settle {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
  }
}

.gallery.gallery-layout-path .gallery-item.path-side-left.is-path-visible {
  animation-name: path-photo-settle-left;
}

.gallery.gallery-layout-path .gallery-item.path-side-right.is-path-visible {
  animation-name: path-photo-settle-right;
}

@keyframes path-photo-settle-left {
  from {
    opacity: 0;
    transform: rotate(var(--path-tilt, -0.8deg)) translate(-14px, 14px);
  }
  to {
    opacity: 1;
    transform: rotate(var(--path-tilt, -0.8deg));
  }
}

@keyframes path-photo-settle-right {
  from {
    opacity: 0;
    transform: rotate(var(--path-tilt, 0.8deg)) translate(14px, 14px);
  }
  to {
    opacity: 1;
    transform: rotate(var(--path-tilt, 0.8deg));
  }
}

/* Matin식 ABS 슬라이드 마운트 (about.layout = slide) */
.gallery.gallery-layout-slide {
  --gallery-row-height: auto;
  --slide-img-h: 160px;
  --slide-mount-border: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1rem;
  width: 100%;
  max-width: 1080px;
  margin: 0.4rem auto 1.75rem;
  padding: 0.35rem 0 1.5rem;
  justify-content: center;
  align-content: flex-start;
  box-sizing: border-box;
  border-radius: 0;
  background-color: transparent;
  background-image: none;
  box-shadow: none;
}

.gallery.gallery-layout-slide .gallery-item {
  height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background-color: transparent;
  overflow: visible;
  flex: 0 0 auto;
  display: block;
}

.gallery.gallery-layout-slide .slide-mount-shadow {
  display: inline-block;
  line-height: 0;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
  transform: rotate(var(--slide-tilt, 0deg));
  transform-origin: 50% 60%;
}

.gallery.gallery-layout-slide .gallery-item:nth-child(5n + 1) {
  --slide-tilt: -0.5deg;
}
.gallery.gallery-layout-slide .gallery-item:nth-child(5n + 2) {
  --slide-tilt: 0.35deg;
}
.gallery.gallery-layout-slide .gallery-item:nth-child(5n + 3) {
  --slide-tilt: -0.2deg;
}
.gallery.gallery-layout-slide .gallery-item:nth-child(5n + 4) {
  --slide-tilt: 0.55deg;
}
.gallery.gallery-layout-slide .gallery-item:nth-child(5n + 5) {
  --slide-tilt: -0.12deg;
}

/* 실사 Matin ABS 마운트 (이젝터 핀·홈·클램프 디테일) */
.gallery.gallery-layout-slide .slide-mount-frame {
  display: inline-block;
  line-height: 0;
  box-sizing: border-box;
  padding: 0;
  border-style: solid;
  border-color: transparent;
  border-width: var(--slide-mount-border);
  border-image-source: url("assets/slide-mount-landscape.png");
  border-image-slice: 26.8% 17.5% 26.9% 17.6% fill;
  border-image-width: var(--slide-mount-border);
  border-image-repeat: stretch;
  background: url("assets/slide-plastic.jpg") center / 120px 120px repeat;
  border-radius: 0;
  box-shadow: none;
}

.gallery.gallery-layout-slide .gallery-item.portrait .slide-mount-frame {
  border-image-source: url("assets/slide-mount-portrait.png");
  border-image-slice: 17.6% 26.8% 17.5% 26.9% fill;
  padding: 0;
}

.gallery.gallery-layout-slide .slide-mount-window {
  display: block;
  line-height: 0;
  background: #050505;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gallery.gallery-layout-slide .slide-mount-frame img {
  height: var(--slide-img-h);
  width: auto;
  max-width: min(56vw, 320px);
  display: block;
  object-fit: contain;
  background: #0a0a0a;
}

.gallery.gallery-layout-slide .gallery-item:hover img {
  transform: none;
  filter: none;
}

.gallery.gallery-layout-slide .gallery-item:hover .slide-mount-shadow {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.14));
}

.gallery.gallery-layout-slide > .collection-about-after-first {
  flex: 0 0 100%;
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ieo-do book: one Keynote/InDesign spread per viewport, scroll-snap */
html.book-scroll {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

body.collection-book-page {
  padding-bottom: 0;
  background: #ffffff;
  overflow-x: hidden;
}

body.collection-book-page main.main-full {
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  align-items: stretch;
}

body.collection-book-page .collection-title,
body.collection-book-page .collection-about:not(.book-intro-about) {
  display: none !important;
}

.gallery.gallery-layout-book {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: #ffffff;
}

.gallery.gallery-layout-book .book-spread {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #ffffff;
  overflow: hidden;
}

.gallery.gallery-layout-book .book-stage {
  position: relative;
  /* Keynote/book canvas 20 × 11.25 */
  width: min(100vw, calc(100dvh * 20 / 11.25));
  height: min(100dvh, calc(100vw * 11.25 / 20));
  background: #ffffff;
  flex-shrink: 0;
}

.gallery.gallery-layout-book .book-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.14);
  transform: translateX(-0.5px);
  pointer-events: none;
  z-index: 2;
}

.gallery.gallery-layout-book .book-spread.is-cover .book-spine,
.gallery.gallery-layout-book .book-spread.is-back .book-spine {
  display: none;
}

.gallery.gallery-layout-book .book-photo.gallery-item {
  position: absolute;
  left: var(--book-l, 0%);
  top: var(--book-t, 0%);
  width: var(--book-w, 0%) !important;
  height: var(--book-h, 0%) !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  background: transparent;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 0;
  flex: none !important;
  display: block !important;
  align-items: unset;
  justify-content: unset;
}

.gallery.gallery-layout-book .book-photo img {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: center;
  background: transparent;
  transform: none !important;
  filter: none !important;
  transition: none;
}

.gallery.gallery-layout-book .book-photo:hover img {
  transform: none !important;
  filter: none !important;
}

.gallery.gallery-layout-book .book-cover-title {
  position: absolute;
  left: auto;
  right: 3.8%;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  rotate: none !important;
  font-family: var(--font-bauhaus), "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(0.78rem, 1.15vw, 0.95rem);
  letter-spacing: 0.22em;
  color: #222;
  margin: 0;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  text-align: right;
}

.gallery.gallery-layout-book .book-cover-credit {
  position: absolute;
  left: 8%;
  bottom: 3.2%;
  font-size: clamp(0.55rem, 0.85vw, 0.7rem);
  letter-spacing: 0.04em;
  color: #666;
  margin: 0;
  pointer-events: none;
  z-index: 3;
}

.gallery.gallery-layout-book .book-intro-copy {
  position: absolute;
  left: 6.5%;
  top: 58%;
  width: 36%;
  max-width: 420px;
  z-index: 3;
  pointer-events: none;
}

.gallery.gallery-layout-book .book-intro-copy .book-intro-kicker {
  margin: 0 0 0.65rem;
  font-size: clamp(0.72rem, 1.05vw, 0.9rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #111;
}

.gallery.gallery-layout-book .book-intro-copy p {
  margin: 0 0 0.55rem;
  font-family: "Crimson Text", Georgia, serif;
  font-size: clamp(0.72rem, 1.05vw, 0.92rem);
  line-height: 1.45;
  color: #333;
}

.gallery.gallery-layout-book .book-intro-copy p:last-child {
  margin-bottom: 0;
}

.gallery.gallery-layout-book .book-spread.is-back {
  background: #ffffff;
}

.gallery.gallery-layout-book .book-back-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-bauhaus), "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  letter-spacing: 0.35em;
  color: #bbb;
  pointer-events: none;
}

/* 컬렉션 작업소개: 제목 아래 전체 표시 (잘림 없음) */
.collection-about {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 1.25rem;
  box-sizing: border-box;
}

/* 0번 사진 바로 아래 소개 (갤러리 한 줄 전체 차지) */
.gallery > .collection-about-after-first {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  margin: 0.35rem auto 1rem;
  order: 0;
}

.collection-about-inner {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  background: #f7f7f5;
  border: 1px solid #e8e8e4;
  border-radius: 4px;
  font-family: "Crimson Text", Georgia, serif;
  color: #222222;
}

.gallery-intro-date {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.gallery-intro-location {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #444444;
}

.gallery-intro-credit {
  margin: 0 0 0.55rem;
  font-size: 0.86rem;
  font-style: italic;
  color: #555555;
}

.gallery-intro-body {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.gallery-intro-body p {
  margin: 0 0 0.45rem;
}

.gallery-intro-body p:last-child {
  margin-bottom: 0;
}

.gallery-intro-body a,
.gallery-intro-link {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  word-break: break-all;
}

.gallery-intro-body a:hover,
.gallery-intro-link:hover {
  opacity: 0.65;
}

.gallery-intro-link-arrow {
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  margin-right: 0.05em;
}

/* 배경음악 (YouTube 플레이어는 화면에 보이지 않음) */
.music-frame {
  position: fixed;
  width: 1px;
  height: 1px;
  bottom: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.music-toggle:hover {
  opacity: 1;
}

.music-toggle.is-on {
  opacity: 0.8;
}

.music-icon {
  width: 0.95rem;
  height: 0.95rem;
  display: block;
  fill: currentColor;
}

@media (max-width: 768px) {
  .music-toggle {
    right: 0.75rem;
    bottom: calc(env(safe-area-inset-bottom) + 0.75rem);
  }
}

/* 라이트박스(이미지 확대) */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 40;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background-color: #ffffff;
}

.lightbox-content {
  position: relative;
  max-width: min(1400px, 95vw);
  max-height: 95vh;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
  background-color: #ffffff;
  display: block;
  z-index: 1;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 95vh;
  object-fit: contain;
  background-color: #ffffff;
  display: block;
  cursor: zoom-out;
}

/* 이전/다음: 세로 중앙, 가로는 좌·우 끝 근처 */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border: none;
  background-color: rgba(0, 0, 0, 0.06);
  color: #111111;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  z-index: 15;
  opacity: 0.85;
  line-height: 1;
  padding: 0;
  margin: 0;
}

.lightbox-nav:hover {
  background-color: rgba(0, 0, 0, 0.12);
  opacity: 1;
}

.lightbox-nav-prev {
  left: 1.5rem;
}

.lightbox-nav-next {
  right: 1.5rem;
}

@media (max-width: 640px) {
  /* 모바일: 네비게이션 버튼 숨기기 */
  .lightbox-nav {
    display: none !important;
  }

  /* 모바일: 흰 사진 보기 — 흰색 전체 화면, 다시 탭하면 닫기 */
  .lightbox {
    background-color: #ffffff;
  }

  .lightbox-backdrop {
    background-color: #ffffff;
  }

  .lightbox-content {
    max-width: 100vw;
    max-height: 100dvh;
    width: 100%;
    border-radius: 0;
    background-color: #ffffff;
  }

  .lightbox-content img {
    max-height: 100dvh;
    width: 100%;
    height: auto;
    max-width: 100vw;
    object-fit: contain;
    background-color: #ffffff;
    cursor: zoom-out;
  }

  /* 모바일: X 버튼 — 흰 배경용 어두운 아이콘 */
  .lightbox-close {
    background: transparent !important;
    color: #111111 !important;
  }
}

/* 닫기(X): 화면 우측 상단 고정 */
.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.5rem;
  z-index: 50;
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: #111111;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.12);
  opacity: 1;
}

/* 푸터 숨김 */
.site-footer {
  display: none;
}

/* 반응형: 작은 화면에서 행 높이만 조절 (열 수는 flex wrap으로 자동) */
@media (max-width: 1200px) {
  .gallery {
    --gallery-row-height: 260px;
  }
}

@media (max-width: 900px) {
  :root {
    --logo-block-height: 90px;
    --footer-reserve: 300px;
  }

  body.main-page .collection-nav {
    top: max(0.4rem, env(safe-area-inset-top));
    padding: 0 1rem 1rem 1rem;
    width: calc(100% - 2rem);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  body.main-page .collection-nav a,
  .sidebar-link {
    font-size: clamp(1.05rem, 3.4vw, 2.2rem);
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    letter-spacing: 0.04em;
    line-height: 1.15;
  }

  main {
    padding-inline: 1rem;
    margin-left: 200px;
    margin-right: auto;
    width: calc(100% - 200px);
  }

  body.collection-page main.main-full {
    margin-left: 0;
    width: 100%;
    padding-inline: 1rem;
  }

  .header-inner {
    padding-inline: 1rem;
  }

  .gallery {
    --gallery-row-height: 240px;
  }
}

@media (max-width: 640px) {
  :root {
    --logo-block-height: 44px;
    --footer-reserve: 320px;
  }

  body.main-page .collection-nav {
    /* 로고와 같이 아주 살짝 위로 */
    bottom: var(
      --nav-clearance,
      calc(env(safe-area-inset-bottom) + var(--logo-block-height) + 1.05rem)
    );
    padding: 0 0.75rem 0.15rem 0.75rem;
    width: calc(100% - 1.5rem);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  body.main-page .collection-nav a,
  .sidebar-link {
    font-size: clamp(0.95rem, 4.5vw, 1.2rem);
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    letter-spacing: 0.03em;
    line-height: 1.2;
    padding: 0.32rem 0;
  }

  /* 모바일: 메인 페이지 헤더를 컬렉션 페이지와 동일하게 */
  body.main-page .site-header {
    margin-left: 0;
    bottom: calc(env(safe-area-inset-bottom) + 1.05rem);
  }

  body.main-page .site-header .header-inner {
    padding: 0.35rem 0.5rem;
  }

  body.main-page main {
    margin-left: 0;
    width: 100%;
  }

  main {
    margin-left: 0;
    margin-right: auto;
    width: 100%;
  }

  .site-title {
    font-size: 1.35rem;
    letter-spacing: 0.05em;
  }

  .collection-title {
    font-size: clamp(1rem, 4.6vw, 1.35rem);
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-align: center;
    padding: 0 0.3em;
  }

  body.collection-page main.main-full {
    margin-left: 0;
    width: 100%;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .collection-back-to-main {
    font-size: 2.4rem;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom) + 1rem);
    padding: 0 0.2em;
  }

  /* 모바일에서도 clamp로 자동 조절 */

  .site-subtitle {
    letter-spacing: 0.16em;
  }

  /* 모바일: 갤러리 한 열에 하나의 사진, 크게 표시 */
  .gallery {
    --gallery-row-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
  }

  .gallery-item {
    flex: 0 0 auto;
    width: 100%;
    height: var(--gallery-row-height);
    margin: 0 !important;
    padding: 0 0 10px 0 !important;
    display: flex;
    box-sizing: border-box;
  }

  /* 모바일: pair 레이아웃도 동일 그리드 */
  .gallery.gallery-layout-pair {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    flex-direction: unset;
    flex-wrap: unset;
    gap: unset !important;
    column-gap: var(--pair-gap) !important;
    row-gap: var(--pair-row-gap) !important;
    margin: 0 auto;
    padding: 0;
    max-width: min(560px, 100%);
  }

  .gallery.gallery-layout-pair .gallery-item {
    width: 100%;
    height: auto;
    padding: 0 !important;
    margin: 0 !important;
    flex: unset;
  }

  .gallery.gallery-layout-pair .gallery-item.landscape {
    grid-column: 1 / -1;
    width: 100%;
  }

  .gallery.gallery-layout-pair .gallery-item.gallery-item-solo {
    grid-column: 1 / -1;
    width: calc(50% - var(--pair-gap) / 2) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-self: center;
  }

  .gallery.gallery-layout-pair .gallery-item.gallery-item-solo.solo-right {
    margin-left: auto !important;
    margin-right: 0 !important;
    justify-self: end;
  }

  .gallery.gallery-layout-pair .gallery-item img {
    width: 100%;
    height: auto;
  }

  .gallery.gallery-layout-pair > .collection-about-after-first {
    grid-column: 1 / -1;
  }

  /* 모바일: stack도 한 장씩 세로 (고정 높이 없이) */
  .gallery.gallery-layout-stack {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0.65rem !important;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .gallery.gallery-layout-stack .gallery-item {
    width: 100%;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .gallery.gallery-layout-stack .gallery-item.portrait {
    width: 50% !important;
    max-width: 450px;
  }

  .gallery.gallery-layout-stack .gallery-item.landscape {
    width: 100% !important;
  }

  .gallery.gallery-layout-path {
    max-width: 100%;
  }

  .gallery.gallery-layout-path .forest-path-svg .path-stroke-back {
    stroke-width: 22;
  }

  .gallery.gallery-layout-path .forest-path-svg .path-stroke-mid {
    stroke-width: 13;
  }

  /* 모바일: 슬라이드 마운트 — 한 열, 흰 배경 */
  .gallery.gallery-layout-slide {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 1rem !important;
    max-width: 100%;
    margin: 0.25rem auto 1.25rem;
    padding: 0.25rem 0 1.25rem;
    --slide-img-h: auto;
    background: transparent;
  }

  .gallery.gallery-layout-slide .gallery-item {
    width: min(100%, 320px);
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .gallery.gallery-layout-slide .gallery-item.landscape {
    width: 100%;
    max-width: 100%;
  }

  .gallery.gallery-layout-slide .slide-mount-shadow,
  .gallery.gallery-layout-slide .slide-mount-frame,
  .gallery.gallery-layout-slide .slide-mount-window {
    width: 100%;
  }

  .gallery.gallery-layout-slide .slide-mount-frame {
    padding: 0;
    --slide-mount-border: 32px;
    border-width: 32px;
    border-image-width: 32px;
  }

  .gallery.gallery-layout-slide .slide-mount-frame img {
    width: 100%;
    height: auto !important;
    max-width: 100%;
  }

  .gallery.gallery-layout-slide > .collection-about-after-first {
    width: 100%;
    max-width: 100%;
  }

  .gallery.gallery-layout-stack .gallery-item img {
    width: 100%;
    height: auto;
  }

  .collection-about {
    max-width: 100%;
    margin: 0 0 1rem;
  }

  .collection-about-inner {
    padding: 0.9rem 0.95rem;
  }

  .gallery-intro-date {
    font-size: 0.88rem;
  }

  .gallery-intro-location {
    font-size: 0.8rem;
  }

  .gallery-intro-credit {
    font-size: 0.84rem;
  }

  .gallery-intro-body {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .gallery-item:last-child {
    padding-bottom: 0 !important;
  }
}

/* ——— CONTACT (Bahno 에디토리얼 — 밑줄 폼, 박스 그리드 아님) ——— */
body.contact-page {
  min-height: 100dvh;
  min-height: 100svh;
  height: 100dvh;
  height: 100svh;
  padding-bottom: 0;
  background: #ffffff !important;
  color: #111111;
  display: flex;
  flex-direction: column;
  color-scheme: light;
  overflow: hidden;
}

.contact-top {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.75rem 0.45rem;
}

.contact-brand {
  font-family: var(--font-bauhaus);
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: none;
  color: #111111;
}

.contact-brand:hover,
.contact-mail:hover {
  opacity: 0.7;
}

.contact-mail {
  font-family: var(--font-bauhaus);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #111111;
  text-align: right;
}

.contact-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 560px;
  margin: 0;
  margin-left: clamp(1.25rem, 8vw, 7rem);
  padding: 1.6rem 1.5rem 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-left: 6px solid transparent;
  border-image: linear-gradient(
      #ffd000 0%,
      #e53935 25%,
      #1565c0 50%,
      #00c853 75%,
      #ff4081 100%
    )
    1;
  padding-left: clamp(1.1rem, 3vw, 1.75rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.contact-intro {
  margin-bottom: 1.5rem;
}

.contact-heading {
  margin: 0 0 0.4rem;
  font-family: var(--font-bauhaus);
  font-weight: 600;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  letter-spacing: 0.08em;
  text-align: left;
  line-height: 0.95;
  text-transform: uppercase;
}

.contact-lede {
  margin: 0;
  max-width: 22rem;
  font-family: var(--font-bauhaus);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: #333333;
}

.contact-sent {
  margin: 0 0 1.5rem;
  font-family: var(--font-bauhaus);
  font-size: 1.05rem;
  text-align: left;
  color: #333333;
}

.contact-form {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0 0 0.25rem;
  min-height: 0;
  box-sizing: border-box;
  border-bottom: 2px solid #111111;
}

.contact-field-message {
  min-height: 0;
  border-bottom: 2px solid #111111;
}

.contact-label {
  font-family: var(--font-bauhaus);
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #222222;
  margin-bottom: 0.25rem;
  pointer-events: none;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  margin: 0;
  padding: 0.1rem 0 0.3rem;
  background: transparent;
  color: #111111;
  font-family: var(--font-bauhaus);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.contact-field textarea {
  flex: 1 1 auto;
  min-height: 4.5rem;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
}

.contact-field:focus-within {
  border-bottom-color: #1565c0;
}

.contact-actions {
  display: flex;
  justify-content: flex-start;
  padding: 0.5rem 0 0;
  border: none;
  background: transparent;
}

.contact-submit {
  border: 2px solid #111111;
  margin: 0;
  padding: 0.7rem 1.5rem;
  background: #111111;
  color: #ffffff;
  font-family: var(--font-bauhaus);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.contact-submit:hover {
  background: #ffffff;
}

.contact-submit:active {
  transform: scale(0.97);
}

.contact-submit:focus-visible {
  outline: 2px solid #1565c0;
  outline-offset: 3px;
}

.contact-foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.55rem;
  padding: 0.65rem 1.75rem 1rem;
  font-family: var(--font-bauhaus);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #555555;
  line-height: 1.5;
  background: #ffffff;
  position: relative;
  z-index: 6;
}

.contact-foot-sep {
  opacity: 0.55;
}

.contact-bio {
  margin: 0;
  font-family: var(--font-bauhaus);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: #111111;
}

@media (max-width: 900px) {
  body.contact-page {
    height: 100dvh;
    height: 100svh;
    overflow: hidden;
  }

  .contact-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.7rem 0.95rem 0.2rem;
  }

  .contact-brand {
    font-size: 1rem;
  }

  .contact-mail {
    text-align: left;
    font-size: 0.66rem;
  }

  .contact-main {
    margin-left: 0.85rem;
    margin-right: 0.85rem;
    max-width: none;
    padding: 0.55rem 0 0.5rem;
    padding-left: 0.75rem;
    border-left-width: 4px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }

  .contact-intro {
    margin-bottom: 0.65rem;
  }

  .contact-heading {
    font-size: clamp(1.7rem, 8.5vw, 2.2rem);
    margin-bottom: 0.2rem;
  }

  .contact-lede {
    font-size: 0.74rem;
    line-height: 1.3;
  }

  .contact-form {
    gap: 0.55rem;
  }

  .contact-label {
    font-size: 0.55rem;
    margin-bottom: 0.1rem;
  }

  .contact-field {
    padding-bottom: 0.15rem;
  }

  .contact-field input,
  .contact-field textarea {
    font-size: 0.88rem;
    padding: 0.02rem 0 0.15rem;
  }

  .contact-field textarea {
    min-height: 2.8rem;
  }

  .contact-actions {
    padding-top: 0.2rem;
  }

  .contact-submit {
    display: inline-block;
    min-width: 7.5rem;
    padding: 0.65rem 1.35rem;
    font-size: 0.88rem;
    background: #111111 !important;
    border: 2px solid #111111 !important;
    color: #ffffff;
    box-shadow: 0 2px 0 #000000;
  }

  .contact-submit:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: none;
  }

  /* 항상 화면 하단에 고정 — 스크롤 없이 born in korea 보임 */
  .contact-foot {
    flex-shrink: 0;
    padding: 0.45rem 0.95rem calc(0.55rem + env(safe-area-inset-bottom));
    font-size: 0.7rem;
    border-top: 1px solid #ececec;
    background: #ffffff;
  }

  .contact-bio {
    font-size: 0.72rem;
  }
}


