/* 휴이야기터 — 사진이 주인공
   미색 바탕에 사진 조각을 솔기(6px)로 잇는다. 색은 사진이 맡고, 먹색·벽돌색 같은 진한 색은 작은 점으로만.
   벽돌색은 예약에만 쓴다. */

/* ── 글꼴: 마루 부리(제목, 프로젝트 안에 둠 · OFL) ── */
@font-face { font-family: 'MaruBuri'; src: url('../vendor/fonts/maruburi/MaruBuri-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'MaruBuri'; src: url('../vendor/fonts/maruburi/MaruBuri-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'MaruBuri'; src: url('../vendor/fonts/maruburi/MaruBuri-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* ── 토큰 ── */
:root {
  --ground: #f6f3ee;        /* 바탕 미색, 조각 사이 솔기 */
  --linen: #ebe5da;         /* 안내 조각 */
  --linen-deep: #e1d9ca;    /* 안내 조각을 누를 때 */
  --ink: #22201d;           /* 먹색 — 글자, 작은 점 */
  --ink-soft: #5e574e;
  --line: rgba(34, 32, 29, .14);
  --brick: #a8462f;         /* 벽돌 — 예약에만 */
  --brick-deep: #8e3a26;
  --gap: 6px;
  --head: 64px;
  --display: 'MaruBuri', 'Pretendard Variable', serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
}

/* ── 바탕 ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + 12px); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1rem/1.7 var(--body);
  word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
}
::selection { background: var(--ink); color: var(--ground); }
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--ink); color: var(--ground); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ── 페이지 사이 전환: 머리말은 그대로, 본문만 내려앉듯 바뀐다. 누른 공간 사진은 큰 사진으로 이어진다(js/transition.js) ── */
@view-transition { navigation: auto; }
.top { view-transition-name: top; }
::view-transition-old(root) { animation: vt-out .28s var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease) both; }
::view-transition-group(space-photo) { animation-duration: .75s; animation-timing-function: var(--ease); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px); } }

/* ── 한 번만 있는 움직임: 첫 화면 조각이 위에서 아래로 차례로 걷힌다 ── */
@keyframes unveil {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}
.quilt-hero > .patch, .page-quilt > .patch, .page-quilt > .patch-nav { animation: unveil 1.2s var(--ease) backwards; }
.quilt-hero > :nth-child(2), .page-quilt > :nth-child(2) { animation-delay: .08s; }
.quilt-hero > :nth-child(3), .page-quilt > :nth-child(3) { animation-delay: .16s; }
.quilt-hero > :nth-child(4) { animation-delay: .24s; }
.quilt-hero > :nth-child(5) { animation-delay: .32s; }
.quilt-hero > :nth-child(6) { animation-delay: .4s; }

/* ── 조각 공통 ── */
.patch { position: relative; overflow: hidden; margin: 0; }
figure.patch { background: var(--linen); }
figure.patch img, a.patch--photo img { width: 100%; height: 100%; object-fit: cover; }
/* 안내 조각만 리넨색. 나머지 글 조각은 바탕 위에 바로 앉는다 */
.patch--info, .patch--hours, .patch-nav .patch, .patch--cta, .patch--list,
.visit-body, .tour-list, .patch--name:first-of-type { background: var(--linen); }

/* 이름표(임시 표시·장소 이름)와 사진 출처 */
.label {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(246, 243, 238, .94); color: var(--ink);
  font: 600 .72rem/1.4 var(--body); letter-spacing: .01em;
  box-shadow: 0 8px 20px -12px rgba(34, 32, 29, .55);
}
.credit {
  position: absolute; right: 12px; bottom: 12px; z-index: 3; margin: 0;
  padding: 4px 10px; border-radius: 999px; pointer-events: none;
  background: rgba(34, 32, 29, .64); color: #fff;
  font: 500 .7rem/1.4 var(--body); letter-spacing: .01em;
}
.credit:empty { display: none; }
.patch--tour .credit { top: 12px; bottom: auto; }
.tour-stage .credit { bottom: 16px; right: 16px; }

.more { margin-top: auto; font-weight: 600; font-size: .9rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link { font-weight: 600; text-underline-offset: 5px; text-decoration-thickness: 1px; color: var(--ink-soft); transition: color .3s var(--ease); }
.text-link:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: 999px; font-weight: 600; font-size: .93rem; text-decoration: none;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--book { background: var(--brick); color: #fff; }
.btn--book:hover { background: var(--brick-deep); }
/* 네이버 예약으로 나가는 단추: 바깥 화살표를 단추 안 작은 동그라미에 */
.btn--book, .foot-book { gap: 10px; padding-right: 6px; }
.btn--book::after, .foot-book::after {
  content: ''; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .55s var(--ease), background-color .4s var(--ease);
}
.btn--book:hover::after, .foot-book:hover::after { transform: translate(2px, -1px) scale(1.06); background-color: rgba(255, 255, 255, .26); }
.btn--line { border: 1px solid rgba(34, 32, 29, .32); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* ── 머리말 ── */
.top-placeholder { height: var(--head); }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  height: var(--head); padding: 0 24px;
  background: rgba(246, 243, 238, .9); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-img { height: 26px; width: auto; }
.brand-name { font: 400 .95rem/1 var(--display); color: var(--ink-soft); }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 10px 14px; border-radius: 999px; font-weight: 500; font-size: .95rem; text-decoration: none; color: var(--ink-soft);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.nav a:hover { background: rgba(34, 32, 29, .05); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(34, 32, 29, .07); }
.book-btn {
  padding: 11px 20px; border-radius: 999px; background: var(--brick); color: #fff; font-weight: 600; font-size: .93rem; text-decoration: none;
  transition: background-color .35s var(--ease), transform .35s var(--ease);
}
.book-btn:hover { background: var(--brick-deep); }
.book-btn:active { transform: scale(.98); }
.menu-btn {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 0; background: transparent; color: var(--ink); font: 600 .9rem/1 var(--body); cursor: pointer;
}
.menu-icon { position: relative; width: 18px; height: 1.5px; background: currentColor; transition: background-color .2s; }
.menu-icon::before, .menu-icon::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 1.5px; background: currentColor;
  transition: transform .45s var(--ease);
}
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* ── 홈: 첫 화면 조각보 ── */
.quilt-hero {
  display: grid; gap: var(--gap); padding: var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(260px, 1fr);
  grid-template-areas:
    "video video video video video video video video photo photo photo photo"
    "title title title title title tour tour tour book book hours hours";
  min-height: calc(100svh - var(--head));
}
.patch--video { grid-area: video; aspect-ratio: 16 / 9; background: #2a2925; color: #fff; }
.patch--video video { width: 100%; height: 100%; object-fit: cover; }
.video-toggle {
  position: absolute; left: 18px; bottom: 18px; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(246, 243, 238, .92); color: var(--ink); cursor: pointer;
  box-shadow: 0 12px 32px -14px rgba(34, 32, 29, .6), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .5s var(--ease);
}
.video-toggle:hover { transform: scale(1.06); }
.video-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.video-toggle:active { transform: scale(.96); }
.video-toggle .i-play { fill: currentColor; stroke: none; }
.video-toggle[data-state="playing"] .i-play,
.video-toggle[data-state="paused"] .i-pause { display: none; }

.patch--title {
  grid-area: title; padding: clamp(24px, 2.6vw, 40px) clamp(10px, 1.6vw, 24px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
}
.patch--title h1 { margin: 0; font: 300 clamp(1.5rem, 1rem + 1.3vw, 2.25rem)/1.3 var(--display); letter-spacing: -.02em; }
/* '휴' 한 글자를 크게: 이야기가 머무는 곳의 이름 */
.h1-mark { display: block; margin-top: .1em; font-weight: 600; font-size: clamp(4.2rem, 2.6rem + 3.8vw, 6rem); line-height: 1; letter-spacing: -.03em; }
.hero-sub { margin: 0; font: 400 clamp(1.05rem, .95rem + .35vw, 1.25rem)/1.55 var(--display); }
.hero-meta { margin: 0; font-size: .9rem; color: var(--ink-soft); }

.patch--tour { grid-area: tour; display: flex; align-items: flex-end; background: var(--ink); color: var(--ground); text-decoration: none; }
.tour-pano {
  position: absolute; inset: 0;
  background: url('../assets/360/temp-lounge.jpg') 0 50% / auto 140% repeat-x;
  animation: pan 70s linear infinite; transition: transform .9s var(--ease);
}
.patch--tour:hover .tour-pano { transform: scale(1.04); }
@keyframes pan { to { background-position: -200% 50%; } }
.tour-label {
  position: relative; z-index: 3; margin: 16px; padding: 13px 16px; border-radius: 14px;
  background: rgba(34, 32, 29, .86);
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .7);
}
.tour-label svg { grid-row: span 2; align-self: center; width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.tour-label strong { font-weight: 600; }
.tour-label span { font-size: .85rem; color: rgba(246, 243, 238, .74); }

.patch--photo { grid-area: photo; display: block; }
.patch--photo img { transition: transform 1.1s var(--ease); }
a.patch--photo:hover img { transform: scale(1.035); }

.patch--book {
  grid-area: book; background-color: var(--brick); color: #fff; text-decoration: none;
  padding: 26px 22px; display: flex; flex-direction: column; gap: 6px;
  transition: background-color .4s var(--ease);
}
.patch--book strong { font: 600 1.4rem/1.3 var(--display); letter-spacing: -.01em; }
.patch--book span { font-size: .88rem; color: rgba(255, 255, 255, .86); }
/* 화살표는 둥근 단추 안에 */
.patch--book svg, .patch--cta svg {
  margin-top: auto; width: 44px; height: 44px; padding: 11px; box-sizing: border-box;
  border: 1px solid currentColor; border-radius: 50%;
  fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .6s var(--ease), background-color .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.patch--book:hover { background-color: var(--brick-deep); }
.patch--book:hover svg, .patch--cta:hover svg { transform: translateX(5px); }
.patch--book:hover svg { background-color: #fff; color: var(--brick-deep); border-color: #fff; }
.patch--cta:not(.patch--book):hover svg { background-color: var(--ink); color: var(--ground); border-color: var(--ink); }

.patch--hours { grid-area: hours; padding: 26px 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.patch--hours strong { font: 600 1.1rem/1.35 var(--display); }
.patch--hours span { font-size: .88rem; color: var(--ink-soft); }

/* 누를 수 있는 리넨 조각 */
a.patch--info, .patch-nav .patch, a.patch--cta:not(.patch--book) { transition: background-color .4s var(--ease); }
a.patch--info:hover, .patch-nav .patch:hover, a.patch--cta:not(.patch--book):hover { background-color: var(--linen-deep); }

/* ── 구역 머리 ── */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: 0 14px 28px; }
.section-head h2 { margin: 0; font: 400 clamp(1.7rem, 1.2rem + 1.4vw, 2.5rem)/1.2 var(--display); letter-spacing: -.02em; }
.section-head p { margin: 0; color: var(--ink-soft); }

/* ── 홈: 공간 조각보 ── */
.spaces { padding: clamp(72px, 9vw, 128px) var(--gap) var(--gap); }
.space-quilt { display: grid; gap: clamp(28px, 3vw, 44px); }
.space-row { display: grid; gap: var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.patch--group {
  grid-column: span 3; padding: 18px 16px 24px 8px; border-top: 1px solid var(--ink);
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
}
.patch--group h3 { margin: 0; font: 400 2rem/1.15 var(--display); letter-spacing: -.02em; text-underline-offset: 8px; text-decoration-thickness: 1px; }
a.patch--group:hover h3 { text-decoration: underline; }
.patch--group p { margin: 0; color: var(--ink-soft); }
.patch--group .note { margin-top: auto; font-size: .86rem; }
.patch--space { grid-column: span 3; display: flex; flex-direction: column; }
.space-photo { position: relative; margin: 0; overflow: hidden; background: var(--linen); }
.space-photo img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; transition: transform 1.1s var(--ease); }
.patch--space:hover .space-photo img { transform: scale(1.04); }
.space-body { padding: 16px 6px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.space-body h4 { margin: 0; font: 600 1.3rem/1.3 var(--display); letter-spacing: -.01em; }
.space-body h4 a { text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 1px; }
/* 카드 어디를 눌러도 공간 자세히로 */
.space-body h4 a::before { content: ''; position: absolute; inset: 0; z-index: 2; }
.patch--space:hover h4 a { text-decoration: underline; }
.patch--space:has(h4 a:focus-visible) { outline: 2px solid var(--ink); outline-offset: 4px; }
.space-body h4 a:focus-visible { outline: none; }
.space-body h4 span { font: 500 .82rem/1 var(--body); color: var(--ink-soft); margin-left: 4px; letter-spacing: 0; }
.space-body p { margin: 0; font-size: .93rem; color: var(--ink-soft); max-width: 34ch; }
.space-book {
  position: relative; z-index: 3; align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--brick); border-radius: 999px; color: var(--brick);
  font-size: .85rem; font-weight: 600; text-decoration: none;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.space-book:hover { background: var(--brick); color: #fff; }

/* ── 홈·공간: 안내 조각 ── */
.info-quilt, .shared-quilt { display: grid; gap: var(--gap); padding: var(--gap); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.info-quilt { margin-top: clamp(40px, 5vw, 72px); }
.shared-quilt { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; }
.patch--info { padding: 28px 24px 30px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; text-decoration: none; }
.patch--info strong { font: 600 1.2rem/1.3 var(--display); }
.patch--info span { font-size: .92rem; color: var(--ink-soft); }
/* 함께 쓰는 곳: 공간 카드와 같은 사진 + 글(누르는 곳은 아님) */
.patch--shared { display: flex; flex-direction: column; }
.space-body h3 { margin: 0; font: 600 1.3rem/1.3 var(--display); letter-spacing: -.01em; }

/* ── 하위 페이지: 머리 조각보 ── */
.page-quilt {
  display: grid; gap: var(--gap); padding: var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-areas: "title title title title title photo photo photo photo photo tally tally";
  min-height: min(62svh, 560px);
}
.patch--page-title { grid-area: title; padding: clamp(28px, 3vw, 48px) clamp(10px, 1.6vw, 24px); display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; }
.patch--page-title h1 { margin: 0; font: 400 clamp(2rem, 1.2rem + 2.2vw, 3.2rem)/1.2 var(--display); letter-spacing: -.025em; max-width: 16ch; }
.patch--page-title p { margin: 0; max-width: 40ch; color: var(--ink-soft); }
.page-quilt--compact { min-height: 0; grid-template-areas: "title title title title title title title title side side side side"; }
.page-quilt--compact .patch--page-title { min-height: 280px; }
.page-quilt--compact .patch--book { grid-area: side; min-height: 200px; }
.patch-nav { grid-area: side; display: grid; gap: var(--gap); }
.patch-nav .patch { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 18px 22px; text-decoration: none; }
.patch-nav strong { font: 600 1.2rem/1.3 var(--display); }
.patch-nav span { font-size: .88rem; color: var(--ink-soft); }

/* ── 소개 ── */
.name-quilt { display: grid; gap: var(--gap); padding: 0 var(--gap) var(--gap); grid-template-columns: repeat(12, minmax(0, 1fr)); }
.patch--name { grid-column: span 4; padding: 32px 28px 34px; display: flex; flex-direction: column; gap: 10px; min-height: 360px; }
.patch--name .glyph { margin: 0 0 auto; font: 300 clamp(4.5rem, 3rem + 4vw, 6rem)/1 var(--display); letter-spacing: -.02em; }
.patch--name .glyph--en { font-family: var(--display); font-weight: 400; letter-spacing: -.04em; }
.patch--name h3 { margin: 0; font: 600 1.5rem/1.3 var(--display); }
.patch--name p { margin: 0; max-width: 36ch; color: var(--ink-soft); }
.patch--name-photo { grid-column: span 4; min-height: 360px; }
.patch--name-photo img { object-position: 20% 85%; } /* 넓게 잘릴 때도 텐트·돌담이 보이게 */

.days { padding: clamp(72px, 9vw, 120px) var(--gap) var(--gap); }
.days-quilt { display: grid; gap: var(--gap) clamp(16px, 2vw, 28px); grid-template-columns: repeat(6, minmax(0, 1fr)); }
.patch--day {
  grid-column: span 2; padding: 20px 8px 30px; border-top: 1px solid var(--ink);
  display: flex; flex-direction: column; gap: 8px; min-height: 210px; text-decoration: none;
}
.patch--day:nth-child(4), .patch--day:nth-child(5) { grid-column: span 3; }
.patch--day h3 { margin: 0; font: 400 1.45rem/1.3 var(--display); letter-spacing: -.01em; text-underline-offset: 6px; text-decoration-thickness: 1px; }
a.patch--day:hover h3 { text-decoration: underline; }
.patch--day p { margin: 0; max-width: 34ch; color: var(--ink-soft); }
/* 사진이 있는 카드: 위 선 대신 사진. 누르면 그 사진이 공간 페이지 큰 사진으로 이어진다 */
.patch--day:has(.day-photo) { border-top: 0; padding-top: 0; }
.day-photo { position: relative; margin: 0 -8px 10px; overflow: hidden; background: var(--linen); }
.day-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 1.1s var(--ease); }
a.patch--day:hover .day-photo img { transform: scale(1.04); }

/* 소개 — 맨 위 영상 */
.about-video { padding: var(--gap); }
.about-video .patch--video { max-height: calc(100svh - var(--head) - 2 * var(--gap)); width: 100%; }

/* 소개 — 쉬어 가는 숲(약도 + 번호 목록) */
.site-quilt {
  display: grid; gap: var(--gap); padding: clamp(72px, 9vw, 120px) var(--gap) var(--gap);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.site-quilt .patch--page-title { grid-area: auto; grid-column: span 4; justify-content: flex-start; }
.site-quilt .patch--page-title .btn { align-self: flex-start; margin-top: 10px; }
.site-quilt .site-map { grid-column: span 8; background: var(--linen); }
.site-map > .credit { top: 12px; bottom: auto; } /* 아래쪽 번호(라운지 건물)를 가리지 않게 */
.site-legend {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: 18px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px 18px;
}
.site-legend a {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; align-items: start;
  padding: 10px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; transition: background-color .3s var(--ease);
}
.site-legend a:hover { background: rgba(34, 32, 29, .06); }
.site-legend .legend-n {
  grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--ink); font: 600 .82rem/1 var(--body); font-variant-numeric: tabular-nums;
}
.site-legend strong { font: 600 .98rem/1.35 var(--body); }
.site-legend .legend-line { font-size: .84rem; line-height: 1.5; color: var(--ink-soft); }
.site-legend .legend-kind { margin-left: 6px; font-size: .72rem; font-weight: 600; color: var(--ink-soft); }

/* 소개 — 휴이야기터 둘러보기(옆으로 넘기기) */
.gallery { padding: clamp(72px, 9vw, 120px) var(--gap) var(--gap); }
.gallery .section-head { align-items: flex-end; }
.gallery-nav { display: flex; gap: 8px; }
.gallery-nav button {
  width: 48px; height: 48px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: var(--ink); cursor: pointer; transition: background-color .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}
.gallery-nav button:hover:not(:disabled) { background: var(--ink); color: var(--ground); }
.gallery-nav button:disabled { opacity: .3; cursor: default; }
.gallery-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.gallery-frame { position: relative; }
.gallery-track {
  display: flex; gap: var(--gap); margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.gallery-slide { flex: 0 0 min(48%, 720px); scroll-snap-align: start; margin: 0; background: var(--linen); }
.gallery-slide img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery-count {
  position: absolute; right: 12px; bottom: 12px; margin: 0; padding: 5px 11px; border-radius: 999px;
  background: rgba(34, 32, 29, .64); color: #fff; font-size: .75rem; font-variant-numeric: tabular-nums; pointer-events: none;
}
.gallery-note { margin: 12px 14px 0; font-size: .82rem; color: var(--ink-soft); }


.cta-quilt { display: grid; gap: var(--gap); padding: var(--gap); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.patch--cta { display: flex; flex-direction: column; gap: 18px; padding: 28px 24px; min-height: 170px; text-decoration: none; }
.patch--cta strong { font: 600 1.35rem/1.3 var(--display); }
.patch--cta.patch--book { grid-area: auto; }

/* ── 공간 ── */
.detail-group { padding: clamp(72px, 9vw, 112px) var(--gap) 0; }
.detail { display: grid; gap: var(--gap); grid-template-columns: 7fr 5fr; margin-bottom: clamp(28px, 3vw, 44px); }
.detail--flip { grid-template-columns: 5fr 7fr; }
.detail--flip .detail-media { order: 2; }
.detail-media { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.detail-photo { flex: 1; min-height: 440px; }
.detail-photo img { transition: opacity .45s var(--ease); }
.detail-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.thumb {
  position: relative; padding: 0; border: 0; aspect-ratio: 4 / 3; overflow: hidden; cursor: pointer;
  background: var(--linen); opacity: .62; transition: opacity .4s var(--ease);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.thumb:hover { opacity: 1; }
.thumb:hover img { transform: scale(1.06); }
.thumb[aria-pressed="true"] { opacity: 1; outline: 2px solid var(--ink); outline-offset: -2px; }
.detail-body { padding: clamp(24px, 3vw, 44px) clamp(14px, 2vw, 32px); display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--ink); }
.detail-body h3 { margin: 0; font: 400 clamp(1.9rem, 1.3rem + 1.5vw, 2.7rem)/1.2 var(--display); letter-spacing: -.025em; }
.detail-body h3 span { font: 500 1rem/1 var(--body); color: var(--ink-soft); margin-left: 6px; letter-spacing: 0; }
.detail-summary { margin: 0; font: 400 1.12rem/1.6 var(--display); max-width: 34ch; }
.detail-body ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .95rem; color: var(--ink-soft); }
.detail-body li { padding-left: 18px; position: relative; }
.detail-body li::before { content: ''; position: absolute; left: 0; top: .8em; width: 8px; border-top: 1px solid currentColor; }
.detail-actions { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.shared { padding: clamp(72px, 9vw, 112px) var(--gap) var(--gap); }

/* ── 360 둘러보기 ── */
.tour {
  display: grid; gap: var(--gap); padding: var(--gap);
  grid-template-columns: minmax(0, 1fr) clamp(280px, 26vw, 380px);
  height: calc(100svh - var(--head)); min-height: 560px;
}
.tour-stage { background: var(--ink); color: #fff; }
#pano { width: 100%; height: 100%; }
#pano:focus-visible { outline: 2px solid var(--ground); outline-offset: -6px; }
.tour-stage .label { left: auto; right: 64px; top: 14px; }
.pano-message {
  position: absolute; inset: auto 24px 24px; z-index: 4; margin: 0; padding: 14px 16px; border-radius: 12px;
  background: var(--ground); color: var(--ink); font-weight: 600;
}
.tour-side { display: grid; gap: var(--gap); grid-template-rows: auto 1fr; min-height: 0; }
.tour-caption { padding: 24px 18px 28px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--ink); }
.tour-caption h2 { margin: 0; font: 400 1.7rem/1.25 var(--display); letter-spacing: -.02em; }
.tour-caption p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.tour-caption .btn { align-self: flex-start; margin-top: 6px; }
.tour-list { padding: 24px 20px; overflow: auto; }
.tour-list h2 { margin: 0 0 10px 4px; font: 600 1.05rem/1.3 var(--display); }
.tour-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.scene-btn {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  background: transparent; color: var(--ink); font: 600 .95rem/1.35 var(--body); cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.scene-btn:hover:not(:disabled) { background: rgba(34, 32, 29, .06); }
.scene-btn[aria-pressed="true"], .scene-btn[aria-pressed="true"]:hover { background: var(--ink); color: var(--ground); }
.scene-btn:disabled { color: rgba(34, 32, 29, .5); cursor: default; }
.scene-state { flex: none; font-size: .75rem; font-weight: 500; opacity: .75; }
.tour-help { margin: 14px 4px 0; font-size: .85rem; color: var(--ink-soft); }
.page-tour .foot { display: none; }

/* 무대: 약도 · 360 · 평면 사진 중 하나만 */
.tour-stage > #pano, .tour-map, .tour-photo { position: absolute; inset: 0; }
.tour-stage[data-view="map"] #pano, .tour-stage[data-view="map"] .tour-photo, .tour-stage[data-view="map"] .map-back,
.tour-stage[data-view="pano"] .tour-map, .tour-stage[data-view="pano"] .tour-photo,
.tour-stage[data-view="photo"] .tour-map, .tour-stage[data-view="photo"] #pano { display: none; }
.tour-map { container-type: size; display: flex; align-items: center; justify-content: center; background: var(--ink); }
.tour-map .site-map-frame { width: min(100cqw, 127.7cqh); }
.tour-map > .credit { display: none; } /* 무대 오른쪽 아래 출처가 대신한다 */
.tour-photo { margin: 0; background: var(--ink); }
.tour-photo img { width: 100%; height: 100%; object-fit: contain; }
.photo-step {
  position: absolute; top: 50%; z-index: 3; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(246, 243, 238, .92); color: var(--ink); cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); transition: transform .3s var(--ease);
}
.photo-step:hover { transform: scale(1.06); }
.photo-step:active { transform: scale(.96); }
.photo-step--prev { left: 16px; }
.photo-step--next { right: 16px; }
.photo-step svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.photo-step[hidden] { display: none; }
.photo-count {
  position: absolute; left: 50%; bottom: 16px; z-index: 3; transform: translateX(-50%); padding: 5px 11px; border-radius: 999px;
  background: rgba(34, 32, 29, .64); color: #fff; font-size: .75rem; font-variant-numeric: tabular-nums;
}
.photo-count:empty { display: none; }
.map-back {
  position: absolute; left: 16px; bottom: 14px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--ground); color: var(--ink);
  font: 600 .85rem/1 var(--body); cursor: pointer; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6); transition: transform .3s var(--ease);
}
.map-back:hover { transform: translateY(-1px); }
.map-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }

/* ── 약도 (소개 · 360 둘러보기 같이 씀, js/site-map.js) ── */
.site-map-frame { position: relative; }
.site-map-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.map-pin {
  position: absolute; z-index: 2; transform: translate(-50%, -50%);
  padding: 0; border: 0; background: none; color: var(--ink); text-decoration: none; cursor: pointer;
}
.map-pin::before { content: ''; position: absolute; inset: -8px; } /* 누르는 자리를 넉넉히 */
.map-pin-n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ground); color: var(--ink); font: 600 .82rem/1 var(--body); font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px rgba(34, 32, 29, .9), 0 6px 14px -6px rgba(0, 0, 0, .7);
  transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.map-pin-name {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  padding: 6px 11px; border-radius: 999px; background: var(--ink); color: var(--ground);
  font: 600 .78rem/1 var(--body); white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.map-pin:hover, .map-pin:focus-visible { z-index: 3; outline: none; }
.map-pin:hover .map-pin-n, .map-pin:focus-visible .map-pin-n { background: var(--ink); color: var(--ground); transform: scale(1.1); }
.map-pin:focus-visible .map-pin-n { box-shadow: 0 0 0 2px var(--ground), 0 0 0 4px var(--ink); }
.map-pin:hover .map-pin-name, .map-pin:focus-visible .map-pin-name { opacity: 1; transform: translate(-50%, 0); }

/* Pannellum 다듬기 */
.pnlm-container { background: var(--ink); font-family: var(--body); }
.pnlm-panorama-info { display: none !important; } /* 장면 이름은 옆 설명 조각에 보인다 */
.pnlm-load-box { background: rgba(34, 32, 29, .85); border-radius: 12px; }
.pnlm-controls { border-radius: 10px; border: 0; overflow: hidden; box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .6); }
.pnlm-control { background-color: var(--ground); }
.pnlm-control:hover { background-color: #fff; }
/* 넘어가는 점: 흰 동그라미 가운데 먹색 점 */
.pnlm-hotspot-base.hue-hotspot {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(246, 243, 238, .96); cursor: pointer;
  box-shadow: 0 0 0 7px rgba(246, 243, 238, .32), 0 12px 26px -10px rgba(0, 0, 0, .75);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.pnlm-hotspot-base.hue-hotspot::after { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--ink); }
.pnlm-hotspot-base.hue-hotspot:hover { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(246, 243, 238, .4), 0 12px 26px -10px rgba(0, 0, 0, .75); }
.pnlm-hotspot-base.hue-hotspot span { font-family: var(--body); }
.pnlm-tooltip span { background: var(--ink); border-radius: 8px; padding: 6px 10px; font-size: .85rem; }
.pnlm-tooltip span::after { border-color: var(--ink) transparent transparent transparent; }

/* ── 이용 안내 ── */
.guide { padding: clamp(72px, 9vw, 112px) var(--gap) 0; }
.guide-quilt { display: grid; gap: var(--gap); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.patch--time, .patch--list { padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 12px; }
.patch--time { padding: 20px 10px 30px; border-top: 1px solid var(--ink); }
.patch--time h3, .patch--list h3 { margin: 0; font: 600 1.35rem/1.3 var(--display); }
.slots { margin: 0; display: grid; gap: 6px; }
.slots div { display: flex; gap: 14px; align-items: baseline; }
.slots dt { min-width: 3em; font-size: .88rem; color: var(--ink-soft); }
.slots dd { margin: 0; font: 400 1.3rem/1.35 var(--display); }
.patch--time p { margin: auto 0 0; font-size: .9rem; color: var(--ink-soft); }
.patch--list ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--ink-soft); }
.patch--list li { padding-left: 18px; position: relative; }
.patch--list li::before { content: ''; position: absolute; left: 0; top: .8em; width: 8px; border-top: 1px solid currentColor; }
.visit { padding-bottom: var(--gap); }
.visit-quilt { display: grid; gap: var(--gap); grid-template-columns: 7fr 5fr; }
.visit-map { min-height: 440px; background: var(--linen); }
.visit-map iframe { width: 100%; height: 100%; border: 0; filter: saturate(.7) sepia(.08); }
.visit-body { padding: clamp(28px, 3vw, 40px); display: flex; flex-direction: column; gap: 8px; }
.visit-body h3 { margin: 0; font: 600 1.35rem/1.4 var(--display); }
.visit-body h4 { margin: 14px 0 0; font: 700 .95rem/1.3 var(--body); }
.visit-body p { margin: 0; max-width: 46ch; color: var(--ink-soft); }
.visit-body .jibun { font-size: .9rem; }

/* ── 꼬리말 ── */
.foot {
  margin-top: clamp(72px, 9vw, 128px); padding: 48px 24px 64px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 28px 48px; align-items: start;
  border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .92rem;
}
.foot-logo { height: 56px; width: auto; }
.foot-info { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 10px 40px; }
.foot-info div { display: flex; gap: 12px; }
.foot-info dt { color: var(--ink); font-weight: 600; min-width: 2.5em; }
.foot-info dd { margin: 0; }
.foot-book { align-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 6px 6px 6px 20px; border-radius: 999px; background: var(--brick); color: #fff; font-weight: 600; text-decoration: none; transition: background-color .35s var(--ease); }
.foot-book:hover { background: var(--brick-deep); }
.foot-note { grid-column: 1 / -1; margin: 0; font-size: .8rem; opacity: .8; }

/* ── 태블릿 ── */
@media (max-width: 1023px) {
  .menu-btn { display: inline-flex; }
  .book-btn { margin-left: auto; }
  .nav {
    position: fixed; inset: var(--head) 0 auto; z-index: 19; margin: 0;
    display: grid; gap: 0; padding: 8px 20px 28px; background: var(--ground);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 50px -32px rgba(34, 32, 29, .4);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .4s var(--ease), opacity .4s var(--ease), visibility 0s .4s;
  }
  .menu-open .nav { transform: none; opacity: 1; visibility: visible; transition: transform .4s var(--ease), opacity .4s var(--ease); }
  /* 메뉴 글자가 한 줄씩 차례로 올라온다 */
  .nav a {
    position: relative; border-radius: 0; padding: 18px 4px; border-bottom: 1px solid var(--line);
    font: 400 1.5rem/1.3 var(--display); letter-spacing: -.01em; color: var(--ink); background: transparent;
    transform: translateY(14px); opacity: 0; transition: transform .7s var(--ease), opacity .5s var(--ease);
  }
  .nav a:hover { background: transparent; }
  .menu-open .nav a { transform: none; opacity: 1; }
  .menu-open .nav a:nth-child(2) { transition-delay: .05s; }
  .menu-open .nav a:nth-child(3) { transition-delay: .1s; }
  .menu-open .nav a:nth-child(4) { transition-delay: .15s; }
  .nav a[aria-current="page"] { background: transparent; text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }

  .quilt-hero {
    grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto auto auto;
    grid-template-areas:
      "video video video video video video"
      "title title title title tour tour"
      "photo photo book book hours hours";
  }
  .patch--title { min-height: 300px; }
  .patch--photo, .patch--book, .patch--hours { min-height: 220px; }
  .space-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .patch--group { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 16px; }
  .patch--group .note { margin-top: 0; width: 100%; }
  .patch--space { grid-column: span 1; }
  .info-quilt { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .page-quilt { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .page-quilt--compact { grid-template-areas: "title title title title side side"; }
  .patch--name, .patch--name-photo { grid-column: span 6; min-height: 280px; }
  .patch--name-photo { grid-column: 1 / -1; }
  .days-quilt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .patch--day, .patch--day:nth-child(4), .patch--day:nth-child(5) { grid-column: span 1; }
  .patch--day:nth-child(5) { grid-column: 1 / -1; }
  .site-quilt .patch--page-title, .site-quilt .site-map { grid-column: 1 / -1; }
  .site-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-slide { flex-basis: 64%; }
  .detail, .detail--flip { grid-template-columns: 1fr; }
  .detail--flip .detail-media { order: 0; }
  .detail-photo { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
  .tour { grid-template-columns: 1fr; height: auto; }
  .tour-stage { height: min(70svh, 620px); }
  .tour-stage[data-view="map"] { height: auto; aspect-ratio: 1980 / 1550; } /* 약도는 위아래 빈 띠 없이 */
  .tour-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .page-tour .foot { display: grid; }
  .guide-quilt { grid-template-columns: 1fr 1fr; }
  .guide-quilt > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .visit-quilt { grid-template-columns: 1fr; }
  .visit-map { min-height: 340px; }
  .foot { grid-template-columns: 1fr; }
}

/* ── 휴대폰 ── */
@media (max-width: 639px) {
  :root { --head: 58px; }
  .top { padding: 0 8px 0 16px; gap: 6px; }
  .brand-name { display: none; }
  .book-btn { padding: 10px 16px; font-size: .9rem; }
  .menu-label { display: none; }
  .quilt-hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "video video" "title title" "book tour" "photo hours";
    min-height: 0;
  }
  .patch--video { aspect-ratio: auto; height: min(68svh, 600px); }
  .patch--video[data-orientation="landscape"] { aspect-ratio: 16 / 9; height: auto; }
  .patch--title { min-height: 0; padding: 30px 12px 32px; }
  .patch--book, .patch--tour { min-height: 190px; }
  .patch--photo, .patch--hours { min-height: 170px; }
  .patch--hours { padding: 22px 18px; }
  .patch--hours strong { font-size: .92rem; white-space: nowrap; }
  .tour-label { margin: 10px; grid-template-columns: 1fr; }
  .tour-label svg { display: none; }
  .space-row { grid-template-columns: 1fr; }
  .space-photo img { aspect-ratio: 16 / 10; }
  .info-quilt, .shared-quilt { grid-template-columns: 1fr; }
  .patch--info { min-height: 0; }
  .section-head { margin: 0 10px 22px; }

  .page-quilt, .page-quilt--compact { grid-template-columns: 1fr; min-height: 0; }
  .page-quilt--compact { grid-template-areas: "title" "side"; }
  .patch--page-title { min-height: 0; padding: 30px 12px 30px; }
  .page-quilt--compact .patch--page-title { min-height: 0; }
  .site-legend { grid-template-columns: 1fr; padding: 8px 4px; }
  .map-pin-n { width: 22px; height: 22px; font-size: .66rem; box-shadow: 0 0 0 1.5px rgba(34, 32, 29, .9), 0 4px 10px -4px rgba(0, 0, 0, .7); }
  .map-pin::before { inset: -6px; }
  .gallery-slide { flex-basis: 90%; }
  .gallery-nav button { width: 44px; height: 44px; }
  .patch--name, .patch--name-photo { grid-column: 1 / -1; min-height: 0; }
  .patch--name-photo { aspect-ratio: 4 / 3; }
  .days-quilt { grid-template-columns: 1fr; }
  .patch--day:nth-child(5) { grid-column: auto; }
  .patch--day { min-height: 0; }
  .cta-quilt { grid-template-columns: 1fr; }
  .patch--cta { min-height: 120px; }
  .detail-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tour-stage { height: 62svh; }
  .tour-side { grid-template-columns: 1fr; }
  .guide-quilt { grid-template-columns: 1fr; }
  .visit-map { min-height: 280px; }
  .foot-info { grid-template-columns: 1fr; }
}

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