/* Colors from tokens.css — do not re-lock light --paper/--ink (theme residual). */
:root {
  --page: min(100%, 1600px);
  /* 2026-09-01: 3.8vw → tokens.css --canon-inset(소비자 정본 index 3.6vw)
     참조. 값 복제 근절 — story 템플릿(스토리 23편 공용)의 단일 소스. */
  --pad: var(--canon-inset, clamp(18px, 3.6vw, 58px));
  /* 2026-09-21 사용자 「글 배치 정렬이 왜 안되」: 읽기 글줄 폭의 단일 소스.
     그전에는 칸이 1120, 글줄이 760 이라 글줄이 칸 왼쪽에 붙어 오른쪽 257px 이
     비었고 글줄 중심이 지면 중심에서 129px 어긋났다(1440 실측). 칸을 글줄에
     맞춘다 — 760 을 여기 한 곳에만 적고 칸·구분선·인용 레일이 전부 이 값을 읽는다. */
  --measure: 760px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: -80px;
  left: 18px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
}
.skip-link:focus { top: 18px; }

.story-header {
  position: static;
  z-index: 30;
  top: auto;
  display: flex;
  width: var(--page);
  margin-inline: auto;
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  backdrop-filter: none; /* chrome-lock when under journal-global */
}

.story-wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 900; letter-spacing: -.02em; }
.story-wordmark img { width: 24px; height: 24px; }
.story-header nav { display: flex; gap: 22px; align-items: center; font: 10px/1.2 ui-monospace, monospace; letter-spacing: .08em; }
.story-header nav a[aria-current="page"] { border-bottom: 2px solid var(--ink); }
.story-header button { padding: 0; border: 0; background: transparent; }

main,
.story-footer { width: var(--page); margin-inline: auto; }

.article-hero {
  display: grid;
  grid-template-columns: minmax(420px, .9fr) minmax(0, 1.1fr);
  min-height: min(850px, calc(100vh - 59px));
  border-bottom: 1px solid var(--ink);
}
/* 2026-08-31 · 대표 이미지가 없거나 차단된 기사(빈 image 4편) — 오른쪽 748×850
   칼럼을 통째로 접는다. 1단 칼럼이 없으면 그리드가 빈 열을 그대로 예약해
   백지 박스가 남는다. */
.article-hero--no-media {
  grid-template-columns: 1fr;
  min-height: 0;
}
.article-hero--no-media .article-hero__copy { border-right: 0; }

.article-hero__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(44px, 6vw, 94px) var(--pad);
  border-right: 1px solid var(--ink);
}

.article-label {
  margin: 0 0 16px;
  font: 700 10px/1.4 ui-monospace, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 18em;
  margin: 0;
  /* 메인 .opening-story h1 과 동일 한글 디스플레이 계약 */
  font-size: clamp(32px, 3.2vw, 46px); /* 매거진 실측 40~80px · 지면당 1회 */
  /* 매거진 6곳 실측: 제목 굵기가 사실상 w400 하나다(w900 을 쓰는 곳이 없다).
     Monocle 은 서체 한 벌로 기사를 끝내고 w700 은 7글자뿐이다. 700 으로 내린다. */
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.02em;
  word-break: keep-all;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.article-dek {
  max-width: 640px;
  margin: 30px 0 0;
  color: var(--grey);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.article-hero dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 46px 0 0; padding-top: 14px; border-top: 1px solid var(--hairline); }
.article-hero dl div { min-width: 0; }
.article-hero dt { color: var(--grey); font: 8px/1.3 ui-monospace, monospace; letter-spacing: .1em; }
.article-hero dd { min-width: 0; margin: 5px 0 0; font: 9px/1.35 ui-monospace, monospace; overflow-wrap: anywhere; }

.article-hero figure { position: relative; min-width: 0; margin: 0; }
.article-hero figure img { height: 100%; min-height: 650px; object-fit: cover; }
.article-hero figure.article-hero__media--contain {
  display: grid;
  padding: clamp(20px, 4vw, 64px);
  place-items: center;
  background: var(--surface-strong);
}
.article-hero figure.article-hero__media--contain img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 720px;
  object-fit: contain;
}
.article-hero figcaption { position: absolute; right: 14px; bottom: 12px; padding: 6px 8px; background: var(--slab-scrim); color: var(--slab-ink); font: 8px/1.4 ui-monospace, monospace; letter-spacing: .08em; }

.direct-answer {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(34px, 6vw, 110px);
  align-items: end;
  padding: clamp(58px, 9vw, 140px) var(--pad);
  border-bottom: 1px solid var(--ink);
  /* 매거진 6곳 전부 기사 본문에 유채색 색면 0개 — 판을 걷고 여백으로 끊는다 */
}
.direct-answer .article-label { grid-column: 1 / -1; margin-bottom: -20px; }
.direct-answer h2 { margin: 0; font-size: clamp(21px, 2.1vw, 30px); /* 제목(46px)보다 크지 않게 */ line-height: 1.14; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }
.direct-answer > p:last-child { margin: 0; font-size: clamp(18px, 1.8vw, 26px); line-height: 1.65; letter-spacing: -.025em; word-break: keep-all; overflow-wrap: break-word; }

.article-body { width: min(100%, calc(var(--measure) + 2 * var(--pad))); margin-inline: auto; padding: clamp(54px, 8vw, 130px) var(--pad); }
.article-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 58px 0; border-bottom: 1px solid var(--hairline); }
.article-section:first-child { padding-top: 0; }
.article-section:last-child { padding-bottom: 0; border-bottom: 0; }
/* 매거진 6곳(Monocle·Gentlewoman·It's Nice That·월간디자인·GQ·SPACE) 중
   소제목에 번호를 매기는 곳이 하나도 없다. 생성기가 계속 내보내므로 화면에서만 감춘다 —
   HTML 을 고치면 매일 자동 생성 쪽까지 손봐야 하고, 여기가 단일 소스다.
   ★ 2026-08-24: 번호만 감추고 **번호가 서 있던 칸(70px·모바일 36px)은 남겨뒀다.**
   그러자 제목과 본문이 그 좁은 칸으로 밀려 모바일에서 한 글자씩 떨어졌다.
   게이트 43개가 전부 초록이었고 스크린샷을 보고서야 찾았다 — 조판 붕괴는
   게이트가 못 본다. 감출 때는 그 칸도 같이 걷는다. */
.article-section__number { display: none; }
.article-section h2 { max-width: var(--measure); margin: 0; font-size: clamp(21px, 2.1vw, 30px); /* 본문의 1.5배 — 국내 매거진 상한 */ line-height: 1.16; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }
.article-section p { max-width: var(--measure); margin: 24px 0 0; color: var(--ink); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.75; word-break: keep-all; overflow-wrap: break-word; }
.article-source-link { display: inline-block; margin-top: 20px; border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 750; }

.article-media {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 50px;
  align-items: center;
  padding: clamp(60px, 8vw, 120px) var(--pad);
  border-block: 1px solid var(--ink);
  background: var(--slab-raised);
  color: var(--slab-ink);
}
.article-media h2 { margin: 0; font-size: clamp(21px, 2.1vw, 30px); /* 같은 이유 */ line-height: 1.14; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }
.article-media .article-label { color: var(--accent); }
.video-shell { overflow: hidden; aspect-ratio: 16 / 9; background: var(--slab-well); }
.video-shell iframe { width: 100%; height: 100%; border: 0; }

.source-note { display: grid; grid-template-columns: .55fr 1fr auto; gap: 30px; align-items: center; padding: 30px var(--pad); border-bottom: 1px solid var(--ink); }
.source-note span { font: 9px ui-monospace, monospace; letter-spacing: .1em; }
.source-note p { margin: 0; color: var(--grey); font-size: 13px; word-break: keep-all; }
.source-note a { border-bottom: 1px solid var(--ink); font-size: 12px; font-weight: 750; white-space: nowrap; }

.story-to-object {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(40px, 8vw, 130px);
  padding: clamp(70px, 10vw, 150px) var(--pad);
  border-bottom: 1px solid var(--ink);
}
.story-to-object h2 { margin: 0; font-size: clamp(40px, 5.2vw, 80px); line-height: 1.14; letter-spacing: -.02em; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }
.story-to-object > div:first-child > p:not(.article-label) { max-width: 650px; margin: 26px 0 0; color: var(--grey); font-size: 17px; line-height: 1.8; word-break: keep-all; }
.commerce-facts {
  display: grid;
  margin: 32px 0 0;
  border-top: 1px solid var(--ink);
}
.commerce-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.commerce-facts dt {
  color: var(--accent);
  font: 700 9px/1.5 ui-monospace, monospace;
  letter-spacing: .08em;
}
.commerce-facts dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  word-break: keep-all;
}
.object-links { align-self: end; border-top: 1px solid var(--ink); }
.object-links a { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.object-links span { color: var(--grey); font: 9px ui-monospace, monospace; letter-spacing: .08em; }
.object-links strong { font-size: 21px; line-height: 1.35; word-break: keep-all; }
.object-links b { color: var(--accent); font-weight: 500; }

/* 아래 둘은 테마와 무관하게 어두운 판이다 — 강조색을 스스로 선언한다. */
.article-media,
.next-stories { --accent: var(--slab-ink); --accent-ink: var(--slab-paper); --lime: var(--slab-ink); }
.next-stories { padding: clamp(60px, 8vw, 120px) var(--pad); background: var(--slab-raised); color: var(--slab-ink); }
.next-stories .article-label { color: var(--accent); }
.next-stories > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.next-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 8px 22px; padding: 18px; border: 1px solid var(--slab-line); }
.next-card img { grid-row: 1 / 3; width: 150px; height: 120px; object-fit: cover; }
.next-card--contain img { object-fit: contain; background: var(--surface-strong); }
.next-card span { align-self: end; color: var(--slab-muted); font: 8px ui-monospace, monospace; letter-spacing: .08em; }
.next-card strong { font-size: 22px; line-height: 1.25; word-break: keep-all; }
/* 2026-08-31 · 이미지가 없거나 차단된 기사의 next-card — 150px 열을 접어
   텍스트만으로 정렬을 유지한다(빈 이미지 칸을 남겨 두지 않는다). */
.next-card--no-image { grid-template-columns: minmax(0, 1fr); }
.next-card--no-image span { align-self: auto; }

.story-footer { display: flex; justify-content: space-between; padding: 34px var(--pad) 70px; font: 9px ui-monospace, monospace; letter-spacing: .08em; }
.story-footer p { margin: 0; color: var(--grey); }

.share-toast {
  position: fixed;
  z-index: 60;
  right: 22px;
  bottom: 22px;
  max-width: calc(100% - 44px);
  padding: 12px 16px;
  transform: translateY(20px);
  opacity: 0;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.share-toast.is-visible { transform: translateY(0); opacity: 1; }

@media (max-width: 900px) {
  .article-hero { grid-template-columns: 1fr; }
  .article-hero__copy { min-height: 650px; border-right: 0; border-bottom: 1px solid var(--ink); }
  .article-hero figure img { min-height: 0; height: 72vw; }
  .direct-answer,
  .article-media,
  .story-to-object { grid-template-columns: 1fr; }
  .direct-answer .article-label { margin-bottom: 0; }
  .source-note { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 620px) {
  .story-header { flex-direction: column; align-items: stretch; gap: 14px; padding-block: 14px 10px; }
  .story-header nav { overflow-x: auto; padding-bottom: 4px; scroll-padding-inline: var(--pad); scrollbar-width: thin; }
  .story-header nav a,
  .story-header nav button { flex: 0 0 auto; }
  .article-hero__copy { min-height: 610px; }
  .article-hero h1 { font-size: clamp(44px, 13vw, 52px); }
  .article-hero figure img { height: 112vw; }
  .article-hero figure.article-hero__media--contain { padding: 18px; }
  .article-hero figure.article-hero__media--contain img { height: auto; max-height: none; }
  .article-hero dl { grid-template-columns: 1fr; }
  .article-hero dl div { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
  .article-hero dd { text-align: right; }
  .direct-answer { gap: 24px; }
  .article-section { gap: 12px; }
  .article-media { padding-inline: 0; gap: 34px; }
  .article-media > div:first-child { padding-inline: var(--pad); }
  .commerce-facts div { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .object-links a { grid-template-columns: 70px minmax(0, 1fr) auto; }
  .next-stories > div { grid-template-columns: 1fr; }
  .next-card { grid-template-columns: 105px minmax(0, 1fr); }
  .next-card img { width: 105px; height: 100px; }
  .next-card strong { font-size: 18px; }
  .next-card--no-image { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 모바일 조판 — 매거진 6곳 실측: 좁은 폭에서는 행간을 내리고 컬럼을 넓힌다.
   월간디자인 1.85→1.50 · GQ 1.76→1.62 · 컬럼 87.7~92.3%.
   29MU 는 행간 1.95 고정에 컬럼 78.5%(좌 66px/우 18px 비대칭)였다. */
@media (max-width: 640px) {
  .article-section p,
  .article-body p { line-height: 1.6; }
  /* 2026-09-21: .article-body 가 이미 --pad(390 에서 18px)를 주는데 여기서 18px 을
     또 줘 본문만 좌우로 18px 더 들어가 있었다(390 실측 36..354 대 다른 블록 18..372).
     대칭이라 중앙 정렬 검사에는 안 걸렸다. */
  .article-section { padding-inline: 0; }
}

/* 2026-08-31 · 패킷 발행 인용 — 손님이 읽는 주인공이라 자기 자리를 갖는다.
   그 전까지 인용과 출처 URL 이 본문 문장 안에 흘러 URL 뭉치가 됐다. */
.article-quote {
  margin: 14px 0;
  padding: 13px 18px;
  border-left: 3px solid var(--accent, currentColor);
  background: var(--surface-soft);
  border-radius: 0 6px 6px 0;
}
.article-quote p { margin: 0; font-size: .96em; line-height: 1.72; }
.article-quote cite {
  display: block; margin-top: 7px; font-style: normal;
  font: 600 11px/1.5 var(--font-mono, ui-monospace, monospace);
  color: var(--muted); letter-spacing: .03em;
}
.article-quote cite a { color: inherit; text-decoration: none; }
.article-quote cite a:hover { text-decoration: underline; }

/* 2026-08-31 · 절 사진 — 그 절이 인용한 상품의 실제 사진(PDP JSON-LD). 생성물이 아니다. */
.article-photos {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px; margin: 14px 0 16px;
}
.article-photo { margin: 0; }
.article-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
  object-fit: cover; border-radius: 6px; background: var(--surface-soft);
}
.article-photo figcaption {
  margin-top: 6px; font: 500 11px/1.45 var(--font-mono, ui-monospace, monospace);
  color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}


/* 2026-09-20 AI 영상 히어로(그록 Imagine) — 이미지 히어로와 같은 자리, 같은 크기. poster 가 정지 컷. */
.article-hero__media video.article-hero__video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; background: var(--surface-strong); }
.article-hero figure.article-hero__media--contain video.article-hero__video { height: auto; max-height: 720px; object-fit: contain; }

/* D-115 (2026-09-20): sound toggle for the AI hero video (scripts/29mu-video-sound.js). Same rule as media.css. */
.ai-video-host { position: relative; }
.ai-video__sound {
  position: absolute; left: 14px; bottom: 12px; z-index: 3;
  min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font: 600 12px/1 var(--font-sans, inherit); letter-spacing: .04em;
  cursor: pointer;
}
.ai-video__sound.is-on { background: var(--ink); color: var(--paper); }
.ai-video__sound:focus-visible { outline: 2px solid var(--accent, var(--ink)); outline-offset: 2px; }
/* story hero: the caption strip spans the bottom on phones, so the sound toggle sits top-left there */
.article-hero__media .ai-video__sound { bottom: auto; top: 12px; }

/* 2026-09-21 user: the sound toggle is a speaker icon (44px round); the Korean label stays for
   screen readers and the live audit. */
.ai-video__sound { width: 44px; height: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.ai-video__sound svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ai-video__sound .ai-video__sound-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ai-video__sound .ai-video__sound-icon--on { display: none; }
.ai-video__sound.is-on .ai-video__sound-icon--on { display: block; }
.ai-video__sound.is-on .ai-video__sound-icon--off { display: none; }
