/* 《겹》 GYEOP
   흑과 백, 가는 선, 작은 글자. 영문 로고만 Bodoni, 정보는 고정폭(IBM Plex Mono), 한글은 Pretendard.
   강조는 색이 아니라 반전으로 한다 — 표지의 규칙 「겹친 곳은 흑백이 뒤집힌다」. */

:root {
  --bg: #fff;
  --fg: #000;
  --grey: #8a8a8a;
  --hair: #000;
  --soft: #f1f1ef;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, var(--sans);
  --serif: "Noto Serif KR", serif;
  --bodoni: "Bodoni Moda", "Bodoni MT", Didot, serif;
  --m: 16px;            /* 바깥 여백 */
  --g: 16px;            /* 단 사이 */
  --top: 44px;          /* 머리 막대 */
}
@media (min-width: 900px) { :root { --m: 20px; --g: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--top); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 450 14px/1.55 var(--sans); letter-spacing: -.005em;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--fg); color: var(--bg); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .01em; line-height: 1.5; text-transform: uppercase; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg); padding: 8px 12px; }
.skip:focus { top: 8px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); }
.grid > * { grid-column: 1 / -1; }

/* 버튼: 네모, 반전 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg);
  font: 500 13px/1 var(--sans); white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--bg); color: var(--fg); }
.btn--line { background: var(--bg); color: var(--fg); }
.btn--line:hover { background: var(--fg); color: var(--bg); }
.btn[disabled] { opacity: .4; cursor: progress; }

/* ── 머리 막대 ─────────────────────────── */
.top {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--top);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--g); align-items: center;
  padding: 0 var(--m); background: var(--bg); border-bottom: 1px solid var(--hair);
}
.top__mark { grid-column: 1 / span 4; font: 400 21px/1 var(--bodoni); letter-spacing: -.02em; white-space: nowrap; }
.top__title { display: none; }
.top__nav { grid-column: 5 / -1; display: flex; justify-content: flex-end; gap: 14px; font-size: 13px; }
.top__nav a { position: relative; }
.top__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.top__nav a:hover::after, .top__nav a.is-on::after { transform: scaleX(1); }
.top__time { display: none; }
@media (min-width: 900px) {
  .top__mark { grid-column: 1 / span 2; }
  .top__title { display: block; grid-column: 3 / span 4; font-size: 13px; }
  .top__nav { grid-column: 7 / span 3; justify-content: flex-start; gap: 20px; }
  .top__time { display: flex; grid-column: 10 / -1; justify-content: flex-end; gap: 14px; }
}

/* ── 첫 화면 ───────────────────────────── */
.hero { position: relative; height: 100svh; min-height: 560px; padding-top: var(--top); overflow: hidden; }
#heroCanvas { position: absolute; left: 0; top: var(--top); display: block; touch-action: pan-y; cursor: grab; -webkit-tap-highlight-color: transparent; }
#heroCanvas.is-drag { cursor: grabbing; }
.bands { list-style: none; margin: 0; padding: 0; position: absolute; left: 0; top: var(--top); right: 0; bottom: 0; pointer-events: none; }
.bands li { position: absolute; left: var(--m); }
.bands a {
  pointer-events: auto; display: inline-flex; gap: 8px; align-items: baseline; padding: 4px 6px 3px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--fg);
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap;
}
.bands a .t { display: none; font-family: var(--sans); text-transform: none; font-size: 12px; font-weight: 600; }
.bands li.is-on a { background: var(--fg); color: var(--bg); }
.bands li.is-on a .t { display: inline; }
.hero__box {
  position: absolute; bottom: var(--m); z-index: 2; display: grid; gap: 4px; padding: 8px 10px 9px;
  background: var(--bg); border: 1px solid var(--fg); font-size: 12.5px; line-height: 1.4; pointer-events: none;
}
.hero__box--l { left: var(--m); }
.hero__box--r { right: var(--m); text-align: right; }
@media (max-width: 520px) { .hero__box { font-size: 11.5px; padding: 6px 8px 7px; } }

/* ── 섹션 공통 ─────────────────────────── */
.sec { padding: clamp(96px, 14vw, 200px) var(--m) 0; }
.sec__head { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--hair); margin-bottom: clamp(40px, 6vw, 88px); }
.sec__head h2 { margin: 0; }
.sec__en { color: var(--grey); }

/* ── (01) 전시 ─────────────────────────── */
.about { row-gap: 48px; }
.about__def { font: 400 clamp(26px, 4.2vw, 64px)/1.18 var(--sans); letter-spacing: -.035em; }
.about__def b { font-family: var(--serif); font-weight: 900; }
.about__text { display: grid; gap: 1em; font-size: 15px; line-height: 1.75; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--g); border-top: 1px solid var(--hair); }
.facts div { padding: 10px 0 14px; border-bottom: 1px solid var(--hair); }
.facts dt { margin-bottom: 6px; }
.facts dd { margin: 0; font-size: 14px; }
.facts dd small { display: block; color: var(--grey); font-size: 12.5px; }
.about__map { margin: 0; }
.about__map img { width: 100%; background: var(--soft); }
.about__map figcaption { margin-top: 8px; display: flex; justify-content: space-between; gap: var(--g); }
.about__map figcaption span:last-child { color: var(--grey); text-transform: none; max-width: 60ch; text-align: right; font-family: var(--sans); font-size: 12px; }
@media (min-width: 900px) {
  .about__def { grid-column: 1 / span 10; }
  .about__text { grid-column: 5 / span 8; grid-template-columns: 1fr 1fr; column-gap: var(--g); font-size: 14.5px; }
  .facts { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── (02) 작품 목록 ─────────────────────── */
.index__head, .row { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; column-gap: var(--g); }
.index__head { padding-bottom: 8px; color: var(--grey); }
.index__head span:nth-child(n+3) { display: none; }
.row { position: relative; align-items: baseline; padding: 14px 0 18px; border-top: 1px solid var(--hair); cursor: pointer; transition: background .12s, color .12s; }
#index .row:last-child { border-bottom: 1px solid var(--hair); }
.row__no { font-family: var(--mono); font-size: 11px; }
.row__t { font: 500 clamp(30px, 6.4vw, 104px)/1.02 var(--sans); letter-spacing: -.045em; }
.row__t small { font: 900 .32em/1 var(--serif); letter-spacing: .04em; margin-left: .35em; vertical-align: .9em; }
.row__k { font: 900 15px/1 var(--serif); }
.row__p, .row__c { display: none; }
.row__sub { grid-column: 2 / -1; margin-top: 8px; font-size: 13px; color: var(--grey); }
.row__img { grid-column: 2 / -1; margin-top: 14px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: var(--soft); }
.row:hover, .row:focus-visible { background: var(--fg); color: var(--bg); outline: none; }
.row:hover .row__sub, .row:focus-visible .row__sub { color: #bdbdbd; }
@media (min-width: 900px) {
  .index__head, .row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .index__head span:nth-child(1), .row__no { grid-column: 1; }
  .index__head span:nth-child(2), .row__t { grid-column: 2 / span 6; }
  .index__head span:nth-child(3), .row__k { grid-column: 8 / span 1; }
  .index__head span:nth-child(4), .row__p { grid-column: 9 / span 2; }
  .index__head span:nth-child(5), .row__c { grid-column: 11 / span 2; text-align: right; }
  .index__head span:nth-child(n+3) { display: block; }
  .row { padding: 10px 0 14px; }
  .row__p, .row__c { display: block; font-size: 13px; }
  .row__c { font-family: var(--mono); font-size: 11px; }
  .row__sub { grid-column: 2 / span 6; margin-top: 6px; }
  .row__img { display: none; }
}
.peek {
  position: fixed; left: 0; top: 0; z-index: 30; width: min(30vw, 420px); pointer-events: none;
  opacity: 0; transition: opacity .15s; will-change: transform;
}
.peek.on { opacity: 1; }
@media (hover: none) { .peek { display: none; } }

/* ── (03) 응원 ─────────────────────────── */
.cheer { row-gap: 48px; }
.cheer__count { font: 400 clamp(88px, 18vw, 260px)/.8 var(--bodoni); letter-spacing: -.05em; }
.cheer__lead { margin-top: 24px; max-width: 26em; font-size: 15px; line-height: 1.7; }
.demo { margin-top: 16px; color: var(--grey); text-transform: none; }

.send { display: grid; gap: 18px; }
.send__to { border: 0; margin: 0; padding: 0; min-width: 0; }
.send__to legend { padding: 0; margin-bottom: 10px; }
.to { display: flex; flex-wrap: wrap; gap: 6px; }
.to label { position: relative; }
.to input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.to span { display: inline-block; padding: 5px 9px 4px; border: 1px solid var(--fg); font-size: 13px; line-height: 1.3; }
.to input:checked + span { background: var(--fg); color: var(--bg); }
.to input:focus-visible + span { outline: 1px solid var(--fg); outline-offset: 2px; }
.send textarea {
  width: 100%; resize: none; overflow: hidden; border: 0; border-bottom: 1px solid var(--fg); border-radius: 0; outline: none;
  padding: 6px 0 12px; background: transparent;
  font: 500 clamp(28px, 4.6vw, 68px)/1.15 var(--sans); letter-spacing: -.04em;
}
.send textarea::placeholder { color: #c4c4c4; }
.send__quick { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.send__quick button { font-size: 12.5px; color: var(--grey); }
.send__quick button:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.send__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.send__from { flex: 1 1 220px; display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--fg); padding-bottom: 6px; }
.send__from input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 15px; padding: 0; }
.send__len { color: var(--grey); }
.send__msg { min-height: 1.5em; text-transform: none; font-family: var(--sans); font-size: 13px; }
.send__msg.is-err { color: #c4001d; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.sent { display: grid; gap: 14px; padding-top: 4px; }
.sent__lead { font: 500 clamp(24px, 3vw, 40px)/1.2 var(--sans); letter-spacing: -.035em; }
.sent__sub a { text-decoration: underline; text-underline-offset: 3px; }
.sent__card { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 1fr); gap: var(--g); align-items: end; margin-top: 8px; }
.sent__card img { width: 100%; aspect-ratio: 9 / 16; border: 1px solid var(--fg); background: var(--bg); }
.sent__btns { display: grid; gap: 6px; justify-items: start; }

.log__head, .lrow { display: grid; grid-template-columns: 2.8em 4.6em minmax(0, 1fr); column-gap: 12px; }
.log__head { padding-bottom: 8px; color: var(--grey); }
.log__head span:nth-child(3), .log__head span:nth-child(5) { display: none; }
.lrow { align-items: baseline; padding: 10px 0 11px; border-top: 1px solid var(--hair); transition: background .12s, color .12s; }
.lrow:last-child { border-bottom: 1px solid var(--hair); }
.lrow > span:nth-child(-n+2) { font-family: var(--mono); font-size: 11px; }
.lrow__to { display: none; }
.lrow__x { font-size: 15px; line-height: 1.45; }
.lrow__x small { display: block; margin-top: 2px; font-size: 12px; color: var(--grey); }
.lrow__from { display: none; }
.lrow.is-mine { background: var(--fg); color: var(--bg); }
.lrow.is-mine .lrow__x small { color: #bdbdbd; }
.lrow.is-new { animation: arrive 1.2s ease-out; }
@keyframes arrive { from { background: var(--fg); color: var(--bg); } }
.log__more { margin-top: 14px; text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 14px 0; border-top: 1px solid var(--hair); color: var(--grey); }
@media (min-width: 900px) {
  .cheer__intro { grid-column: 1 / span 5; grid-row: 1 / span 2; align-self: start; position: sticky; top: calc(var(--top) + 20px); }
  .send, .sent { grid-column: 7 / -1; }
  .log { grid-column: 7 / -1; }
  .log__head, .lrow { grid-template-columns: 3em 6.4em 8em minmax(0, 1fr) 7em; }
  .log__head span:nth-child(3), .log__head span:nth-child(5) { display: block; }
  .lrow__to { display: block; font-size: 12.5px; }
  .lrow__from { display: block; font-size: 12.5px; text-align: right; }
  .log__head span:nth-child(5) { text-align: right; }
  .lrow__x small { display: none; }
  .lrow:hover { background: var(--fg); color: var(--bg); }
}

/* ── (04) 관람 ─────────────────────────── */
.visit { row-gap: 48px; }
.visit__big { font: 400 clamp(44px, 9.6vw, 168px)/.9 var(--bodoni); letter-spacing: -.045em; }
.visit__big span { display: block; }
.facts--visit { grid-template-columns: 1fr; }
.visit__dept { display: grid; gap: 12px; align-content: start; font-size: 14px; line-height: 1.7; }
.visit__quote { font: 500 clamp(20px, 2.2vw, 28px)/1.35 var(--sans); letter-spacing: -.03em; }
.visit__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (min-width: 900px) {
  .visit__big { grid-column: 1 / -1; }
  .facts--visit { grid-column: 1 / span 7; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit__dept { grid-column: 9 / -1; }
}

/* ── 꼬리 ───────────────────────────── */
.foot { margin-top: clamp(120px, 16vw, 240px); padding: 0 var(--m) var(--m); }
.foot__mark { display: inline-block; font: 400 10px/.78 var(--bodoni); letter-spacing: -.05em; white-space: nowrap; margin-left: -.03em; }
.foot__row { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--hair); }

/* ── 작품 면 ───────────────────────────── */
.work { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--fg); overscroll-behavior: contain; }
.work::backdrop { background: rgba(0, 0, 0, .5); }
.work[open] { animation: up .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }
.work__bar { position: sticky; top: 0; z-index: 2; height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--m); background: var(--bg); border-bottom: 1px solid var(--hair); }
.work__bar button:hover { text-decoration: underline; text-underline-offset: 3px; }
.work__nav { display: flex; gap: 14px; }
.work__body { padding: 0 var(--m) 96px; }
.w-grid { row-gap: 28px; padding-top: 24px; }
.w-side { display: grid; gap: 20px; align-content: start; }
.w-title { margin: 0; font: 500 clamp(40px, 6vw, 92px)/1 var(--sans); letter-spacing: -.045em; }
.w-hanja { display: block; margin-top: 10px; font: 900 15px/1 var(--serif); letter-spacing: .1em; }
.w-sub { font-size: 16px; line-height: 1.5; }
.w-meta { margin: 0; display: grid; grid-template-columns: 6em minmax(0, 1fr); border-top: 1px solid var(--hair); }
.w-meta dt, .w-meta dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--hair); }
.w-meta dd { font-size: 13px; }
.w-body { display: grid; gap: 1em; font-size: 14.5px; line-height: 1.8; }
.w-quote { font: 500 18px/1.5 var(--sans); }
.w-notes { display: grid; gap: 18px; }
.w-note h4 { margin: 0 0 6px; }
.w-note p { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.w-note dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; font-size: 12.5px; }
.w-note dt, .w-note dd { margin: 0; padding: 5px 0; border-top: 1px solid #dcdcdc; }
.w-note dt { font-weight: 600; white-space: nowrap; }
.w-figs { display: grid; gap: 28px; }
.w-figs figure { margin: 0; cursor: zoom-in; }
.w-figs img { width: 100%; background: var(--soft); }
.w-figs figcaption { margin-top: 6px; display: flex; justify-content: space-between; }
.w-figs .is-leaf { max-width: 420px; }
.w-cheer { margin-top: 40px; padding-top: 10px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (min-width: 900px) {
  .w-side { grid-column: 1 / span 4; position: sticky; top: calc(var(--top) + 24px); align-self: start; max-height: calc(100vh - var(--top) - 40px); overflow: auto; scrollbar-width: none; }
  .w-figs { grid-column: 6 / -1; }
}

.zoom { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); }
.zoom[open] { display: grid; place-items: center; }
.zoom img { max-width: calc(100% - 2 * var(--m)); max-height: calc(100% - 80px); object-fit: contain; cursor: zoom-out; }
.zoom__x { position: fixed; top: 14px; right: var(--m); }

@media (prefers-reduced-motion: reduce) { .work[open] { animation: none; } .lrow.is-new { animation: none; } }
