/* Karl's World — 확정안 Stone. 모바일 우선. */
:root {
  --bg: #D9D6D0;
  --panel: #CDC9C2;
  --ink: #1F1E1C;
  --ink-2: #35322D;
  --muted: #57534C;
  --line: #B9B4AB;
  --shadow: 0 30px 60px rgba(40, 35, 28, 0.28);
  --sans: Manrope, 'Noto Sans KR', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Noto Sans KR', ui-monospace, monospace;
  --gutter: 20px;
  --section: 140px;
  --max: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 200; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.7;
}
.stack { display: flex; flex-direction: column; }
.right { text-align: right; }
.rule { border-top: 1px solid var(--line); }
/* .wrap 자체에 선을 그을 때는 좌우 여백 안쪽까지만 */
.wrap.rule { border-top: 0; background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.num { text-transform: none; }
.nowrap { white-space: nowrap; }
.link { color: var(--ink-2); }
.link:hover { color: var(--ink); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; }

/* 한글 화면: 제목 굵기 300 (Noto Sans KR 200은 너무 가늘다) */
.lang-ko h1, .lang-ko h2, .lang-ko .display, .lang-ko .headline, .lang-ko .quote,
.lang-ko .lead, .lang-ko .cap-title.big, .lang-ko .work-title, .lang-ko .horizon-line,
.lang-ko .series-name, .lang-ko .pn-title { font-weight: 300; }
.hero-title, .hero-title * { font-weight: 200 !important; }
/* 한글은 단어 단위로 줄바꿈, 고정폭 라벨 자간은 좁게 */
.lang-ko { word-break: keep-all; overflow-wrap: anywhere; }
.lang-ko .mono { letter-spacing: 0.03em; }

/* 작품 그림자 */
.art { box-shadow: var(--shadow); border-radius: 2px; background: var(--panel); }
.art-missing { background: var(--panel); aspect-ratio: 4 / 3; width: 100%; }

/* 4 : 8 그리드 (900px 이상) */
.grid { display: grid; grid-template-columns: 1fr; gap: 28px; }

/* ---------- 상단 ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; position: relative; z-index: 20;
}
.brand { font-weight: 500; font-size: 15px; letter-spacing: -0.01em; min-height: 44px; display: flex; align-items: center; }
.menu-btn {
  width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.menu-btn span { display: block; width: 18px; height: 1px; background: var(--ink); transition: transform .2s; }
.menu-open .menu-btn span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-btn span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.site-nav {
  display: none; position: absolute; top: 76px; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 20px; flex-direction: column;
}
.menu-open .site-nav { display: flex; }
.site-nav > a { font-size: 22px; font-weight: 200; padding: 10px 0; min-height: 44px; }
.site-nav > a.is-active { font-weight: 300; }
.lang-switch { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; }
.lang-switch a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 300; }
.lang-switch a.is-current { color: var(--ink); font-weight: 500; }
.lang-switch span { color: var(--line); }

/* ---------- 홈 ---------- */
.hero { padding-top: 24px; }
.hero-title { font-size: 76px; line-height: 0.92; letter-spacing: -0.045em; display: flex; flex-direction: column; }
.hero-art img { width: 100%; }
.hero-art figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; }
.hero-empty { display: none; }

.intro { margin-top: 64px; padding-top: 28px; }
.lead { font-size: 22px; line-height: 1.45; color: var(--ink); }
.body { font-size: 15px; line-height: 1.95; color: var(--ink-2); }
.intro-text .body { margin-top: 20px; }

.recent { margin-top: var(--section); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 28px; }
.h-small { font-size: 15px; font-weight: 500; }
.section-head .link { font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.strip {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 0 var(--gutter) 64px; scroll-padding: 0 var(--gutter);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
@media (min-width: 1400px) {
  .strip { padding-left: calc((100vw - var(--max)) / 2); scroll-padding-left: calc((100vw - var(--max)) / 2); }
}
.strip-item { flex: 0 0 auto; scroll-snap-align: start; display: flex; flex-direction: column; }
.strip-img { display: block; height: min(300px, calc(78vw * var(--r, 1))); }
.strip-img img { height: 100%; width: 100%; object-fit: cover; }
.cap { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 14px; width: 0; min-width: 100%; }
.cap-title { font-size: 15px; font-weight: 300; color: var(--ink); }
.cap .mono { white-space: nowrap; }

.series { margin-top: var(--section); }
.series > .mono { margin-bottom: 28px; }
.series-grid { display: grid; grid-template-columns: 1fr; gap: 48px 32px; }
.series-card { display: block; border-top: 1px solid var(--ink); padding-top: 20px; }
.series-head { display: flex; justify-content: space-between; align-items: baseline; }
.series-name { font-size: 32px; font-weight: 200; letter-spacing: -0.02em; }
.series-cover { display: block; margin-top: 16px; aspect-ratio: 3 / 2; background: var(--panel); overflow: hidden; }
.series-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.series-card:hover .series-cover img { transform: scale(1.03); }
.series-desc { display: block; margin-top: 16px; font-size: 14px; line-height: 1.75; color: var(--muted); }

.statement { margin-top: var(--section); }
.statement > .grid { padding-top: 28px; }
.statement-side .about { margin-top: 20px; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.headline { font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; font-weight: 200; color: var(--ink); }
.cols { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
.cols p { font-size: 15px; line-height: 1.95; color: var(--ink-2); }
.horizon { margin: 100px 0 0; }
.horizon img { width: 100%; }
.horizon figcaption { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.horizon figcaption .mono { white-space: nowrap; flex-shrink: 0; }
.horizon-line { font-size: 22px; line-height: 1.4; font-weight: 200; letter-spacing: -0.01em; }
.horizon.no-image figcaption { margin-top: 0; }
.dream-row { margin-top: 100px; align-items: start; }
.dream-art figcaption { margin-top: 14px; }
.dream-text .quote { margin-top: 28px; font-size: 26px; line-height: 1.3; letter-spacing: -0.015em; font-weight: 300; }
.dream-text .mono { margin-top: 24px; }

/* ---------- 작품 목록 ---------- */
.works-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 40px; padding-bottom: 32px; }
.works-head .right { text-align: left; }
.display { font-size: 68px; line-height: 0.95; letter-spacing: -0.045em; font-weight: 200; }
.filters { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 8px; }
.filter-list { display: flex; flex-wrap: wrap; gap: 0 20px; }
.filter-list a, .sort { min-height: 44px; display: inline-flex; align-items: center; }
.filter-list a { font-size: 15px; color: var(--muted); position: relative; }
.filter-list a.is-active { color: var(--ink); }
.filter-list a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: var(--ink); }
.sort { color: var(--ink); }
.works-list { padding-top: 72px; display: flex; flex-direction: column; gap: 96px; }
.empty { color: var(--muted); padding: 40px 0 80px; }
.row-landscape .work-l { display: block; max-width: 980px; margin: 0 auto; }
.work-l img { width: 100%; }
.work-l .cap { flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 18px; }
.cap-title.big { font-size: 24px; font-weight: 200; letter-spacing: -0.015em; }
.row-portrait { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 16px; }
.row-portrait.n1 { grid-template-columns: minmax(0, 72%); justify-content: center; }
.row-portrait.n3 .work-p:last-child { grid-column: 1 / -1; width: 50%; margin: 0 auto; }
.work-p { display: flex; flex-direction: column; min-width: 0; }
.work-p-img { display: block; width: 100%; }
.work-p-img img { width: 100%; height: 100%; object-fit: cover; }
.work-p .cap { flex-direction: column; align-items: flex-start; gap: 2px; }

/* ---------- 작품 상세 ---------- */
.back { padding-top: 8px; }
.back a { display: inline-flex; align-items: center; min-height: 44px; }
.viewer { margin-top: 8px; padding-left: 0; padding-right: 0; }
.panel { background: var(--panel); padding: 40px var(--gutter); display: flex; justify-content: center; align-items: center; }
.zoom-open { border: 0; padding: 0; background: none; cursor: zoom-in; display: block; max-width: 100%; }
.main-art { max-height: 72vh; width: auto; max-width: 100%; margin: 0 auto; }
.hint { text-align: right; margin-top: 12px; padding: 0 var(--gutter); }
.hint-fine { display: none; }
@media (hover: hover) and (pointer: fine) { .hint-fine { display: inline; } .hint-touch { display: none; } }
.thumbs { display: flex; gap: 10px; padding: 16px var(--gutter) 0; overflow-x: auto; }
.thumb { flex: 0 0 auto; width: 64px; height: 64px; padding: 0; border: 1px solid transparent; background: var(--panel); cursor: pointer; opacity: .65; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--ink); opacity: 1; }

.info { margin-top: 40px; display: grid; grid-template-columns: 1fr; grid-template-areas: 'head' 'meta' 'desc'; gap: 0; }
.info-head { grid-area: head; }
.info-head .no { color: var(--ink-2); }
.work-title { font-size: 44px; line-height: 1.05; letter-spacing: -0.035em; font-weight: 200; margin-top: 4px; }
.meta { grid-area: meta; margin: 24px 0 0; border-top: 1px solid var(--ink); padding-top: 16px; }
.meta-row { display: grid; grid-template-columns: 84px 1fr; align-items: baseline; padding: 6px 0; }
.meta-row[data-desktop] { display: none; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; font-size: 16px; color: var(--ink); }
.meta dd a { border-bottom: 1px solid var(--line); position: relative; }
.meta dd a::before { content: ''; position: absolute; inset: -12px -8px; } /* 터치 영역 44px 확보 */
.mono-val { font-family: var(--mono); font-size: 13px; }
.desc { grid-area: desc; margin-top: 28px; }
.desc p { font-size: 17px; line-height: 1.85; color: var(--ink-2); }
.desc p + p { margin-top: 16px; }

.rooms-sec { margin-top: 100px; }
.rooms-sec > .grid { padding-top: 24px; }
.rooms-text { font-size: 18px; line-height: 1.5; color: var(--ink); }
.rooms { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 32px; }
.room { margin: 0; display: none; }
.room.is-active { display: block; }
.room img { width: 100%; background: var(--panel); }
.room figcaption { margin-top: 12px; }
.room-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.room-tabs button { min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--muted); color: var(--ink); font-size: 14px; cursor: pointer; }
.room-tabs button[aria-selected='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.prevnext { margin-top: 100px; display: flex; justify-content: space-between; gap: 24px; }
.prevnext::before { content: none; }
.prevnext { padding-top: 20px; background: linear-gradient(var(--ink), var(--ink)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.pn { display: flex; flex-direction: column; gap: 6px; min-height: 44px; max-width: 48%; }
.pn-next { text-align: right; align-items: flex-end; margin-left: auto; }
.pn-title { font-size: 20px; font-weight: 200; letter-spacing: -0.01em; color: var(--ink); }
.pn-no { display: none; }

.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(31, 30, 28, 0.96);
  touch-action: none; overscroll-behavior: contain;
}
.lightbox[hidden] { display: none; }
.lb-stage { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: grab; }
.lb-img { max-width: 100vw; max-height: 100vh; width: auto; height: auto; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; will-change: transform; }
.lb-close {
  position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 2;
  min-height: 44px; min-width: 44px; padding: 0 16px; border: 1px solid rgba(217, 214, 208, 0.4);
  background: rgba(31, 30, 28, 0.6); color: var(--bg); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.lb-lock { overflow: hidden; }

/* ---------- 404 ---------- */
.notfound { padding-top: 60px; padding-bottom: 60px; }
.notfound p { margin-top: 24px; color: var(--ink-2); }

/* ---------- 하단 ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  margin-top: var(--section); padding-bottom: 48px; font-size: 13px; color: var(--muted);
}
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; }

/* ================= 태블릿 이상 ================= */
@media (min-width: 640px) {
  .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row-portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .row-portrait.n1 { grid-template-columns: minmax(0, 46%); }
  .row-portrait.n2 { grid-template-columns: repeat(2, minmax(0, 36%)); justify-content: center; }
  .row-portrait.n3 .work-p:last-child { grid-column: auto; width: auto; margin: 0; }
  .cols { grid-template-columns: 1fr 1fr; gap: 48px; }
  .strip-img { height: 360px; }
  .strip-item { max-width: 86vw; }
}

/* ================= PC ================= */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 40px; }

  .site-header { height: 110px; }
  .menu-btn { display: none; }
  .site-nav { display: flex !important; position: static; flex-direction: row; align-items: center; gap: 36px; padding: 0; border: 0; background: none; }
  .site-nav > a { font-size: 15px; font-weight: 300; padding: 0; color: var(--ink-2); position: relative; display: inline-flex; align-items: center; }
  .site-nav > a:hover, .site-nav > a.is-active { color: var(--ink); }
  .site-nav > a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--ink); }
  .lang-switch { margin: 0 0 0 4px; font-size: 13px; gap: 2px; }
  .lang-switch a { min-width: 32px; }

  .hero { padding-top: 46px; align-items: end; }
  .hero-title { font-size: clamp(110px, 10.5vw, 150px); }
  .hero-art { justify-self: end; width: fit-content; max-width: 100%; }
  .hero-art img { max-height: min(64vh, 600px); width: auto; max-width: 100%; }
  .hero-empty { display: block; min-height: 320px; }
  .hero-art figcaption { width: 0; min-width: 100%; }

  .intro { margin-top: 56px; padding-top: 28px; }
  .lead { font-size: 28px; line-height: 1.45; letter-spacing: -0.01em; }
  .intro-text .body { margin-top: 24px; }

  .strip { gap: 28px; }
  .strip-img { height: 420px; }

  .series-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .headline { font-size: clamp(40px, 4vw, 56px); line-height: 1.12; }
  .cols { margin-top: 64px; }
  .horizon { margin-top: 120px; }
  .horizon img { aspect-ratio: 1345 / 520; object-fit: cover; }
  .horizon figcaption { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 32px; }
  .horizon-line { font-size: 28px; }
  .dream-row { margin-top: 140px; }
  .dream-text { padding-top: 8px; max-width: 840px; }
  .dream-text .quote { font-size: clamp(30px, 2.7vw, 38px); font-weight: 200; }
  .lang-ko .dream-text .quote { font-weight: 300; }

  .works-head { flex-direction: row; justify-content: space-between; align-items: flex-end; padding-top: 64px; padding-bottom: 56px; }
  .works-head .right { text-align: right; }
  .display { font-size: clamp(96px, 8.4vw, 124px); }
  .filters { padding-top: 12px; }
  .works-list { padding-top: 110px; gap: 160px; }
  .work-l .cap { flex-direction: row; justify-content: space-between; align-items: baseline; margin-top: 22px; }
  .cap-title.big { font-size: 28px; }
  .row-portrait, .row-portrait.n1, .row-portrait.n2 { display: flex; justify-content: center; gap: 64px; }
  .work-p-img { height: 420px; width: auto; }
  .work-p .cap { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 16px; }

  .viewer { padding-left: var(--gutter); padding-right: var(--gutter); }
  .panel { padding: 80px; }
  .main-art { max-height: min(78vh, 900px); }
  .hint { padding: 0; }
  .thumbs { padding: 16px 0 0; }

  .info {
    margin-top: 100px;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    grid-template-areas: 'meta head' 'meta desc';
    grid-template-rows: auto 1fr;
    column-gap: 72px;
  }
  .info-head .no { display: none; }
  .meta { margin-top: 0; padding-top: 20px; align-self: start; }
  .meta-row { grid-template-columns: 96px 1fr; padding: 7px 0; }
  .meta-row[data-desktop] { display: grid; }
  .work-title { font-size: clamp(56px, 5vw, 76px); margin-top: 0; }
  .desc { margin-top: 32px; max-width: 680px; }

  .rooms-sec { margin-top: var(--section); }
  .rooms-text { font-size: 24px; }
  .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; }
  .room { display: block; }
  .room-tabs { display: none; }

  .prevnext { margin-top: var(--section); padding-top: 24px; }
  .pn-title { font-size: 26px; }
  .pn-label { display: none; }
  .pn-no { display: inline; }
}
