/* Layout: 라이트 테마. 서늘한 종이색 바탕 + 흑·회색 글자, 포인트는 두 캐릭터 색(A 짙은 청색 / B 하늘색)뿐.
   글꼴: 한글 제목 Hahmlet(가는 명조), 영문 제목 Cormorant Garamond 이탤릭, 본문 Pretendard */
:root {
  --bg: #f2f3f4;            /* 서늘한 종이색 */
  --paper: #f8f9fa;
  --surface: #ffffff;
  --surface-2: #eceef0;
  --line: #dcdfe3;
  --line-2: #c5cad1;
  --text: #16181b;
  --text-2: #3b4048;        /* 본문 */
  --muted: #69707a;
  --faint: #9ba1a9;
  --tint: #5c7a99;          /* 약간의 푸른빛 */
  --a: #1f3c66;             /* 흑발 · 짙은 청색 (JS가 데이터 값으로 덮어씀) */
  --a-ink: #1f3c66;         /* 밝은 바탕 위 글자용 */
  --a-soft: #e3e8ef;
  --b: #a9d6f5;             /* 백발 · 밝은 하늘색 */
  --b-ink: #2f6f9e;
  --b-soft: #e8f3fb;
  --scrim: rgba(238, 240, 242, .95);
  --shade: rgba(14, 16, 20, .55);
  --danger: #b4483f;

  --f-ko: "Hahmlet", "MaruBuri", "Nanum Myeongjo", serif;
  --f-en: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-body: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1160px;
  --read: 660px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--tint); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 400; }
p { margin: 0; }

.label {
  font-family: var(--f-body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.label.kl { letter-spacing: .06em; text-transform: none; font-size: 11.5px; }
.en { font-family: var(--f-en); font-style: italic; font-weight: 400; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-size: 11.5px; letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ───────── 상단 ───────── */
.admin-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  right: 8px;
  z-index: 60;
  width: 22px; height: 22px;
  padding: 0; border: 0; background: transparent;
  color: var(--faint);
  cursor: pointer;
  display: grid; place-items: center;
  border-radius: 50%;
}
.admin-btn:hover { color: var(--text); }
.admin-btn.on { color: var(--b-ink); }
.admin-btn svg { width: 12px; height: 12px; }

.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px var(--gutter) 14px;
  background: var(--bg);
  border-bottom: 1px solid transparent;
}
.brand { font-family: var(--f-en); font-style: italic; font-size: 20px; color: var(--text); white-space: nowrap; letter-spacing: .01em; }
.nav { display: flex; gap: clamp(14px, 3vw, 34px); }
.nav a { font-size: 13px; color: var(--muted); padding-block: 4px; border-bottom: 1px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); border-bottom-color: var(--text); }

.app { padding-inline: var(--gutter); padding-block: 8px 96px; max-width: var(--maxw); margin: 0 auto; min-height: 70vh; }
.app.wide { max-width: 1480px; }
.foot { padding: 40px var(--gutter) 56px; text-align: center; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); }

.pairline { display: flex; height: 2px; width: 100%; }
.pairline i { flex: 1; }
.pairline i:first-child { background: var(--a); }
.pairline i:last-child { background: var(--b); }

/* 섹션 제목: 영문 이탤릭 + 한글 라벨 */
.sec { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.sec .en { font-size: clamp(34px, 5vw, 52px); line-height: 1; color: var(--text); }
.sec .ko { font-size: 12.5px; color: var(--muted); letter-spacing: .04em; }
.block { padding-top: clamp(72px, 10vw, 128px); display: grid; gap: 32px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.block-head h2 { font-family: var(--f-ko); font-weight: 300; font-size: clamp(22px, 3vw, 30px); }
.more { font-size: 13px; color: var(--muted); }
.more:hover { color: var(--text); }

/* ───────── 홈: 페어 소개 ───────── */
.pair-cover { padding-top: clamp(28px, 6vw, 64px); display: grid; gap: clamp(28px, 4vw, 44px); justify-items: center; text-align: center; }
.cover-top { display: flex; justify-content: space-between; width: 100%; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.cover-title { display: grid; gap: 6px; justify-items: center; }
.cover-title .en { font-size: clamp(54px, 11vw, 132px); line-height: .9; font-weight: 300; color: var(--text); }
.cover-title .ko { font-family: var(--f-ko); font-weight: 300; font-size: clamp(16px, 2vw, 20px); letter-spacing: .3em; color: var(--text-2); padding-left: .3em; }
.cover-pair {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: clamp(10px, 3vw, 40px);
  max-width: 880px;
}
.who { display: grid; gap: 14px; justify-items: center; min-width: 0; }
.who .pimg, .who .ph { width: 100%; aspect-ratio: 3 / 4; }
.who .ph { background: var(--surface-2); display: grid; place-items: center; color: var(--faint); font-size: 12px; }
.who.a .pimg, .who.a .ph { box-shadow: inset 0 -3px 0 var(--a); }
.who.b .pimg, .who.b .ph { box-shadow: inset 0 -3px 0 var(--b); }
.who .nm { font-family: var(--f-ko); font-weight: 400; font-size: clamp(20px, 2.6vw, 28px); line-height: 1.25; }
.who.a .nm { color: var(--a-ink); }
.who.b .nm { color: var(--b-ink); }
.who .sub { font-size: 11px; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; margin-top: -8px; }
.cross { font-family: var(--f-en); font-style: italic; font-weight: 300; font-size: clamp(40px, 6vw, 72px); color: var(--faint); line-height: 1; align-self: center; padding-bottom: 60px; }
.oneline { font-family: var(--f-ko); font-weight: 300; font-size: clamp(17px, 2.2vw, 22px); color: var(--text-2); max-width: 34ch; line-height: 1.7; }
.oneline::before, .oneline::after { font-family: var(--f-en); color: var(--faint); font-size: 1.6em; line-height: 0; vertical-align: -.3em; }
.oneline::before { content: "“"; margin-right: .15em; }
.oneline::after { content: "”"; margin-left: .15em; }
.keywords { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 13.5px; color: var(--tint); }

/* 비교 프로필: 가운데 항목, 양옆 값 */
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(64px, 130px) minmax(0, 1fr); border-top: 1px solid var(--text); }
.compare > div { padding: 13px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.compare .ca { text-align: right; padding-right: clamp(10px, 3vw, 32px); }
.compare .cb { text-align: left; padding-left: clamp(10px, 3vw, 32px); }
.compare .ck { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .08em; align-self: stretch; display: grid; place-items: center; }
.compare .head { padding-block: 20px 16px; }
.compare .head .nm { font-family: var(--f-ko); font-size: clamp(18px, 2.4vw, 24px); }
.compare .head.ca .nm { color: var(--a-ink); }
.compare .head.cb .nm { color: var(--b-ink); }
.compare .head .en { display: block; color: var(--muted); font-size: 15px; }
.compare .head.ck::before { content: "×"; font-family: var(--f-en); font-style: italic; font-size: 24px; color: var(--faint); letter-spacing: 0; }
.compare .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: 1px; }
.descs { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 5vw, 64px); font-size: 14.5px; color: var(--text-2); line-height: 1.85; }
.descs > div { min-width: 0; display: grid; gap: 10px; align-content: start; }
.descs .label { color: var(--muted); }
.descs .tagline { font-family: var(--f-ko); font-size: 17px; color: var(--text); }

/* 관계 */
.relation { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 28px); }
.arrow-card { min-width: 0; display: grid; gap: 18px; align-content: start; padding: clamp(22px, 3vw, 34px); background: var(--surface); border: 1px solid var(--line); }
.arrow-head { display: grid; grid-template-columns: auto minmax(24px, 1fr) auto; align-items: center; gap: 12px; font-family: var(--f-ko); font-size: 16px; }
.arrow-head .line { height: 1px; position: relative; }
.arrow-head .line::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.arrow-card.ab .arrow-head .line { background: linear-gradient(90deg, var(--a), var(--b)); color: var(--b-ink); }
.arrow-card.ba .arrow-head .line { background: linear-gradient(90deg, var(--b), var(--a)); color: var(--a-ink); }
.arrow-head .x-a { color: var(--a-ink); }
.arrow-head .x-b { color: var(--b-ink); }
.call { display: flex; align-items: baseline; gap: 12px; }
.call b { font-family: var(--f-ko); font-weight: 400; font-size: clamp(22px, 2.8vw, 30px); color: var(--text); }
.arrow-card .view { color: var(--text-2); font-size: 14.5px; line-height: 1.85; }

.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 5vw, 64px); }
.quote { min-width: 0; display: grid; gap: 12px; padding-left: 20px; }
.quote.a { border-left: 2px solid var(--a); }
.quote.b { border-left: 2px solid var(--b); }
.quote p { font-family: var(--f-ko); font-weight: 300; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.7; color: var(--text); }

/* 디테일 */
.details { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.hchart { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line); padding: 22px 22px 16px; display: grid; gap: 14px; }
.hchart svg { width: 100%; height: auto; display: block; }
.hchart .cap { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.facts { display: grid; grid-template-columns: auto 1fr; margin: 0; border-top: 1px solid var(--text); }
.facts dt, .facts dd { padding: 14px 0; border-bottom: 1px solid var(--line); margin: 0; }
.facts dt { color: var(--muted); font-size: 12.5px; letter-spacing: .06em; padding-right: 28px; white-space: nowrap; }
.facts dd { min-width: 0; color: var(--text-2); }
.facts a { color: var(--b-ink); }

.common { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 32px; padding: 36px 0; border-block: 1px solid var(--line); }
.common h3 { font-family: var(--f-ko); font-weight: 300; font-size: clamp(20px, 2.4vw, 26px); margin-top: 10px; }

.feature {
  position: relative;
  display: grid; align-content: end; gap: 12px;
  min-height: clamp(280px, 36vw, 440px);
  padding: clamp(22px, 4vw, 48px);
  overflow: hidden;
  background: var(--text);
  color: #f4f5f6;
  isolation: isolate;
}
.feature .bgimg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; filter: grayscale(.6) brightness(.8); transition: filter .6s, transform 1.2s; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,16,20,0) 25%, rgba(14,16,20,.85)); }
.feature:hover .bgimg { filter: grayscale(.2) brightness(.85); transform: scale(1.02); }
.feature .label { color: rgba(244,245,246,.75); }
.feature h3 { font-family: var(--f-ko); font-weight: 300; font-size: clamp(30px, 4.8vw, 54px); line-height: 1.15; }
.feature p { color: rgba(244,245,246,.85); max-width: 52ch; }
.feature .meta, .feature .mono { color: rgba(244,245,246,.75); }
.feature .role.a i { background: #9db7da; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }
.role { display: inline-flex; align-items: center; gap: 7px; }
.role i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.role.a i { background: var(--a); }
.role.b i { background: var(--b); }

/* ───────── 썰 저장소 ───────── */
.page-head { padding-block: clamp(32px, 6vw, 64px) 8px; display: grid; gap: 8px; }
.page-head .en { font-size: clamp(44px, 7vw, 84px); line-height: .95; font-weight: 300; }
.page-head h1 { font-family: var(--f-ko); font-weight: 300; font-size: clamp(18px, 2.2vw, 22px); color: var(--text-2); letter-spacing: .14em; }
.page-head p { color: var(--muted); }

.au-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.au-card { position: relative; min-width: 0; display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .3s; }
.au-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.au-card .cover { aspect-ratio: 16 / 9; background: var(--surface-2) center / cover no-repeat; filter: grayscale(.5); transition: filter .4s; }
.au-card:hover .cover { filter: none; }
.au-card .cover.none { background-image: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--paper) 10px 20px); filter: none; }
.au-card .in { padding: 18px 20px 22px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.au-card h3 { font-family: var(--f-ko); font-size: 19px; font-weight: 400; line-height: 1.35; }
.au-card .sub { font-size: 12.5px; color: var(--tint); }
.au-card p { font-size: 13.5px; color: var(--muted); }

.mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border-top: 1px solid var(--text); }
.mini { position: relative; display: grid; gap: 2px; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.mini .t { font-family: var(--f-ko); font-size: 16px; }
.mini .s { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini:hover .t { color: var(--b-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--muted); padding: 4px 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.chip .n { font-size: 10.5px; opacity: .6; margin-left: 4px; font-variant-numeric: tabular-nums; }

.story-list { display: grid; border-top: 1px solid var(--text); }
.story-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.story-row .main { min-width: 0; display: grid; gap: 5px; }
.story-row .t { font-family: var(--f-ko); font-size: 17px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.story-row .ex { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { font-family: var(--f-body); font-size: 10.5px; letter-spacing: .04em; color: var(--tint); border: 1px solid var(--line-2); padding: 1px 7px; border-radius: 3px; white-space: nowrap; }
.btn-line { border: 1px solid var(--text); background: transparent; padding: 7px 16px; font-size: 12.5px; color: var(--text); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s; }
.btn-line:hover { background: var(--text); color: var(--surface); }
.thumbs-mini { display: inline-flex; gap: 3px; }
.thumbs-mini .pimg { width: 26px; height: 26px; }

/* ───────── AU 상세 ───────── */
.back { display: inline-flex; gap: 8px; font-size: 13px; color: var(--muted); padding-top: 24px; }
.back:hover { color: var(--text); }
.au-head { display: grid; gap: 14px; padding-block: 24px 40px; border-bottom: 1px solid var(--text); }
.au-head h1 { font-family: var(--f-ko); font-weight: 300; font-size: clamp(34px, 5.6vw, 62px); line-height: 1.15; }
.au-head .summary { color: var(--text-2); max-width: 60ch; }
.au-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-top: 44px; }
.toc { position: sticky; top: 90px; align-self: start; display: grid; gap: 2px; font-size: 13px; max-height: calc(100vh - 120px); overflow: auto; }
.toc .label { margin-bottom: 10px; }
.toc a { color: var(--muted); padding: 4px 0 4px 12px; border-left: 1px solid var(--line); }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-left-color: var(--a); }
.read-col { min-width: 0; max-width: var(--read); }
.progress { position: fixed; left: 0; top: 0; height: 2px; z-index: 70; background: linear-gradient(90deg, var(--a), var(--b)); width: 0; }

.prose { font-size: 16px; line-height: 2; color: var(--text-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-family: var(--f-ko); font-weight: 400; font-size: 23px; margin-top: 2.4em; color: var(--text); scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17px; font-weight: 600; margin-top: 1.8em; color: var(--text); }
.prose hr { border: 0; height: 1px; background: var(--line-2); width: 60%; margin: 2.8em auto; }   /* 문단 구분선 */
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--line-2); color: var(--text-2); }   /* 장면 */
.prose blockquote > * + * { margin-top: 1em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose.small { font-size: 15px; line-height: 1.95; }

/* ───────── 이미지 보호 ───────── */
.pimg { position: relative; background: var(--surface-2) center / cover no-repeat; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.pimg::after { content: ""; position: absolute; inset: 0; }
.pimg.contain { background-size: contain; background-color: transparent; }
.wm { position: absolute; right: 10px; bottom: 8px; z-index: 2; font-size: 11px; letter-spacing: .04em; color: rgba(255,255,255,.85); text-shadow: 0 0 6px rgba(0,0,0,.55); pointer-events: none; }

/* ───────── 갤러리 ───────── */
.gal-filters { display: grid; gap: 14px; padding-block: 8px 24px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 20; background: var(--bg); }
.seg { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.seg button { background: none; border: 0; cursor: pointer; padding: 10px 0; margin-right: 26px; color: var(--muted); font-size: 14px; border-bottom: 1px solid transparent; margin-bottom: -1px; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); border-bottom-color: var(--text); }
.seg .n { font-size: 10.5px; color: var(--faint); margin-left: 5px; font-variant-numeric: tabular-nums; }

.jgrid { display: grid; gap: 8px; }
.jrow { display: flex; gap: 8px; }
.tile { position: relative; cursor: zoom-in; flex: none; overflow: hidden; }
.tile .imgs { display: flex; gap: 3px; height: 100%; }
.tile .pimg { height: 100%; flex: none; transition: filter .3s; }
.tile:hover .pimg { filter: brightness(1.04); }
.tile .cap { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 26px 12px 10px; background: linear-gradient(transparent, var(--shade)); font-size: 12px; color: #fff; opacity: 0; transition: opacity .25s; pointer-events: none; display: flex; justify-content: space-between; gap: 8px; }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.tile .corner { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 4px; pointer-events: none; }
.tile .corner span { font-size: 9.5px; font-weight: 600; letter-spacing: .1em; padding: 2px 6px; background: rgba(255,255,255,.9); color: var(--text); border-radius: 2px; }
.chip.hidden-tag { border-style: dashed; color: var(--faint); }
.chip.hidden-tag.on { background: var(--text-2); border-style: solid; color: var(--surface); }
.chip-mode { border: 0; background: none; color: var(--tint); font-size: 12px; cursor: pointer; padding: 4px 6px; text-decoration: underline; text-underline-offset: 3px; }
.hidden-bar { align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); padding: 8px 12px; border: 1px dashed var(--line-2); background: var(--paper); justify-self: start; }
.hidden-bar b { color: var(--text); font-weight: 600; }
.seg-mini { display: inline-flex; border: 1px solid var(--line-2); }
.seg-mini button { border: 0; background: var(--surface); color: var(--muted); font-size: 12px; padding: 4px 10px; cursor: pointer; }
.seg-mini button + button { border-left: 1px solid var(--line-2); }
.seg-mini button.on { background: var(--text); color: var(--surface); }
.lock-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.lock-chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; white-space: nowrap; cursor: pointer; }

/* 잠금(🔒) */
.badge.lock-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); border-color: var(--text-2); }
.badge.lock-badge svg, .hidden-bar svg { width: 11px; height: 11px; vertical-align: -1px; }
.story-row.locked .lock-ex { color: var(--faint); font-size: 12.5px; }
.tile.locked .pimg { filter: blur(26px) grayscale(.4) brightness(.92); transform: scale(1.25); }
.tile.locked:hover .pimg { filter: blur(26px) grayscale(.4) brightness(.92); }
.lock-ov { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 12px; text-align: center; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45); pointer-events: none; }
.lock-ov .gate-ic { width: 30px; height: 30px; border-color: rgba(255,255,255,.75); color: #fff; }
.lock-ov .lt { font-family: var(--f-ko); font-size: 15px; line-height: 1.4; }
.lock-ov .lr { font-size: 11px; opacity: .85; letter-spacing: .04em; }
.tile.locked .cap { display: none; }
.gate { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 36px 20px; }
.gate-ic { width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.gate-ic svg { width: 40%; height: 40%; }
.gate-q { font-family: var(--f-ko); font-size: 22px; color: var(--text); margin-top: 6px; }
.gate-why { font-size: 13px; color: var(--muted); }
.gate-btns { display: flex; gap: 8px; margin-top: 10px; }
.gate-btns .btn { min-width: 84px; padding: 8px 14px; font-size: 13.5px; }
.lb-imgs .gate { background: var(--surface); border: 1px solid var(--line); padding: 44px 48px; }
.rel-locked { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font-family: var(--f-ko); font-size: 15px; text-align: left; color: var(--text); }
.tile .corner .hid { background: var(--text-2); color: var(--surface); }
.empty { padding: 60px 0; text-align: center; color: var(--faint); border: 1px dashed var(--line-2); }

/* ───────── 모달 ───────── */
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: var(--scrim);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.x-btn { position: absolute; top: 10px; right: 10px; z-index: 5; width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 24px; line-height: 1; }
.x-btn:hover { color: var(--text); }

.sheet { position: relative; width: min(720px, 100%); max-height: 100%; overflow: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(20, 24, 30, .12); padding: clamp(24px, 5vw, 52px); display: grid; gap: 18px; }
.sheet h2 { font-family: var(--f-ko); font-weight: 400; font-size: clamp(22px, 3vw, 30px); padding-right: 30px; }

.lightbox { padding: 0; place-items: stretch; }
.lb { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: 100%; width: 100%; }
.lb-stage { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 48px 56px; }
.lb-imgs { display: flex; gap: 4px; }
.lb-imgs .pimg { flex: none; background-size: contain; background-color: transparent; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; font-family: var(--f-en); }
.lb-nav:hover { color: var(--text); }
.lb-nav.prev { left: 6px; }
.lb-nav.next { right: 6px; }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.lb-side { min-width: 0; background: var(--surface); border-left: 1px solid var(--line); overflow: auto; padding: 56px 28px 32px; display: grid; gap: 22px; align-content: start; }
.lb-side h2 { font-family: var(--f-ko); font-weight: 400; font-size: 21px; }
.credit { display: grid; gap: 6px; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; }
.credit a { color: var(--b-ink); word-break: break-all; }
.credit .note { color: var(--muted); font-size: 12.5px; }
.rel { display: grid; border-top: 1px solid var(--text); }
.rel details { border-bottom: 1px solid var(--line); }
.rel summary { cursor: pointer; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-ko); font-size: 15px; }
.rel summary::-webkit-details-marker { display: none; }
.rel summary::after { content: "+"; color: var(--faint); }
.rel details[open] summary::after { content: "−"; }
.rel .prose { padding-bottom: 16px; }

/* ───────── 관리자 ───────── */
.admin-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  z-index: 75;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  padding: 8px 10px 8px 16px;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 12px 40px rgba(20, 24, 30, .14);
  font-size: 12.5px;
  max-width: calc(100vw - 24px);
}
.admin-bar .st { color: var(--muted); margin-right: 8px; white-space: nowrap; }
.admin-bar .st b { color: var(--b-ink); font-weight: 600; }
.btn { border: 1px solid var(--line-2); background: var(--surface); color: var(--text); padding: 6px 12px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--text); }
.btn.primary { background: var(--text); color: var(--surface); border-color: var(--text); }
.btn.primary:hover { background: var(--text-2); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .4; cursor: default; }

.adm { display: none; }
body.is-admin .adm { display: inline-flex; }
.tools { position: static; gap: 4px; flex-wrap: wrap; }
/* 그림·카드 위에 얹는 경우만 오른쪽 위에 띄움 */
.tile .tools, .au-card .tools, .feature .tools { position: absolute; top: 8px; right: 8px; z-index: 4; }
.tools button { border: 1px solid var(--line-2); background: rgba(255,255,255,.94); color: var(--text); font-size: 11px; padding: 3px 8px; cursor: pointer; }
.tools button:hover { border-color: var(--b-ink); color: var(--b-ink); }
.tools button.del:hover { border-color: var(--danger); color: var(--danger); }
.lb-side .lb-tools { display: flex; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
body:not(.is-admin) .lb-side .lb-tools { display: none; }
.tile .tools { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 16px); }
.tile .tools button { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; }
.add-btn { border: 1px dashed var(--line-2); background: transparent; color: var(--muted); padding: 8px 14px; font-size: 12.5px; cursor: pointer; align-items: center; gap: 6px; }
.add-btn:hover { color: var(--text); border-color: var(--text); }
.mini .tools { margin-top: 6px; }
.inline-tools { display: flex; justify-content: center; }

/* 화면에서 바로 고치기 */
[data-ml] { white-space: pre-line; }
[data-edit]:empty::before { content: attr(data-ph); color: var(--faint); }
body:not(.is-admin) .opt:empty { display: none; }
body.is-admin [data-edit] { outline: 1px dashed transparent; outline-offset: 3px; cursor: text; transition: outline-color .15s, background .15s; min-width: 1.5em; }
body.is-admin [data-edit]:hover { outline-color: var(--line-2); }
body.is-admin [data-edit]:focus { outline: 1px solid var(--tint); background: rgba(92, 122, 153, .07); }
body.is-admin [data-md] { cursor: pointer; outline: 1px dashed transparent; outline-offset: 8px; position: relative; }
body.is-admin [data-md]:hover, body.is-admin [data-md]:focus { outline-color: var(--line-2); }
body.is-admin [data-md]:hover::before { content: "눌러서 본문 고치기"; position: absolute; top: -32px; right: 0; font-family: var(--f-body); font-size: 11px; background: var(--text); color: var(--surface); padding: 2px 8px; z-index: 3; }
.md-editor { display: grid; gap: 8px; }
.md-editor textarea { min-height: 200px; font-size: 15px; line-height: 1.9; background: var(--surface); border-color: var(--tint); }
.md-acts { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.md-acts .hint { font-size: 11.5px; color: var(--faint); }
.md-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.md-tools button { border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 12px; padding: 4px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.md-tools button:hover { border-color: var(--text); color: var(--text); }
.md-tools .i-hr { width: 16px; height: 1px; background: currentColor; }
.md-tools .i-q { width: 3px; height: 12px; background: currentColor; opacity: .5; }
.credit .url-edit { color: var(--b-ink); word-break: break-all; }

/* 관리자 메모 */
.memo-note { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: -6px; }
.memo-list { display: grid; gap: 10px; }
.memo-item { display: grid; gap: 6px; padding: 12px; background: var(--paper); border: 1px solid var(--line); }
.memo-item textarea { min-height: 80px; background: var(--surface); resize: none; overflow: hidden; }
.memo-foot { display: flex; justify-content: space-between; align-items: center; }

/* 폼 */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .flabel { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.field .hint { font-size: 11.5px; color: var(--faint); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input[type=text], input[type=password], input[type=date], input[type=url], input[type=number], select, textarea {
  width: 100%; background: var(--paper); border: 1px solid var(--line-2); color: var(--text);
  padding: 9px 11px; font: inherit; font-size: 14px; border-radius: 0;
}
textarea { resize: vertical; line-height: 1.7; min-height: 120px; }
textarea.big { min-height: 360px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); background: var(--surface); }
input[type=color] { width: 44px; height: 36px; border: 1px solid var(--line-2); background: var(--surface); padding: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: calc(-1 * clamp(24px, 5vw, 52px)); margin-bottom: calc(-1 * clamp(24px, 5vw, 52px) + 16px); padding-block: 12px clamp(16px, 4vw, 32px); background: var(--surface); border-top: 1px solid var(--line); z-index: 3; }
.form-sep { font-size: 12px; letter-spacing: .04em; color: var(--muted); font-weight: 500; padding-top: 10px; border-top: 1px solid var(--line); }
.pick-imgs { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.pick-img { display: grid; gap: 6px; justify-items: center; }
.pick-img .pimg { height: 140px; background-size: contain; background-color: var(--paper); border: 1px solid var(--line); }
.pick-img .acts { display: flex; gap: 4px; }
.checklist { display: grid; gap: 2px; max-height: 220px; overflow: auto; border: 1px solid var(--line-2); padding: 6px; background: var(--paper); }
.checklist label { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 4px 6px; cursor: pointer; }
.checklist label:hover { background: var(--surface-2); }
.checklist .pimg { width: 34px; height: 34px; flex: none; }
.sugg { display: flex; flex-wrap: wrap; gap: 4px; }
.sugg button { border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11.5px; padding: 2px 8px; cursor: pointer; border-radius: 999px; }
.sugg button:hover { color: var(--text); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 18px); z-index: 95; background: var(--text); color: var(--surface); padding: 9px 16px; font-size: 13px; max-width: calc(100vw - 32px); }

/* ───────── 반응형 ───────── */
@media (max-width: 900px) {
  .au-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .common, .details { grid-template-columns: 1fr; gap: 20px; }
  .relation { grid-template-columns: 1fr; }
  .lightbox { overflow: auto; display: block; }
  .lb { grid-template-columns: 1fr; grid-template-rows: 64vh auto; height: auto; min-height: 100%; }
  .lb-stage { padding: 48px 8px 34px; height: 64vh; }
  .lb-side { border-left: 0; border-top: 1px solid var(--line); padding: 24px 18px 40px; overflow: visible; }
  .lb-nav.prev { left: 0; } .lb-nav.next { right: 0; }
}
@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 18px; }
  .gal-filters { top: calc(env(safe-area-inset-top, 0px) + 92px); }
  .cross { padding-bottom: 70px; font-size: 32px; }
  .who .nm { font-size: 18px; }
  .who .sub { font-size: 9.5px; letter-spacing: .14em; }
  .descs, .quotes { grid-template-columns: 1fr; }
  .compare { font-size: 13.5px; }
  .compare .ck { font-size: 11px; letter-spacing: 0; }
  .story-row { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .jgrid, .jrow { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
