@font-face {
  font-family: "Metropolis";
  src: url("fonts/Metropolis-Regular.otf") format("opentype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter_18pt-Regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}

:root {
  --bg: #ffffff;
  --ink: #111111;
  --mute: #9b9b9b;
  --faint: #d4d4d4;
  --tile: #f3f3f3;
  --accent: #ff3d00;
  --ease: cubic-bezier(0.77, 0, 0.18, 1);
  --pad: 20px;
  --f-title: "Metropolis", "Helvetica Neue", Arial, sans-serif;
  --f-text: "Inter", "Helvetica Neue", Arial, "Apple SD Gothic Neo", sans-serif;
  font-family: var(--f-text);
}
:root[data-theme="black"] {
  --bg: #0e0e0e;
  --ink: #f2f2f2;
  --mute: #8a8a8a;
  --faint: #3a3a3a;
  --tile: #1a1a1a;
  --accent: #f44c8a;   /* 블랙 배경 포인트 = 핑크 */
}
/* 블랙 배경: 글씨는 흰색, 호버·선택은 핑크 */
:root[data-theme="black"] .row,
:root[data-theme="black"] .sec,
:root[data-theme="black"] .sec .no { color: var(--ink); }
:root[data-theme="black"] .list.is-focus .row,
:root[data-theme="black"] .sections.is-focus .sec,
:root[data-theme="black"] .sections.is-focus .sec .no { color: #4a4a4a; }
:root[data-theme="black"] .list .row.is-active,
:root[data-theme="black"] .sections .sec.is-active,
:root[data-theme="black"] .sections .sec.is-active .no { color: var(--accent); }
:root[data-theme="black"] a:hover { color: var(--accent); }
body { transition: background-color .5s ease, color .5s ease; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); height: 100%; }
body { -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
img { display: block; user-select: none; -webkit-user-drag: none; }

/* ---------- cursor ---------- */
.has-cursor, .has-cursor * { cursor: none !important; }
#cursor {
  position: fixed; left: 0; top: 0; z-index: 1000;
  pointer-events: none; opacity: 0;
  transition: opacity .2s;
}
#cursor.is-visible { opacity: 1; }
#cursor::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink); border: 1px solid var(--ink);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), background-color .3s;
}
#cursor.is-hover::before { width: 34px; height: 34px; background: transparent; }
#cursor.is-down::before { width: 7px; height: 7px; }
#cursor.is-hover.is-down::before { width: 26px; height: 26px; }
.cursor-label {
  position: absolute; left: 14px; top: -7px;
  font-size: 11px; letter-spacing: .02em; white-space: nowrap;
}

/* ---------- shared header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px var(--pad); font-size: 13px;
}
.top nav { display: flex; gap: 14px; }
.top a:hover { color: var(--accent); }

/* =========================================================
   LANDING
   ========================================================= */
.modes {
  /* 상단 헤더 줄 오른쪽 — "Lab"과 같은 높이에 맞춤 */
  position: fixed; top: 11px; right: calc(var(--pad) - 8px); z-index: 25;
  display: flex; gap: 4px;
}
/* 재질 그룹 동그라미 */
.modes button {
  position: relative; width: 26px; height: 26px;
}
.modes svg {
  position: absolute; left: 50%; top: 50%;
  width: 10px; height: 10px; overflow: visible;
  transform: translate(-50%, -50%);
  fill: transparent; stroke: var(--ink); stroke-width: 0.8px;
  vector-effect: non-scaling-stroke;
  transition: fill .3s, transform .3s var(--ease);
}
.modes svg * { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.modes button:hover svg { transform: translate(-50%, -50%) scale(1.2); }
.modes button.is-active svg { fill: var(--ink); }

.landing { --list-w: clamp(220px, 24vw, 360px); }

.list {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--list-w);
  display: flex; flex-direction: column; justify-content: center;
  padding: 70px var(--pad) 50px; z-index: 10;
}
.row {
  display: grid; grid-template-columns: 2.2em 1fr auto;
  align-items: baseline; gap: 10px;
  padding: 4px 0; line-height: 1.2;
  font-size: clamp(12px, 1vw, 15px);
  color: var(--mute);
  transition: color .35s, opacity .35s;
}
/* Metropolis — 자간 표준, 살짝 두껍게(얇은 외곽선으로 굵기 보정) */
.row .title {
  font-family: var(--f-title); font-weight: 400; letter-spacing: 0;
  -webkit-text-stroke: 0.35px currentColor;
}
.row .num, .row .cat { font-family: var(--f-text); font-size: 0.6em; font-weight: 400; }
.row .cat { white-space: nowrap; }
.list.is-focus .row { color: var(--faint); }
.list .row.is-off { opacity: .28; }
.list .row.is-active { color: var(--accent); opacity: 1; }

.stage {
  position: fixed; top: 80px; right: 0; bottom: 40px; left: var(--list-w);
  overflow: visible;
}
.card {
  position: absolute; left: 50%; top: 50%;
  width: var(--cw); height: calc(var(--cw) * 4 / 3);
  margin: calc(var(--cw) * -2 / 3) 0 0 calc(var(--cw) / -2);
  transform-origin: 50% 50%;
  transition:
    transform .9s var(--ease),
    opacity .5s ease,
    filter .5s ease;
  will-change: transform;
}
.card img {
  width: 100%; height: 100%; object-fit: cover;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.04);
}
.stage.is-focus .card { opacity: .18; }
.stage.is-focus .card.is-active { opacity: 1; }
.stage[data-mode="b"] .card img,
.stage[data-mode="c"] .card img { box-shadow: 0 2px 18px rgba(0,0,0,.06); }

/* 우하단 정사각형 — 다음 배경색을 미리 보여줌 */
.theme-toggle {
  position: fixed; right: var(--pad); bottom: 18px; z-index: 30;
  width: 12px; height: 11px; padding: 0;
  color: var(--ink);
  transition: color .4s, transform .3s var(--ease);
}
/* 꽉 채운 하트 (테마에 따라 검정/흰색) */
.theme-toggle svg {
  display: block; width: 100%; height: 100%; overflow: visible;
  fill: currentColor; stroke: currentColor; stroke-width: 0.8px; stroke-linejoin: round;
}
.theme-toggle svg path { vector-effect: non-scaling-stroke; }
.theme-toggle:hover { transform: scale(1.25); }

.landing-foot {
  position: fixed; left: var(--pad); bottom: 16px; z-index: 20; /* 왼쪽 끝 = "Lab" 열 */
  font-size: 11px; color: var(--mute); text-align: left; line-height: 1.5;
}

/* page transition */
.fade-out { opacity: 0; transition: opacity .4s ease; }
body { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; } }

@media (max-width: 760px) {
  body.landing { overflow-y: auto; }
  .landing { --list-w: 0px; }
  .stage { position: relative; left: 0; top: auto; bottom: auto; height: 74svh; margin-top: 56px; }
  .list { position: relative; width: 100%; padding: 8px var(--pad) 70px; }
  .row { font-size: 12px; padding: 3px 0; gap: 8px; }
  .row .num, .row .cat { font-size: 9px; }
  .landing-foot { position: relative; left: auto; right: auto; bottom: auto; padding: 0 var(--pad) 24px; text-align: left; }
}

/* =========================================================
   PROJECT DETAIL
   ========================================================= */
.viewport {
  position: fixed; inset: 0; overflow: hidden;
}
.track {
  display: flex; height: 100%;
  transition: transform 1s var(--ease);
}
.slide {
  flex: 0 0 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(12px, 2vw, 32px);
  padding: 64px var(--pad) 64px;
}
.slide figure {
  --h: min(calc(100svh - 128px), calc((100vw - 2 * var(--pad) - 2vw) / 2 * 4 / 3));
  height: var(--h); width: calc(var(--h) * 3 / 4);
  background: var(--tile);
}
.slide img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s ease;
}
.slide img.is-loaded { opacity: 1; }

.hit { position: fixed; top: 50px; bottom: 50px; width: 50%; z-index: 5; }
.hit.prev { left: 0; }
.hit.next { right: 0; }

.foot {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 var(--pad) 14px; font-size: 11px; line-height: 1.5;
}
.foot .sub { color: var(--mute); }
.foot .right { text-align: right; margin-right: 24px; } /* 우하단 하트 자리 */
.foot .desc {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  width: min(420px, 40vw); text-align: center; color: var(--mute);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.foot .desc:empty { display: none; }
.slide figure.empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--mute); font-size: 11px;
}
@media (max-width: 760px) {
  .foot { flex-wrap: wrap; row-gap: 6px; }
  .foot .desc { position: static; transform: none; order: -1; width: 100%; text-align: left; }
}
.top .title { font-family: var(--f-title); -webkit-text-stroke: 0.3px currentColor; }
.top .title { position: absolute; left: 50%; transform: translateX(-50%); }
.swap { display: inline-block; transition: opacity .35s ease, transform .35s ease; }
.swap.is-out { opacity: 0; transform: translateY(4px); }

@media (max-width: 760px) {
  .slide { gap: 8px; padding: 56px 12px; }
  .slide figure { --h: min(calc(100svh - 112px), calc((100vw - 32px) / 2 * 4 / 3)); }
  .top .title { display: none; }
}

/* =========================================================
   SCROLL LAYOUTS — Atelier (feed) · Nest (free)
   ========================================================= */
body.is-scroll { overflow: visible; height: auto; }
.feed {
  display: flex; flex-direction: column; align-items: center;
  gap: 64px; padding: 110px var(--pad) 140px;
}
.feed .block, .feed-intro { width: min(30vw, 460px); }
.b-img { background: var(--tile); overflow: hidden; }
.b-img img {
  width: 100%; height: auto;
  opacity: 0; filter: blur(14px); transform: scale(1.02);
  transition: opacity .8s ease, filter 1s ease, transform 1s ease;
}
.b-img.is-crop img { height: 100%; object-fit: cover; }
.b-img img.is-loaded { opacity: 1; filter: none; transform: none; }
.b-meta { display: flex; gap: 10px; margin-top: 10px; font-size: 11px; }
.b-no { min-width: 1.6em; }
.b-date { color: var(--mute); }
.b-text { margin-top: 8px; font-size: 11px; line-height: 1.5; }
.feed-intro .b-meta { margin-top: 0; }
.feed-intro .b-name { font-family: var(--f-title); -webkit-text-stroke: .3px currentColor; }
.feed-empty { color: var(--mute); font-size: 11px; padding: 30vh 0; }

/* free — 이미지마다 크기·정렬 */
.feed.is-free { align-items: stretch; }
.feed.is-free .feed-intro { align-self: center; }
.feed.is-free .block.w-s { width: 24vw; }
.feed.is-free .block.w-m { width: 38vw; }
.feed.is-free .block.w-l { width: 58vw; }
.feed.is-free .block.w-full { width: 100%; }
.feed.is-free .block.a-left { align-self: flex-start; }
.feed.is-free .block.a-center { align-self: center; }
.feed.is-free .block.a-right { align-self: flex-end; }

.feed-foot { align-items: flex-end; }
.feed-foot .right { margin-left: auto; }  /* 좌측 하단 문구는 Lab에서만 */
.feed-foot .clock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; color: var(--mute); }
.feed-foot .right { color: var(--ink); }

@media (max-width: 760px) {
  .feed { gap: 48px; padding: 80px 16px 110px; }
  .feed .block, .feed-intro { width: 78vw; }
  .feed.is-free .block.w-s { width: 46vw; }
  .feed.is-free .block.w-m { width: 68vw; }
  .feed.is-free .block.w-l { width: 86vw; }
  .feed-foot .clock { display: none; }
}

/* Lab 랜딩 상단: uoyemj / Lab */
.crumbs .to-home { color: var(--mute); }
.crumbs .to-home:hover { color: var(--accent); }
.crumbs .sep { color: var(--faint); margin: 0 6px; }

/* =========================================================
   HOME — 간판 페이지 (Atelier / Lab / Nest)
   ========================================================= */
body.home { overflow: hidden; }
.sections {
  position: fixed; left: var(--pad); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px; z-index: 10;
}
.sec {
  display: grid; grid-template-columns: 2.6em auto; align-items: baseline; column-gap: 10px;
  color: var(--ink); transition: color .4s, opacity .4s;
}
.sec .no { font-size: 11px; color: var(--mute); }
.sec .label {
  font-family: var(--f-title); font-size: clamp(34px, 4.6vw, 68px); line-height: 1.12;
  -webkit-text-stroke: .4px currentColor; letter-spacing: 0;
}
.sec .desc {
  grid-column: 2; font-size: 11px; color: var(--mute);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .5s var(--ease), opacity .4s, margin .5s var(--ease);
}
.sections.is-focus .sec { color: var(--faint); }
.sections.is-focus .sec .no { color: var(--faint); }
.sections .sec.is-active { color: var(--accent); }
.sections .sec.is-active .no { color: var(--accent); }
.sec.is-active .desc { max-height: 3em; opacity: 1; margin: 2px 0 10px; }

.covers {
  position: fixed; top: 80px; bottom: 60px; right: var(--pad); left: 46vw;
  pointer-events: none;
}
.cover {
  position: absolute; inset: 0; margin: auto;
  height: min(100%, 64vw); aspect-ratio: 3 / 4; max-width: 100%;
  background: var(--tile) center / cover no-repeat;
  opacity: 0; transform: translateY(14px) scale(.985);
  transition: opacity .6s ease, transform .9s var(--ease);
}
.cover.is-on { opacity: 1; transform: none; }
.home-foot {
  position: fixed; left: var(--pad); bottom: 16px; font-size: 11px; color: var(--mute);
}
@media (max-width: 760px) {
  .covers { display: none; }
  .sec .label { font-size: 40px; }
  .sec .desc { max-height: 3em; opacity: 1; }
}
.sec .desc:empty { display: none; }

/* ---- 섹션/프로젝트 인트로: 제목 · 부제 · 본문 · 하위 프로젝트 */
.feed-intro .f-title {
  font-family: var(--f-title); font-weight: 400; font-size: 15px; -webkit-text-stroke: .3px currentColor;
}
.feed-intro .f-sub { margin-top: 4px; font-size: 11px; color: var(--mute); }
.feed-intro .f-body { margin-top: 10px; }
.b-children { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 14px; font-size: 11px; }
.b-children a { border-bottom: 1px solid var(--faint); padding-bottom: 1px; }
.b-children a:hover { color: var(--accent); border-color: currentColor; }

/* ---- 그리드 열 수 (1–4) */
.feed.is-grid {
  display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  align-items: start; column-gap: 24px; row-gap: 56px;
  margin: 0 auto; padding-left: 0; padding-right: 0;
}
.feed.is-grid.cols-2 { width: min(54vw, 100% - 32px); }
.feed.is-grid.cols-3 { width: min(74vw, 100% - 32px); }
.feed.is-grid.cols-4 { width: min(90vw, 100% - 32px); }
.feed.is-free.is-grid { width: calc(100% - 2 * var(--pad)); }
.feed.is-grid .feed-intro { grid-column: 1 / -1; width: min(30vw, 460px); justify-self: center; }
.feed.is-grid .block { width: auto !important; align-self: start; }
.feed.is-free.is-grid .block { justify-self: stretch; }
@media (max-width: 760px) {
  .feed.is-grid { grid-template-columns: repeat(min(var(--cols), 2), minmax(0, 1fr)); width: calc(100% - 32px) !important; column-gap: 12px; row-gap: 36px; }
  .feed.is-grid .feed-intro { width: 100%; }
  .feed.is-free.is-grid .block { grid-column: auto !important; }
}

/* ---- 빌더 미리보기에서 바로 수정 */
.is-editing [data-edit] {
  cursor: text; outline: 1px dashed transparent; outline-offset: 3px; border-radius: 1px;
  transition: outline-color .2s; min-width: 1.5em; display: inline-block;
}
.is-editing p[data-edit], .is-editing div[data-edit], .is-editing h1[data-edit] { display: block; }
.is-editing [data-edit]:hover { outline-color: var(--faint); }
.is-editing [data-edit]:focus { outline: 1px solid var(--accent); }
.is-editing [data-edit].is-empty::before { content: attr(data-ph); color: #c4c4c4; pointer-events: none; }
:root[data-theme="black"] .is-editing [data-edit].is-empty::before { color: #555; }

/* ---- 섹션 페이지 상단: uoyemj / Atelier (레퍼런스처럼) */
.crumbs .c-link { color: var(--mute); }
.crumbs .c-link:hover { color: var(--accent); }
.crumbs .c-current { color: var(--ink); }
.feed-intro .f-sub { margin-top: 0; }
/* KO / EN */
.lang { display: inline-flex; gap: 8px; margin-left: 6px; }
.lang a { color: var(--mute); }
.lang a.is-on { color: var(--ink); }
.lang a:hover { color: var(--accent); }
/* 프로젝트 배경색이 지정되면 하트(테마 전환) 숨김 */
body.has-bg .theme-toggle { display: none; }
body.has-bg { background: var(--bg); color: var(--ink); }

/* 간판: 여러 장이면 작은 이미지 그리드 (Lab 랜딩처럼) */
.cover.grid {
  inset: auto; top: 50%; left: 50%; margin: 0;
  width: min(100%, 62vh); height: auto; aspect-ratio: auto; max-width: none;
  background: none; transform: translate(-50%, -50%);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 3.4vh 2.6vh;
  opacity: 1; pointer-events: none;
}
.cover.grid i {
  display: block; aspect-ratio: 3 / 4; background: var(--tile) center / cover no-repeat;
  opacity: 0; transform: translateY(10px) scale(.94);
  transition: opacity .45s ease, transform .7s var(--ease);
  transition-delay: calc(var(--k) * 35ms);
}
.cover.grid.is-on { transform: translate(-50%, -50%); }
.cover.grid.is-on i { opacity: 1; transform: none; }

/* Lab 상세: 제조 공정 키워드 */
.foot .process {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 50vw;
  transition: opacity .35s ease;
}
.foot .process.is-out { opacity: 0; }
.foot .process span {
  font-size: 11px; line-height: 1; padding: 5px 10px 5px;
  border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); white-space: nowrap;
}
@media (max-width: 760px) {
  .foot .process { position: static; transform: none; order: -1; width: 100%; max-width: none; justify-content: flex-start; }
}

/* 섹션 오른쪽 위 그룹 동그라미 (Atelier: Core · Piece) — Lab 재질 동그라미와 같은 모양 */
.groups { display: inline-flex; gap: 4px; margin-right: -8px; vertical-align: middle; }
.groups button { position: relative; width: 26px; height: 26px; }
.groups svg {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; overflow: visible;
  transform: translate(-50%, -50%);
  fill: transparent; stroke: var(--ink); stroke-width: .8px;
  transition: fill .3s, transform .3s var(--ease);
}
.groups svg circle { vector-effect: non-scaling-stroke; }
.groups button:hover svg { transform: translate(-50%, -50%) scale(1.2); }
.groups button.is-on svg { fill: var(--ink); }
.top nav .lang:empty { display: none; }
.top nav .groups + .lang, .group-slot:not(:empty) + .lang-slot .lang { margin-left: 14px; }

/* 하위 프로젝트 카드 */
.pcard a { display: block; }
.pcard .b-img { position: relative; }
.card-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--mute);
}
.pcard a:hover .b-name { color: var(--accent); }
.pcard { transition: opacity .4s ease; }
.pcard.is-off { display: none; }

/* Lab 상세: 제품명 오른쪽 위 */
.top .title.title-right { position: static; transform: none; margin-left: auto; text-align: right; }
@media (max-width: 760px) { .top .title.title-right { display: inline-block; } }

/* 영상 (웹 최적화 mp4) — 사진과 같은 자리, 같은 등장 효과 */
.b-img video, .slide video {
  display: block; width: 100%; height: auto; background: var(--tile);
  opacity: 0; filter: blur(14px); transform: scale(1.02);
  transition: opacity .8s ease, filter 1s ease, transform 1s ease;
}
.b-img.is-crop video, .slide video { height: 100%; object-fit: cover; }
.b-img video.is-loaded, .slide video.is-loaded { opacity: 1; filter: none; transform: none; }




/* =========================================================
   BLOCKS — Atelier 프로젝트 (HERO · PHOTOS 블록을 위에서부터 쌓음)
   ========================================================= */
.blocks { display: flex; flex-direction: column; gap: 12px; padding: 64px 0 18vh; }
.blk { display: grid; gap: 12px; grid-template-columns: repeat(var(--c, 1), minmax(0, 1fr)); align-items: start; }
.blk.c-1 { --c: 1; } .blk.c-2 { --c: 2; } .blk.c-3 { --c: 3; }
.blk.s-full { padding: 0 var(--pad); }
.blk.s-centered { width: min(980px, 72vw); margin: 0 auto; }
.blk.s-centered.c-1 { width: min(720px, 56vw); }
.blk-hero.s-full { padding: 0; }                       /* hero full = 가장자리까지 */
.blk-hero.s-full .b-img { max-height: 100svh; }
.blocks .b-img { position: relative; overflow: hidden; background: var(--tile); margin: 0; }
.blocks .b-img img, .blocks .b-img video { display: block; width: 100%; height: auto; }
.blocks .b-img.is-crop img, .blocks .b-img.is-crop video { height: 100%; object-fit: cover; }
.blocks .feed-empty { padding: 40vh 0; text-align: center; color: var(--mute); font-size: 11px; }

/* Read the project — 오른쪽에서 열리는 패널 */
.read-toggle, .music-toggle { margin-left: 14px; }
.music-toggle { color: var(--ink); }
.read-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); z-index: 40;
  background: var(--bg); border-left: 1px solid var(--faint);
  padding: 64px 28px 40px; overflow-y: auto;
  transform: translateX(100%); transition: transform .6s var(--ease);
}
.is-reading .read-panel { transform: none; }
.rp-close { position: absolute; top: 14px; right: 18px; font-size: 20px; line-height: 1; }
.rp-title { font-family: var(--f-title); font-size: 15px; -webkit-text-stroke: .3px currentColor; }
.rp-sub { margin-top: 4px; font-size: 11px; color: var(--mute); }
.rp-body p { margin-top: 14px; font-size: 12px; line-height: 1.65; }
.yt-holder { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; bottom: 0; left: 0; }

@media (max-width: 760px) {
  .blocks { gap: 8px; padding-top: 56px; }
  .blk { gap: 8px; }
  .blk.c-3 { --c: 1; }
  .blk.s-full { padding: 0 12px; }
  .blk.s-centered, .blk.s-centered.c-1 { width: calc(100% - 48px); }
}

/* =========================================================
   PAGE 블록 — 잡지·프레젠테이션 페이지 (비율 고정, 글자·여백이 페이지 폭에 비례)
   ========================================================= */
.blocks .pg {
  position: relative; display: block; width: calc(100% - 2 * var(--pad)); margin: 0 auto;
  aspect-ratio: var(--r, 1.7778); container-type: inline-size; overflow: hidden;
  background: var(--pbg, #fff); color: var(--pink, #151515);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.blocks:has(.pg) { gap: 1.4vw; background: var(--bg); }
.pg-head { position: absolute; left: 2.6cqw; top: 2.4cqw; width: 44cqw; z-index: 3; }
.pg-title { font-family: var(--f-title); font-size: 1.5cqw; line-height: 1.15; letter-spacing: .01em; text-transform: uppercase; -webkit-text-stroke: .02cqw currentColor; }
.pg-text { margin-top: .8cqw; font-size: .62cqw; line-height: 1.5; max-width: 40cqw; opacity: .85; }
.pg-foot {
  position: absolute; left: 2.6cqw; right: 2.6cqw; bottom: 1.5cqw; z-index: 3;
  display: flex; justify-content: space-between; font-size: .5cqw; letter-spacing: .08em; text-transform: uppercase; opacity: .8;
}
.pg-media { position: absolute; left: 2.6cqw; right: 2.6cqw; top: 9cqw; bottom: 4.2cqw; display: flex; gap: .8cqw; align-items: stretch; }
.pg-media > .b-img { position: relative; margin: 0; flex: 1 1 0; min-width: 0; height: 100%; overflow: hidden; background: rgba(127,127,127,.08); aspect-ratio: auto !important; }
.pg-media > .b-img img, .pg-media > .b-img video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 표지: 사진 위에 큰 제목이 왼쪽 아래 */
.pg.t-cover .pg-media, .pg.t-full .pg-media { inset: 0; gap: 0; }
.pg.t-cover .pg-head { top: auto; bottom: 5cqw; }
.pg.t-cover .pg-title { font-size: 3.4cqw; }
.pg.t-cover .pg-text { font-size: .7cqw; }
.pg.t-full .pg-head { color: inherit; }
/* 가로 띠: 사진들이 아래쪽에 한 줄로 */
.pg.t-strip .pg-media { top: auto; height: 40%; bottom: 5cqw; }
/* 글 왼쪽 · 사진 오른쪽 */
.pg.t-text-left .pg-media { left: 50%; top: 2.4cqw; }
/* 글 왼쪽 · 오른쪽 그리드 */
.pg.t-text-grid .pg-media { left: 50%; top: 2.4cqw; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.pg.t-text-grid .pg-media.n-1 { grid-template-columns: 1fr; }
.pg.t-text-grid .pg-media.n-3 .b-img:first-child { grid-row: span 2; }
/* 큰 사진 + 좁은 사진들 */
.pg.t-big-small .pg-media .b-img:first-child { flex: 4 1 0; }
/* 작은 사진 여러 장 + 마지막 한 장 크게 */
.pg.t-detail .pg-media { top: 7.5cqw; bottom: 9cqw; }
.pg.t-detail .pg-media .b-img:last-child { flex: 2.6 1 0; }
/* 겹친 콜라주 */
.pg.t-collage .pg-media { display: block; inset: 0; }
.pg.t-collage .cl { position: absolute; }
.pg.t-collage .cl .b-img { margin: 0; width: 100%; overflow: hidden; box-shadow: 0 .4cqw 1.2cqw rgba(0,0,0,.12); }
.pg.t-collage .cl .b-img img, .pg.t-collage .cl .b-img video { width: 100%; height: auto; display: block; }
.pg.t-collage .cl .b-img.is-crop img, .pg.t-collage .cl .b-img.is-crop video { height: 100%; object-fit: cover; }
.pg .feed-empty { display: none; }

@media (max-width: 760px) {
  .blocks .pg { width: calc(100% - 24px); }
}
