/* 커뮤니티 > 전후 사진 (cases.html 전용, 2026-10-07)
   본문 마크업은 tmp/renewal-src/build/build_cases.py 가 만든다(<!-- cases:start --> ~ end).
   새 클래스(cs-*)는 fx 등장 목록에 없어서 항상 보인다. 제목·eyebrow·안내 상자만 기존 효과대로 나타난다. */

/* ── 배너: 실제 X-ray 한 쌍을 오른쪽에 (모바일은 위아래) ── */
.cs-hero { background: #0d0d0d; }
.cs-hero__bg { display: flex; justify-content: flex-end; gap: 3px; background: #0d0d0d; }
.cs-hero__bg img { width: 32%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.cs-hero__bg img:first-child { -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%); mask-image: linear-gradient(90deg, transparent, #000 38%); }
.cs-hero__cap { position: absolute; z-index: 2; right: max(var(--gut), (100% - var(--maxw)) / 2); bottom: 26px; max-width: calc(100% - var(--gut) * 2); font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.62); text-align: right; }
@media (max-width: 1023px) {
  /* 위아래로 쌓고, 제목이 놓이는 가운데에서 두 사진이 어둠 속으로 사라지게 (이음선이 글자를 가로지르지 않게) */
  .cs-hero__bg { flex-direction: column; gap: 0; }
  .cs-hero__bg img { width: 100%; height: 50%; }
  .cs-hero__bg img:first-child { -webkit-mask-image: linear-gradient(#000 52%, transparent 96%); mask-image: linear-gradient(#000 52%, transparent 96%); }
  .cs-hero__bg img:last-child { -webkit-mask-image: linear-gradient(transparent 4%, #000 48%); mask-image: linear-gradient(transparent 4%, #000 48%); }
  .cs-hero__cap { bottom: 18px; font-size: 12px; }
  .cs-hero__cap span { display: block; text-wrap: balance; }
}

/* ── 본문 ── */
.cs { padding: 155px 0 120px; }
.cs .eyebrow, .cs .s-h2, .cs__lead { text-align: center; }
.cs .s-h2 strong { font-weight: 700; }
.cs__lead { margin-top: 26px; font-size: 16px; line-height: 1.65; color: var(--text); }
.cs-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 48px; }
.cs-chip { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 21px; background: #fff; font-size: 15px; white-space: nowrap; transition: border-color .2s, background-color .2s, color .2s; }
.cs-chip:hover { border-color: var(--ink); }
.cs-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.cs-chip__n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-chip[aria-pressed="true"] .cs-chip__n { color: rgba(255,255,255,.7); }
.cs__legend { margin-top: 22px; font-size: 14px; line-height: 1.6; color: var(--muted); text-align: center; }
.cs__legend .cs-snubh { margin: 0 2px 0 0; vertical-align: 0; }
/* 가운데 정렬 안내문: 줄 길이를 고르게 (좁은 화면·?font=bo 에서 '있습니다.'·'2023년 / 11월' 같은 외톨이 줄 방지) */
.cs__lead, .cs__legend { text-wrap: balance; }

.cs-group { margin-top: 88px; scroll-margin-top: calc(var(--hdr-h) + 20px); }
.cs-filter + .cs__legend + .cs-groups > .cs-group:first-child { margin-top: 64px; }
.cs-group__t { display: flex; align-items: baseline; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--ink); font-size: 24px; line-height: 1.4; font-weight: 500; letter-spacing: -0.03em; }
.cs-group__t span { font-size: 14px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; margin-top: 32px; }

/* 카드: 위는 어두운 사진 판(실제 크기 비율 그대로, 자르지 않음), 아래는 설명 */
.cs-card { --cap: 280px; --g: 8px; display: flex; flex-direction: column; min-width: 0; border: 1px solid #e4e4e4; background: #fff; }
.cs-card__frames { order: -1; flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 18px; background: #151515; }
.cs-row { display: flex; align-items: flex-start; gap: var(--g); width: 100%; max-width: calc(var(--ar) * var(--cap) + (var(--n) - 1) * var(--g)); margin-inline: auto; }
.cs-fr { flex: var(--a) 1 0; min-width: 0; }
.cs-fr__a { display: block; background: #000; cursor: zoom-in; }
.cs-fr__a img { width: 100%; height: auto; transition: opacity .25s; }
.cs-fr__a:hover img { opacity: .82; }
.cs-fr__a:focus-visible { outline-offset: 2px; }
.cs-fr figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; color: rgba(255,255,255,.78); word-break: keep-all; }
.cs-card__body { padding: 22px 24px 26px; }
.cs-card__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; line-height: 1.4; }
.cs-tag { font-weight: 600; color: var(--gold); }
.cs-el { padding: 3px 9px; border-radius: 11px; background: var(--soft); color: var(--sub); font-variant-numeric: tabular-nums; }
.cs-card__t { margin-top: 10px; font-size: 19px; line-height: 1.45; font-weight: 500; letter-spacing: -0.03em; }
.cs-card__yr { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--sub); font-variant-numeric: tabular-nums; }
.cs-card__note { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cs-snubh { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 4px 10px; border: 1px solid #e3d8c3; border-radius: 4px; background: #faf7f1; font-size: 13px; line-height: 1.4; color: #7c6234; }
.cs-snubh::before { content: ""; width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--gold); }

@media (max-width: 1023px) {
  .cs { padding: 70px 0 70px; }
  .cs__lead { margin-top: 20px; font-size: 15px; }
  .cs-filter { gap: 6px; margin-top: 32px; }
  .cs-chip { height: 38px; padding: 0 14px; font-size: 14px; }
  .cs-chip__n { font-size: 12px; }
  .cs__legend { margin-top: 18px; font-size: 13px; }
  .cs-group, .cs-filter + .cs__legend + .cs-groups > .cs-group:first-child { margin-top: 52px; }
  .cs-group__t { padding-bottom: 12px; font-size: 20px; }
  .cs-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 22px; }
  /* 모바일: 사진을 한 줄로 이어 옆으로 넘겨 본다(같은 높이, 비율 그대로) */
  .cs-card { --fh: 190px; }
  .cs-card__frames { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 14px; scrollbar-width: thin; scrollbar-color: #555 transparent; }
  .cs-row { display: contents; }
  .cs-fr { flex: none; width: min-content; scroll-snap-align: start; }
  .cs-fr:first-child { margin-left: auto; }
  .cs-row:last-child .cs-fr:last-child { margin-right: auto; }
  .cs-fr__a { background: transparent; }
  /* 아주 넓은 사진도 다음 사진이 살짝 보이게 폭을 제한(비율 유지, 위아래 여백) */
  .cs-fr__a img { width: auto; max-width: calc(100vw - 110px); height: var(--fh); object-fit: contain; }
  .cs-fr figcaption { font-size: 12px; }
  .cs-card__body { padding: 18px 18px 20px; }
  .cs-card__t { font-size: 17px; }
  .cs-card__yr { font-size: 13px; }
  .cs-snubh { font-size: 12px; }
}
@media (min-width: 600px) and (max-width: 1023px) { .cs-card { --fh: 240px; } }
@media (max-width: 1023px) { .cs-row:not(:first-child) .cs-fr:first-child { margin-left: 0; } }

/* ── 크게 보기 (dialog) ── */
html.cs-lock { overflow: hidden; }
.cs-lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0c0c0c; color: #fff; overflow: hidden; }
.cs-lb::backdrop { background: rgba(0,0,0,.6); }
.cs-lb[open] { display: flex; flex-direction: column; }
.cs-lb__top { display: flex; align-items: center; justify-content: space-between; flex: none; height: 64px; padding: 0 12px 0 24px; }
.cs-lb__count { font-size: 14px; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.cs-lb__close { position: relative; width: 48px; height: 48px; }
.cs-lb__close::before, .cs-lb__close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 24px; height: 1.5px; margin: -.75px 0 0 -12px; background: #fff; rotate: 45deg; }
.cs-lb__close::after { rotate: -45deg; }
.cs-lb__stage { position: relative; flex: 1 1 auto; min-height: 0; }
.cs-lb__img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: calc(100% - 176px); max-height: calc(100% - 8px); background: #000; }
.cs-lb__foot { flex: none; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 24px 26px; }
.cs-lb__cap { min-width: 0; max-width: 760px; text-align: center; }
.cs-lb__label { font-size: 17px; line-height: 1.5; font-weight: 600; }
.cs-lb__title { margin-top: 4px; font-size: 14px; line-height: 1.5; color: rgba(255,255,255,.75); }
.cs-lb__meta { margin-top: 4px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.cs-lb__meta:empty { display: none; }
.cs-lb__nav { position: absolute; top: 50%; margin-top: -25px; border-color: rgba(255,255,255,.55); background: rgba(0,0,0,.3); }
.cs-lb__nav--prev { left: 32px; }
.cs-lb__nav--next { right: 32px; }
@media (max-width: 1023px) {
  .cs-lb__top { height: 56px; padding-left: 18px; }
  .cs-lb__img { max-width: calc(100% - 16px); }
  .cs-lb__foot { gap: 12px; padding: 14px 12px 20px; }
  .cs-lb__nav { position: static; flex: none; width: 44px; height: 44px; margin: 0; }
  .cs-lb__cap { flex: 1; }
  .cs-lb__label { font-size: 15px; }
  .cs-lb__title { font-size: 13px; }
  .cs-lb__meta { font-size: 12px; }
}
