/* 《검은 저울의 노예 중개상》 세계관 사이트 — 비 오는 먹색 밤 + 양피지 장부 + 금 + 녹청 */
@property --t { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
:root {
  --ink: #0d0c0b; --ink-2: #17140f; --ink-3: #211c15;
  --fog: #9c9384; --bone: #efe7d6;
  --vellum: #e8dcc2; --vellum-2: #dccdae; --vellum-ink: #2a2118; --vellum-fog: #5e4f3d;
  --gold: #c9a24a; --gold-2: #e2c47c; --gold-dim: rgba(201,162,74,.35);
  --verdigris: #5f9a8a; --brand: #b0362b;
  --f-title: "Nanum Myeongjo", "Gowun Batang", serif;
  --f-name: "Gowun Batang", "Nanum Myeongjo", serif;
  --f-body: "Noto Sans KR", "Malgun Gothic", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --f-deco: "Cormorant Garamond", Georgia, serif;
  --ease: cubic-bezier(.2,.7,.2,1);
  --pad: clamp(16px, 4vw, 48px);
  --top-h: 60px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--bone); font: 400 16px/1.7 var(--f-body); overflow-x: hidden; word-break: keep-all; overflow-wrap: anywhere; padding-bottom: 76px; }
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { list-style: none; padding: 0; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--gold); color: var(--ink); padding: 10px 14px; text-decoration: none; }
.skip:focus { top: 8px; }

/* ── 비 ── */
#rain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .55; transition: opacity .9s; }
body.locked #rain { z-index: 201; opacity: .9; }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 20px; border: 1px solid var(--gold); text-decoration: none; font-weight: 500; letter-spacing: .02em; transition: background .15s, color .15s, border-color .15s; border-radius: 0; }
.btn .sm { font-size: 11px; opacity: .75; }
.btn .arr { width: 18px; height: 18px; transition: transform .15s; }
.btn:hover .arr { transform: translateX(3px); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-2); }
.btn-line { color: var(--gold-2); background: rgba(13,12,11,.4); }
.btn-line:hover { background: rgba(201,162,74,.14); }
.btn-sm { min-height: 44px; padding: 8px 16px; }

/* ── 게이트 ── */
#gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse at 50% 38%, #1c1912 0%, var(--ink) 62%) var(--ink); transition: opacity .9s var(--ease), visibility .9s; }
#gate.out { opacity: 0; visibility: hidden; }
#gate[hidden] { display: none; }
.gate-in { position: relative; z-index: 202; text-align: center; max-width: 560px; display: grid; justify-items: center; gap: 16px; }
.gate-scale { width: min(200px, 46vw); fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 18px rgba(201,162,74,.25)); }
.gate-scale circle { fill: var(--ink); }
.gate-scale .g-beam { transform-origin: 100px 44px; transform-box: view-box; animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.gate-k { color: var(--verdigris); }
.gate-title { font: 800 clamp(34px, 8vw, 64px)/1.15 var(--f-title); letter-spacing: -.01em; }
.gate-note { color: var(--fog); font-size: 14px; border-top: 1px solid var(--gold-dim); border-bottom: 1px solid var(--gold-dim); padding: 6px 14px; }
.gate-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }

/* ── 상단 ── */
.top { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--top-h); display: flex; align-items: center; gap: 16px; padding: 0 var(--pad);
  background: rgba(13,12,11,.82); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(201,162,74,.18); }
.logo { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; font: 800 18px/1 var(--f-title); text-decoration: none; color: var(--gold-2); flex: none; }
#nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
#nav::-webkit-scrollbar { display: none; }
#nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; text-decoration: none; color: var(--fog); white-space: nowrap; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
#nav a:hover, #nav a[aria-current="true"] { color: var(--gold-2); border-bottom-color: var(--gold); }
.prog { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); }

/* ── 공통 섹션 ── */
main { position: relative; z-index: 1; }
.sec { position: relative; padding: clamp(72px, 11vw, 140px) 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); position: relative; }
.sec-bg::before { content: ""; position: absolute; inset: 0; background: var(--bg) center/cover no-repeat; opacity: .22; filter: saturate(.7); z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.sec-h { margin-bottom: clamp(32px, 5vw, 56px); }
.sec-h .mono { color: var(--verdigris); display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sec-h .no { font-size: 13px; color: var(--gold); border: 1px solid var(--gold); padding: 2px 8px; letter-spacing: .08em; }
.sec-h h2 { font: 800 clamp(36px, 7vw, 76px)/1.1 var(--f-title); letter-spacing: -.02em; }
.sec-h-sm { margin-top: clamp(64px, 9vw, 112px); }
.sec-h-sm h2 { font-size: clamp(30px, 5vw, 52px); }
.lead { font: 400 clamp(17px, 2vw, 20px)/1.85 var(--f-name); max-width: 34em; color: var(--bone); }
.sub-h { font: 700 22px/1.3 var(--f-title); margin-bottom: 20px; display: grid; gap: 4px; }
.sub-h .mono { color: var(--verdigris); font-weight: 400; }

/* 등장 */
[data-in] { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 100ms); animation-play-state: paused; }
body.entered [data-in] { animation-play-state: running; }
body.settled [data-in] { animation: none; opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.pre { opacity: 0; transform: translateY(18px); }

/* ── 히어로 ── */
.hero { position: relative; min-height: 100svh; padding: calc(var(--top-h) + 32px) 0 72px; display: grid; align-items: center;
  background: radial-gradient(ellipse at 70% 40%, rgba(95,154,138,.12), transparent 60%), radial-gradient(ellipse at 20% 80%, rgba(201,162,74,.08), transparent 55%); }
.hero-in { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); display: grid; gap: clamp(28px, 5vw, 72px); grid-template-columns: 1fr; align-items: center; }
.poster { position: relative; justify-self: center; width: min(100%, 520px); padding: 10px; border: 1px solid var(--gold); background: var(--ink-2); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.poster::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--gold-dim); pointer-events: none; }
.poster-btn { display: block; width: 100%; cursor: zoom-in; }
.poster img { width: 100%; }
.hero-copy { display: grid; gap: 20px; justify-items: start; }
.kicker { color: var(--verdigris); }
.ribbon { position: relative; display: grid; gap: 2px; padding: 14px 34px 16px; color: var(--ink); background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #a9843a); max-width: 100%;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 50%, 100% 100%, 0 100%, 16px 50%); }
.ribbon::after { content: ""; position: absolute; inset: 5px 20px; border-top: 1px solid rgba(13,12,11,.45); border-bottom: 1px solid rgba(13,12,11,.45); pointer-events: none; }
.r-en { font: italic 600 clamp(14px, 1.8vw, 18px)/1.2 var(--f-deco); letter-spacing: .04em; }
.r-ko { font: 800 clamp(26px, 4.4vw, 46px)/1.15 var(--f-title); letter-spacing: -.02em; }
.hero-sub { font: 700 clamp(18px, 2.4vw, 24px)/1.4 var(--f-name); color: var(--gold-2); }
.hero-lines { display: grid; gap: 6px; border-left: 1px solid var(--gold-dim); padding-left: 16px; color: var(--bone); }
.hero-lines li { font-size: clamp(15px, 1.7vw, 17px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-soon { color: var(--fog); display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--verdigris); box-shadow: 0 0 0 0 rgba(95,154,138,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(95,154,138,0); } 100% { box-shadow: 0 0 0 0 rgba(95,154,138,0); } }
.hero-more { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--fog); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--gold-dim); }
.hero-more:hover { color: var(--gold-2); }
.cue { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; color: var(--fog); text-decoration: none; min-width: 44px; min-height: 44px; }
.cue i { width: 1px; height: 32px; background: linear-gradient(var(--gold), transparent); animation: drip 2.2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ── 01 세계 ── */
.places { display: grid; grid-template-columns: 1fr; gap: 16px; margin: clamp(40px, 6vw, 64px) 0; }
.place { position: relative; overflow: hidden; border: 1px solid rgba(201,162,74,.25); background: var(--ink-2); min-height: 240px; display: flex; flex-direction: column; justify-content: flex-end; }
.place img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: transform .6s var(--ease), opacity .3s; }
.place::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(13,12,11,.94)); }
.place:hover img { transform: scale(1.04); opacity: .8; }
.place-t { position: relative; z-index: 1; padding: 20px; display: grid; gap: 4px; }
.place-t .mono { color: var(--gold); }
.place-t h3 { font: 700 22px/1.3 var(--f-name); }
.place-t p:last-child { color: var(--fog); font-size: 15px; }
.two { display: grid; gap: 40px; }
.factions ol { border-top: 1px solid var(--gold-dim); }
.factions li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--gold-dim); }
.factions .ic { width: 26px; height: 26px; color: var(--gold); margin-top: 2px; }
.factions b { display: block; font: 700 18px/1.4 var(--f-name); }
.factions span { color: var(--fog); font-size: 15px; }
.villain { align-self: end; padding: 28px 24px; border: 1px solid var(--gold-dim); background: linear-gradient(180deg, rgba(23,20,15,.9), rgba(13,12,11,.9)); position: relative; }
.villain::before { content: "\201C"; position: absolute; top: -8px; left: 18px; font: 600 80px/1 var(--f-deco); color: var(--gold); }
.villain blockquote p { font: 700 clamp(20px, 2.6vw, 26px)/1.5 var(--f-name); color: var(--bone); padding-top: 16px; }
.villain figcaption { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.villain figcaption b { color: var(--brand); font: 700 18px/1.3 var(--f-name); }
.villain figcaption span { color: var(--fog); font-size: 14px; }

/* ── 02 저울 ── */
.scale-wrap { display: grid; gap: 40px; align-items: center; }
.balance { display: grid; gap: 16px; justify-items: center; }
.balance svg { width: min(100%, 460px); overflow: visible; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.b-post { stroke-width: 3; }
.b-knob { fill: var(--ink); }
.b-beam { transform-box: view-box; transform-origin: 200px 70px; transform: rotate(var(--t)); transition: transform .9s var(--ease); }
.b-pan-l { transform-box: view-box; transform-origin: 60px 70px; transform: rotate(calc(var(--t) * -1)); transition: transform .9s var(--ease); }
.b-pan-r { transform-box: view-box; transform-origin: 340px 70px; transform: rotate(calc(var(--t) * -1)); transition: transform .9s var(--ease); }
.b-dish { fill: rgba(201,162,74,.12); }
.b-str { stroke-width: 1.2; stroke: var(--gold-dim); }
.b-coin ellipse { fill: var(--ink-3); }
.b-feather { stroke: var(--verdigris); fill: rgba(95,154,138,.15); }
.balance { --t: 0deg; animation: idle 7s ease-in-out infinite; }
@keyframes idle { 0%,100% { --t: -2deg; } 50% { --t: 2deg; } }
.balance.tl { animation: none; --t: -12deg; }
.balance.tr { animation: none; --t: 12deg; }
.plates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: min(100%, 520px); }
.plate { display: grid; gap: 4px; text-align: left; padding: 14px 16px; min-height: 64px; border: 1px solid var(--gold-dim); background: rgba(13,12,11,.6); transition: border-color .15s, background .15s; }
.plate .mono { color: var(--gold); font-size: 11px; }
.plate span:last-child { font: 700 16px/1.45 var(--f-name); }
.plate[data-side="r"] .mono { color: var(--verdigris); }
.plate:hover, .plate[aria-pressed="true"] { border-color: var(--gold); background: rgba(201,162,74,.1); }

/* ── 03 한 주 ── */
.timeline { position: relative; display: grid; gap: 0; border-top: 1px solid var(--gold-dim); }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 6px 24px; padding: 20px 0 20px 28px; border-bottom: 1px solid var(--gold-dim); position: relative; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 1px; background: var(--gold-dim); }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 28px; width: 11px; height: 11px; border: 1px solid var(--gold); background: var(--ink); transform: rotate(45deg); }
.timeline .day { color: var(--verdigris); }
.timeline b { font: 700 20px/1.35 var(--f-name); }
.timeline span.d { color: var(--fog); }
.timeline li.final { background: linear-gradient(90deg, rgba(176,54,43,.12), transparent 70%); }
.timeline li.final::after { background: var(--gold); }
.timeline li.final b { color: var(--gold-2); display: inline-flex; align-items: center; gap: 10px; }
.timeline li.final .ic { color: var(--gold); width: 24px; height: 24px; }
.sold { display: inline-block; justify-self: start; font: 500 12px/1 var(--f-mono); letter-spacing: .2em; color: var(--brand); border: 2px solid var(--brand); padding: 6px 10px; transform: rotate(-6deg); opacity: .9; }
.choices { display: grid; gap: 16px; }
.choice { border: 1px solid var(--gold-dim); padding: 28px 24px; background: rgba(23,20,15,.7); display: grid; gap: 12px; align-content: start; transition: border-color .15s, transform .15s; }
.choice:hover { border-color: var(--gold); transform: translateY(-2px); }
.choice .ic { width: 36px; height: 36px; color: var(--gold); }
.choice:nth-child(3) .ic { color: var(--verdigris); }
.choice .mono { color: var(--fog); }
.choice h3 { font: 800 26px/1.2 var(--f-title); }
.choice p { color: var(--fog); }

/* ── 04 매물 장부 (양피지) ── */
.vellum { background: var(--vellum); color: var(--vellum-ink); z-index: 2; margin-top: 60px;
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(94,79,61,.13) 31px 32px), radial-gradient(ellipse at 30% 20%, rgba(255,250,235,.5), transparent 60%), radial-gradient(ellipse at 80% 90%, rgba(120,90,50,.18), transparent 60%); }
.tear { position: absolute; left: 0; top: -1px; width: 100%; height: clamp(40px, 6vw, 90px); fill: var(--ink); transform: translateY(-1px); }
.tear .tear2 { fill: none; stroke: rgba(13,12,11,.35); stroke-width: 2; }
.vellum .sec-h .mono { color: #3f6f62; }
.vellum .sec-h .no { color: var(--vellum-ink); border-color: var(--vellum-ink); }
.vellum :focus-visible { outline-color: var(--vellum-ink); }
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid rgba(42,33,24,.4); margin-bottom: 20px; }
.tabs button { min-height: 48px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; font: 700 16px/1 var(--f-name); color: var(--vellum-fog); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tabs button .mono { font-size: 11px; color: inherit; opacity: .8; }
.tabs button:hover { color: var(--vellum-ink); }
.tabs button[aria-selected="true"] { color: var(--vellum-ink); border-bottom-color: var(--brand); }
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 8px 4px 16px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--vellum-fog) transparent; }
.rail button { flex: none; width: 84px; display: grid; justify-items: center; gap: 6px; scroll-snap-align: center; font: 700 13px/1.3 var(--f-name); color: var(--vellum-fog); text-align: center; padding: 4px 0; }
.rail .ph { width: 68px; height: 68px; border-radius: 999px; overflow: hidden; border: 1px solid rgba(42,33,24,.35); padding: 3px; background: var(--vellum-2); transition: border-color .15s, transform .15s; }
.rail .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; border-radius: 999px; filter: sepia(.25); transition: filter .15s; }
.rail button:hover .ph { transform: translateY(-2px); }
.rail button[aria-selected="true"] { color: var(--vellum-ink); }
.rail button[aria-selected="true"] .ph { border: 2px solid var(--brand); }
.rail button[aria-selected="true"] .ph img, .rail button:hover .ph img { filter: none; }
.dossier { margin-top: 24px; display: grid; gap: 0; background: #f2e9d4; border: 1px solid rgba(42,33,24,.45); box-shadow: 0 2px 0 rgba(42,33,24,.12), 0 24px 50px rgba(42,33,24,.18); position: relative; }
.dossier::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(42,33,24,.2); pointer-events: none; }
.d-img { position: relative; padding: 16px; display: grid; gap: 12px; }
.d-main { display: block; width: 100%; cursor: zoom-in; border: 1px solid rgba(42,33,24,.3); background: var(--vellum-2); overflow: hidden; }
.d-main img { width: 100%; aspect-ratio: 560/818; object-fit: cover; }
.d-thumbs { display: flex; gap: 8px; }
.d-thumbs button { width: 64px; height: 64px; border: 1px solid rgba(42,33,24,.3); overflow: hidden; opacity: .65; transition: opacity .15s, border-color .15s; }
.d-thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.d-thumbs button[aria-pressed="true"], .d-thumbs button:hover { opacity: 1; border-color: var(--vellum-ink); }
.d-body { position: relative; padding: 24px 20px 28px; display: grid; gap: 14px; align-content: start; }
.d-lot { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--vellum-ink); padding-bottom: 10px; }
.d-lot .no { font: 500 clamp(30px, 5vw, 44px)/1 var(--f-mono); letter-spacing: .02em; }
.d-lot .no small { font-size: 13px; letter-spacing: .2em; margin-right: 8px; vertical-align: middle; color: var(--vellum-fog); }
.d-lot .mono { color: var(--vellum-fog); text-align: right; }
.d-name { font: 700 clamp(30px, 5vw, 46px)/1.15 var(--f-name); letter-spacing: -.01em; }
.d-row { margin: 0; display: grid; grid-template-columns: 72px 1fr; gap: 12px; border-bottom: 1px dashed rgba(42,33,24,.35); padding: 8px 0; }
.d-row dt { font: 500 11px/1.9 var(--f-mono); letter-spacing: .14em; color: var(--vellum-fog); }
.d-row dd { margin: 0; font-size: 16px; }
.d-quote { font: 700 clamp(18px, 2.2vw, 22px)/1.55 var(--f-name); padding: 12px 0 12px 18px; border-left: 3px solid var(--gold); color: var(--vellum-ink); }
.d-empty { color: var(--vellum-fog); font-size: 15px; }
.d-namerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d-stamp { flex: none; position: relative; width: 84px; height: 84px; border-radius: 999px; border: 2px solid var(--brand); color: var(--brand); display: grid; place-items: center; text-align: center;
  font: 500 10px/1.25 var(--f-mono); letter-spacing: .12em; transform: rotate(-14deg); opacity: .78; pointer-events: none; }
.d-stamp b { display: block; font: 800 17px/1.1 var(--f-title); letter-spacing: 0; }
.d-nav { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.d-nav .cnt { font: 500 13px/1 var(--f-mono); color: var(--vellum-fog); margin-right: auto; }
.d-nav button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(42,33,24,.45); transition: background .15s; }
.d-nav button:hover { background: rgba(42,33,24,.08); }
.d-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.dossier.swap .d-main img, .dossier.swap .d-body > * { animation: rise .45s var(--ease) both; }
.dossier.swap .d-body > * { animation-delay: calc(var(--i, 0) * 50ms); }
.vellum::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(180deg, transparent, rgba(42,33,24,.12)); pointer-events: none; }

/* ── 05 음악 ── */
.tracks { display: grid; gap: 0; border-top: 1px solid var(--gold-dim); max-width: 860px; }
.tracks button { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; min-height: 60px; padding: 8px 4px; text-align: left; border-bottom: 1px solid var(--gold-dim); transition: background .15s; }
.tracks button:hover { background: rgba(201,162,74,.07); }
.tracks .pl { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold); }
.tracks .pl svg { width: 16px; height: 16px; fill: currentColor; }
.tracks b { font: 700 17px/1.3 var(--f-name); display: block; }
.tracks .mono { color: var(--fog); }
.tracks .eq { display: none; }
.tracks button.on b { color: var(--gold-2); }
.tracks button.on .pl { background: var(--gold); color: var(--ink); }
body.playing .tracks button.on .eq { display: inline-flex; }
.eq { gap: 3px; align-items: flex-end; height: 16px; }
.eq i { width: 3px; height: 100%; background: var(--gold); animation: eq 1s ease-in-out infinite; transform-origin: bottom; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%,100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ── 푸터 ── */
.foot { position: relative; z-index: 1; padding: 56px var(--pad) 40px; text-align: center; border-top: 1px solid var(--gold-dim); color: var(--fog); font-size: 14px; display: grid; justify-items: center; gap: 12px; background: var(--ink); }
.foot-ic { width: 32px; height: 32px; color: var(--gold); }

/* ── 미니 플레이어 ── */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; height: 64px; padding: 0 var(--pad) env(safe-area-inset-bottom); display: flex; align-items: center; gap: 8px;
  background: rgba(13,12,11,.94); backdrop-filter: blur(6px); border-top: 1px solid rgba(201,162,74,.3); }
.p-prog { position: absolute; left: 0; right: 0; top: -7px; height: 14px; cursor: pointer; }
.p-prog i { position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: rgba(201,162,74,.2); }
.p-prog i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.pbtn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--bone); flex: none; border-radius: 999px; transition: color .15s, background .15s; }
.pbtn:hover { color: var(--gold-2); }
.pbtn svg { width: 20px; height: 20px; fill: currentColor; }
#p-mute svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
#p-mute[aria-pressed="true"] #p-wave { opacity: 0; }
#p-mute[aria-pressed="true"] { color: var(--brand); }
.pbtn-main { border: 1px solid var(--gold); color: var(--gold); }
.pbtn-main:hover { background: var(--gold); color: var(--ink); }
.p-meta { min-width: 0; flex: 1; display: grid; line-height: 1.3; padding-left: 4px; }
.p-meta b { font: 700 15px/1.3 var(--f-name); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-meta .mono { color: var(--fog); font-size: 11px; }

/* ── 라이트박스 ── */
#lb { position: fixed; inset: 0; z-index: 250; background: rgba(8,7,6,.94); display: grid; place-items: center; padding: 56px 16px 80px; }
#lb[hidden] { display: none; }
#lb img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; object-fit: contain; border: 1px solid var(--gold-dim); }
#lb-x { position: absolute; right: 16px; top: 12px; }

/* ── 반응형 ── */
@media (min-width: 640px) {
  .places { grid-template-columns: 1fr 1fr; }
  .choices { grid-template-columns: repeat(3, 1fr); }
  .timeline li { grid-template-columns: 120px 200px 1fr; align-items: baseline; padding-left: 36px; }
  .timeline li::after { top: 26px; }
  .d-body { padding: 32px 32px 32px; }
}
@media (min-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .poster { order: 2; }
  .hero-copy { order: 1; }
  .places { grid-template-columns: repeat(3, 1fr); }
  .place:first-child { grid-column: span 2; grid-row: span 2; min-height: 496px; }
  .two { grid-template-columns: 1fr 1fr; align-items: start; }
  .scale-wrap { grid-template-columns: 5fr 6fr; }
  .dossier { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .d-img { padding: 24px; }
  .d-body { padding: 40px 48px 40px 32px; }
  .d-stamp { width: 96px; height: 96px; }
  .rail button { width: 92px; }
  .rail .ph { width: 76px; height: 76px; }
}
@media (min-width: 1440px) {
  .wrap { max-width: 1280px; }
}
@media (max-width: 520px) {
  .top { gap: 8px; }
  .logo span { display: none; }
  #nav a { padding: 0 9px; font-size: 13px; }
  .ribbon { padding: 12px 26px 14px; }
  .p-time-hide { display: none; }
  .d-stamp { width: 72px; height: 72px; }
  .d-stamp b { font-size: 14px; }
  .hero-cta .btn { width: 100%; }
}

/* ── 움직임 줄이기 ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  #rain { display: none; }
  .balance, .balance.tl, .balance.tr { --t: 0deg; }
  .reveal.pre { opacity: 1; transform: none; }
}
main:focus { outline: none; }
#scale.sec-bg::before { opacity: .14; }
