/* ───────────────── 멀티버스 아카이브 · 공통 스타일 ───────────────── */
:root {
  --bg: #06070a;
  --surface: #0c0e13;
  --surface-2: #12151c;
  --surface-3: #191d26;
  --line: rgba(232, 226, 214, 0.08);
  --line-2: rgba(232, 226, 214, 0.15);
  --text: #ebe6dc;
  --muted: #a0a3ab;
  --dim: #666a73;
  --accent: #e5484d;
  --f-sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  --f-disp: 'Archivo', var(--f-sans);
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-h: 64px;
  --wrap: 1240px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--f-sans); font-size: 16px; line-height: 1.6; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
img, svg, canvas { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
kbd { font-family: var(--f-mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); }
::selection { background: rgba(229, 72, 77, .35); }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.mono { font-family: var(--f-mono); }
.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
[hidden] { display: none !important; }
.i18n-pending body { visibility: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 헤더 */
.nx-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 24px; padding: 0 24px;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nx-header.is-scrolled, body:not([data-page="home"]) .nx-header {
  background: rgba(6, 7, 10, .86); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nx-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; white-space: nowrap; }
.nx-logo svg { width: 26px; height: 26px; fill: none; stroke: var(--text); stroke-width: 1.4; }
.nx-logo svg circle { fill: var(--accent); stroke: none; }
.nx-nav { display: flex; gap: 4px; margin-left: 8px; }
.nx-nav a { padding: 8px 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--muted); transition: color .2s, background .2s; }
.nx-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nx-nav a.is-active { color: var(--text); background: rgba(255, 255, 255, .07); }
.nx-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nx-search-btn {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 13px; color: var(--muted);
  transition: border-color .2s, color .2s;
}
.nx-search-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.nx-search-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.nx-spoiler {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid var(--line-2);
  max-width: 260px; transition: border-color .2s, background .2s;
}
.nx-spoiler-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-spoiler:hover { border-color: rgba(255, 255, 255, .3); }
.nx-lang { display: flex; align-items: center; height: 36px; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 12px; font-weight: 600; gap: 2px; }
.nx-lang:hover { border-color: rgba(255, 255, 255, .3); }
.nx-lang span { display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 4px; color: var(--dim); transition: background .2s, color .2s; }
.nx-lang span.is-on { background: rgba(255, 255, 255, .1); color: var(--text); }
html[lang="en"] .spoiler-list .is-current::after { content: 'Seen up to here'; }
.nx-spoiler-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; transition: background .2s; }
.nx-spoiler.is-on { border-color: rgba(229, 72, 77, .5); background: rgba(229, 72, 77, .1); }
.nx-spoiler.is-on .nx-spoiler-dot { background: var(--accent); }
.nx-menu-btn { display: none; width: 36px; height: 36px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nx-menu-btn span { width: 18px; height: 1.5px; background: var(--text); transition: transform .25s var(--ease); }
.menu-open .nx-menu-btn span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-open .nx-menu-btn span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 900px) {
  .nx-header { gap: 12px; padding: 0 16px; }
  .nx-logo span { display: none; }
  .nx-search-btn span, .nx-search-btn kbd { display: none; }
  .nx-search-btn { width: 36px; padding: 0; justify-content: center; }
  .nx-spoiler { max-width: 170px; padding: 0 12px; }
  .nx-menu-btn { display: flex; }
  .nx-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: rgba(6, 7, 10, .97); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
  }
  .nx-nav a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu-open .nx-nav { opacity: 1; transform: none; pointer-events: auto; }
  .menu-open { background: rgba(6, 7, 10, .97) !important; }
}

/* ── 버튼 · 칩 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: var(--r-sm); font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .2s var(--ease), color .2s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--text); color: #0a0a0a; }
.btn-primary:hover { background: #fff; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .03); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn:active { transform: scale(.98); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--muted); flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.u-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px;
  border-radius: 999px; font-family: var(--f-mono); font-size: 11.5px; color: var(--uc);
  background: color-mix(in srgb, var(--uc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--uc) 30%, transparent);
  white-space: nowrap;
}
.u-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--uc); }
.u-chip.sm { height: 20px; font-size: 10.5px; padding: 0 7px 0 6px; }
.rel-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px;
  font-size: 12px; font-weight: 600; color: var(--rc); background: color-mix(in srgb, var(--rc) 13%, transparent);
  white-space: nowrap;
}
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, .05); white-space: nowrap; }
.tag.dead { color: #ffb4b4; background: rgba(255, 90, 90, .1); }
.tag.lock { color: #f5c26b; background: rgba(245, 165, 36, .1); }

.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 8px; gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border-radius: 5px; font-size: 13px; color: var(--muted); transition: background .2s, color .2s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .1); color: var(--text); }

.toggle-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 13px; color: var(--muted); transition: all .2s;
}
.toggle-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--tc, #fff); opacity: .35; transition: opacity .2s; }
.toggle-chip[aria-pressed="true"] { color: var(--text); border-color: color-mix(in srgb, var(--tc, #fff) 45%, transparent); background: color-mix(in srgb, var(--tc, #fff) 9%, transparent); }
.toggle-chip[aria-pressed="true"] i { opacity: 1; }

.field {
  height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; outline: none; transition: border-color .2s; min-width: 0;
}
.field:focus { border-color: rgba(255, 255, 255, .4); }

/* ── 다이얼로그 */
.nx-dialog {
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--text);
  padding: 0; max-width: min(640px, calc(100vw - 32px)); width: 100%; max-height: min(760px, calc(100vh - 48px));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.nx-dialog[open] { display: flex; flex-direction: column; animation: dlg-in .32s var(--ease-out); }
.nx-dialog::backdrop { background: rgba(3, 4, 6, .72); backdrop-filter: blur(4px); animation: fade-in .25s; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }
.dlg-head { display: flex; gap: 16px; align-items: flex-start; padding: 24px 24px 16px; }
.dlg-head h2 { font-size: 22px; margin-bottom: 6px; }
.dlg-head p { color: var(--muted); font-size: 14px; }
.dlg-tools { display: flex; gap: 8px; padding: 0 24px 16px; border-bottom: 1px solid var(--line); }
.dlg-tools .field { flex: 1; }
.spoiler-list { overflow-y: auto; padding: 8px 12px 16px; overscroll-behavior: contain; }
.spoiler-list .yr { font-family: var(--f-mono); font-size: 12px; color: var(--dim); padding: 14px 12px 6px; }
.spoiler-list button {
  width: 100%; display: grid; grid-template-columns: 32px 1fr auto 64px; gap: 12px; align-items: center;
  text-align: left; padding: 10px 12px; border-radius: 8px; transition: background .15s; position: relative;
}
.spoiler-list button:hover { background: rgba(255, 255, 255, .05); }
.spoiler-list .sp-idx { font-family: var(--f-mono); font-size: 12px; color: var(--dim); }
.spoiler-list .sp-t { font-weight: 600; font-size: 15px; }
.spoiler-list .sp-u { font-size: 12px; color: var(--uc); }
.spoiler-list .sp-d { font-family: var(--f-mono); font-size: 12px; color: var(--muted); text-align: right; }
.spoiler-list .is-after { opacity: .38; }
.spoiler-list .is-current { background: rgba(229, 72, 77, .14); box-shadow: inset 0 0 0 1px rgba(229, 72, 77, .5); }
.spoiler-list .is-current::after { content: '여기까지 봤어요'; position: absolute; right: 88px; font-size: 11px; color: #ff9da0; }

.nx-search-dlg { max-width: min(600px, calc(100vw - 32px)); margin-top: 12vh; }
.search-box { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.search-box svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.search-box input { flex: 1; height: 56px; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 17px; }
.search-results { overflow-y: auto; padding: 8px; max-height: 60vh; }
.search-results a { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; }
.search-results a.is-sel, .search-results a:hover { background: rgba(255, 255, 255, .06); }
.sr-kind { font-size: 11px; color: var(--uc); font-weight: 600; }
.sr-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-sub { font-size: 12px; color: var(--muted); font-family: var(--f-mono); }
.search-results .empty, .empty { padding: 24px 16px; color: var(--muted); font-size: 14px; text-align: center; }

.nx-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 18px; border-radius: 10px; background: #eee9df; color: #111; font-size: 14px; font-weight: 600;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transition: opacity .25s, transform .35s var(--ease-out); pointer-events: none;
}
.nx-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── 공통 레이아웃 */
.page-head { padding: calc(var(--header-h) + 56px) 0 32px; position: relative; }
.page-head .eyebrow { font-family: var(--f-mono); font-size: 12px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.page-head .eyebrow::before { content: ''; width: 18px; height: 1px; background: var(--accent); }
.page-head h1 { font-size: clamp(36px, 5.6vw, 68px); font-weight: 800; letter-spacing: -0.04em; }
.page-head p.lead { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 620px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toolbar .tb-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar .tb-label { font-size: 12px; color: var(--dim); margin-right: 4px; }
.spoiler-note { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #f5c26b; }
.spoiler-note button { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }

.nx-footer { border-top: 1px solid var(--line); padding: 32px 24px 48px; font-size: 13px; color: var(--muted); display: grid; gap: 6px; text-align: center; }
.nx-footer strong { color: var(--text); }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; transform: none; }

.webgl-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 24px; }

/* ───────────────── 홈 ───────────────── */
.hero { position: relative; height: 100vh; min-height: 640px; overflow: hidden; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-labels { position: absolute; inset: 0; pointer-events: none; }
.hero-label {
  position: absolute; left: 0; top: 0; pointer-events: auto; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; white-space: nowrap;
  transition: opacity .3s;
}
.hero-label b { font-family: var(--f-mono); font-size: 11px; font-weight: 500; color: var(--uc); }
.hero-label span { font-size: 12px; color: rgba(235, 230, 220, .75); }
.hero-label span { opacity: 0; transform: translateY(-3px); transition: opacity .25s, transform .25s var(--ease); }
.hero-label.is-hover span { color: #fff; opacity: 1; transform: none; }
.hero-inner {
  position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: clamp(48px, 9vh, 96px); pointer-events: none;
}
.hero-inner > * { pointer-events: auto; }
.hero-kicker { font-family: var(--f-mono); font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-kicker span { display: inline-flex; align-items: center; gap: 8px; }
.hero-kicker span + span::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--dim); }
.hero h1 { font-size: clamp(52px, 10.5vw, 156px); font-weight: 800; letter-spacing: -0.055em; line-height: .92; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.1s var(--ease-out) forwards; animation-delay: var(--d, 0s); }
.hero h1 .en { font-family: var(--f-disp); font-stretch: 125%; font-weight: 300; font-size: .26em; letter-spacing: -0.01em; color: var(--muted); display: block; margin-bottom: .5em; }
@keyframes rise { to { transform: none; } }
html[lang="en"] .hero h1 .en { display: none; }
.hero-sub { margin-top: 24px; max-width: 520px; color: var(--muted); font-size: 17px; opacity: 0; animation: fade-up 1s var(--ease-out) .7s forwards; }
.hero-cta { margin-top: 28px; display: flex; gap: 10px; flex-wrap: wrap; opacity: 0; animation: fade-up 1s var(--ease-out) .85s forwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-scroll { position: absolute; right: 24px; bottom: 32px; z-index: 2; font-family: var(--f-mono); font-size: 11px; color: var(--dim); writing-mode: vertical-rl; display: flex; align-items: center; gap: 12px; }
.hero-scroll::after { content: ''; width: 1px; height: 56px; background: linear-gradient(var(--dim), transparent); animation: scroll-line 2s var(--ease) infinite; transform-origin: top; }
@keyframes scroll-line { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.section { padding: 112px 0; position: relative; }
.section-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 40px; }
.section-head .num { font-family: var(--f-mono); font-size: 12px; color: var(--accent); margin-bottom: 12px; }
.section-head h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -0.04em; }
.section-head p { color: var(--muted); margin-top: 12px; max-width: 560px; }

/* 우주 카드 */
.u-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; perspective: 1200px; }
.u-card {
  --rx: 0deg; --ry: 0deg;
  position: relative; min-height: 230px; padding: 20px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease-out), border-color .3s;
}
.u-card.is-tilt { transition: transform .08s linear, border-color .3s; }
.u-card:hover { border-color: color-mix(in srgb, var(--uc) 45%, transparent); }
.u-card .orb {
  position: absolute; right: -40px; top: -40px; width: 170px; height: 170px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--uc) 40%, transparent);
  transform: translateZ(30px);
}
.u-card .orb::before, .u-card .orb::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--uc) 25%, transparent); }
.u-card .orb::after { inset: 56px; background: var(--uc); opacity: .9; border: 0; filter: blur(.3px); box-shadow: 0 0 40px color-mix(in srgb, var(--uc) 70%, transparent); }
.u-card .orb { animation: orb-spin 18s linear infinite; }
.u-card .orb::before { border-style: dashed; }
@keyframes orb-spin { to { rotate: 360deg; } }
.u-card .code { font-family: var(--f-mono); font-size: 12px; color: var(--uc); transform: translateZ(20px); }
.u-card h3 { margin-top: auto; font-size: 20px; transform: translateZ(40px); }
.u-card p { font-size: 13px; color: var(--muted); margin-top: 8px; transform: translateZ(25px); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.u-card .stats { display: flex; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); transform: translateZ(15px); }
.u-card .stats b { color: var(--text); font-family: var(--f-mono); font-weight: 500; margin-right: 4px; }

/* 기능 카드 */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.feat {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; min-height: 320px; padding: 28px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: border-color .3s, background .3s;
}
.feat:hover { border-color: var(--line-2); background: var(--surface-2); }
.feat .f-num { font-family: var(--f-mono); font-size: 12px; color: var(--dim); }
.feat h3 { font-size: 26px; margin-top: 8px; }
.feat p { color: var(--muted); font-size: 15px; margin-top: 10px; max-width: 360px; }
.feat .f-go { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-top: 20px; }
.feat .f-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .3s var(--ease); }
.feat:hover .f-go svg { transform: translateX(4px); }
.feat .f-vis { position: absolute; right: 24px; top: 24px; bottom: 24px; width: 46%; perspective: 600px; pointer-events: none; }
/* 미니 3D 비주얼들 */
.vis-films { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(18deg) rotateY(-28deg); }
.vis-films span {
  position: absolute; right: 10%; top: 12%; width: 46%; aspect-ratio: 2/3; border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .14); background: var(--surface-3);
  transform: translateZ(calc(var(--i) * -38px)) translateX(calc(var(--i) * -22px));
  transition: transform .7s var(--ease-out);
}
.vis-films span::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: 12%; height: 3px; border-radius: 2px; background: var(--c); }
.feat:hover .vis-films span { transform: translateZ(calc(var(--i) * -52px)) translateX(calc(var(--i) * -40px)) rotateY(calc(var(--i) * 4deg)); }
.vis-time { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(62deg) rotateZ(-28deg); }
.vis-time i { position: absolute; left: 50%; top: 50%; width: 80%; height: 2px; translate: -50% -50%; background: var(--c); opacity: .6; transform: translateY(calc(var(--i) * 26px - 52px)); }
.vis-time b { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 18px var(--c); left: var(--x); top: calc(50% + var(--i) * 26px - 59px); transform: translateZ(14px); animation: bob 3s var(--ease) infinite alternate; animation-delay: calc(var(--i) * -.6s); }
@keyframes bob { to { transform: translateZ(34px); } }
.vis-graph { position: absolute; inset: 0; transform-style: preserve-3d; animation: spin-y 14s linear infinite; }
.vis-graph b { position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border-radius: 50%; background: var(--c); box-shadow: 0 0 16px var(--c); transform: translate3d(var(--x), var(--y), var(--z)); }
@keyframes spin-y { to { transform: rotateY(360deg); } }
.vis-char { position: absolute; inset: 0; display: grid; place-items: center; transform-style: preserve-3d; }
.vis-char i { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); transform: rotateX(70deg) rotateZ(0deg); animation: ring 9s linear infinite; animation-duration: var(--t); }
.vis-char i::before { content: ''; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.vis-char b { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--accent) 45%, #5a0c10); box-shadow: 0 0 40px rgba(229, 72, 77, .6); }
@keyframes ring { to { transform: rotateX(70deg) rotateZ(360deg); } }

/* 사건 스트립 */
.ev-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ev-card {
  scroll-snap-align: start; position: relative; display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 220px;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color .3s, transform .4s var(--ease-out);
}
.ev-card:hover { border-color: color-mix(in srgb, var(--uc) 45%, transparent); transform: translateY(-3px); }
.ev-card .ev-year { font-family: var(--f-disp); font-stretch: 125%; font-weight: 800; font-size: 44px; line-height: 1; color: var(--uc); letter-spacing: -0.03em; }
.ev-card h3 { font-size: 18px; }
.ev-card p { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ev-card .ev-film { margin-top: auto; font-size: 12px; color: var(--dim); }

.spoiler-band { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; padding: 48px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.spoiler-band h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.035em; }
.spoiler-band p { color: var(--muted); margin-top: 14px; }
.spoiler-band .btn { margin-top: 24px; }
.sb-demo { display: grid; gap: 8px; }
.sb-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; transition: filter .5s, opacity .5s; }
.sb-row .mono { font-size: 12px; color: var(--dim); width: 52px; }
.sb-row.is-hidden { filter: blur(5px); opacity: .45; }
.sb-row .rel-chip { margin-left: auto; }

/* ───────────────── 영화 ───────────────── */
.film-groups { padding: 32px 0 96px; }
.film-group { margin-top: 56px; }
.film-group:first-child { margin-top: 24px; }
.fg-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.fg-head .fg-num { font-family: var(--f-disp); font-stretch: 125%; font-weight: 800; font-size: 64px; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--gc, var(--line-2)); letter-spacing: -0.03em; }
.fg-head h2 { font-size: 26px; }
.fg-head .fg-meta { color: var(--muted); font-size: 14px; }
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px 16px; perspective: 1400px; }
.poster {
  --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%;
  position: relative; text-align: left; display: block; width: 100%;
  transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--ease-out);
}
.poster.is-tilt { transition: transform .08s linear; }
.poster-face {
  position: relative; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; transform-style: preserve-3d;
  background: color-mix(in srgb, var(--uc) 9%, #0b0c10); border: 1px solid color-mix(in srgb, var(--uc) 22%, transparent);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
  transition: box-shadow .4s, border-color .3s;
}
.poster:hover .poster-face { border-color: color-mix(in srgb, var(--uc) 55%, transparent); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px color-mix(in srgb, var(--uc) 20%, transparent); }
.poster-face svg.motif { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(10px); }
.poster-face .p-idx { position: absolute; top: 12px; left: 14px; font-family: var(--f-mono); font-size: 11px; color: color-mix(in srgb, var(--uc) 80%, #fff); transform: translateZ(30px); }
.poster-face .p-ph { position: absolute; top: 12px; right: 14px; font-family: var(--f-mono); font-size: 11px; color: var(--muted); transform: translateZ(30px); }
.poster-face .p-title { position: absolute; left: 14px; right: 14px; bottom: 44px; font-size: 19px; font-weight: 800; line-height: 1.18; letter-spacing: -0.035em; transform: translateZ(50px); text-wrap: balance; }
.poster-face .p-en { position: absolute; left: 14px; right: 14px; bottom: 16px; font-family: var(--f-disp); font-stretch: 112%; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translateZ(25px); }
.poster-face .glare { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .16), transparent 55%); opacity: 0; transition: opacity .3s; pointer-events: none; transform: translateZ(60px); }
.poster:hover .glare { opacity: 1; }
.poster-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.poster-meta .mono { color: var(--dim); }
.poster.is-locked .poster-face { filter: saturate(.2) brightness(.6); }
.poster.is-locked .p-lock { position: absolute; top: 36px; left: 14px; transform: translateZ(40px); }
.poster.is-upcoming .poster-face { border-style: dashed; }
.film-grid .poster { opacity: 0; transform: translateY(40px) rotateX(-25deg); }
.film-grid .poster.is-in { opacity: 1; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: opacity .7s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
.film-grid .poster.is-in.is-tilt { transition: transform .08s linear; transition-delay: 0s; }

/* 드로어 */
.drawer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.drawer::before { content: ''; position: absolute; inset: 0; background: rgba(3, 4, 6, .6); opacity: 0; transition: opacity .3s; }
.drawer.is-open { pointer-events: auto; }
.drawer.is-open::before { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--surface);
  border-left: 1px solid var(--line-2); overflow-y: auto; transform: translateX(100%); transition: transform .45s var(--ease-out);
  overscroll-behavior: contain;
}
.drawer.is-open .drawer-panel { transform: none; }
.drawer-hero { position: relative; padding: 28px 28px 24px; border-bottom: 1px solid var(--line); overflow: hidden; }
.drawer-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--uc) 22%, transparent), transparent 60%); }
.drawer-hero > * { position: relative; }
.drawer-hero .icon-btn { position: absolute; top: 16px; right: 16px; }
.drawer-hero h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; margin-top: 16px; padding-right: 40px; }
.drawer-hero .en { font-family: var(--f-disp); font-stretch: 112%; color: var(--muted); font-size: 13px; margin-top: 4px; }
.drawer-hero .syn { margin-top: 16px; color: var(--text); font-size: 15px; }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.meta-grid div { background: var(--surface); padding: 14px 16px; }
.meta-grid dt { font-size: 11px; color: var(--dim); margin-bottom: 2px; }
.meta-grid dd { margin: 0; font-size: 14px; font-weight: 600; }
.d-sec { padding: 24px 28px; border-bottom: 1px solid var(--line); }
.d-sec h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 14px; display: flex; justify-content: space-between; }
.d-ev { padding: 12px 0; border-top: 1px solid var(--line); }
.d-ev:first-of-type { border-top: 0; padding-top: 0; }
.d-ev h4 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.d-ev h4 .y { font-family: var(--f-mono); font-size: 12px; color: var(--dim); font-weight: 400; }
.d-ev p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.char-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.char-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; transition: border-color .2s, background .2s; }
.char-pill:hover { border-color: color-mix(in srgb, var(--uc) 50%, transparent); background: var(--surface-3); }
.char-pill i { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0%, var(--uc) 50%, color-mix(in srgb, var(--uc) 40%, #000)); }
.char-pill.is-new { border-color: color-mix(in srgb, var(--uc) 40%, transparent); }
.locked-box { padding: 28px; display: grid; gap: 12px; justify-items: start; }
.locked-box p { color: var(--muted); }

/* ───────────────── 타임라인 ───────────────── */
body[data-page="timeline"] { background: #040508; }
.tl-bar {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 30; display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap;
  padding: 12px 24px; background: rgba(4, 5, 8, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.tl-bar h1 { font-size: 17px; font-weight: 700; margin-right: 8px; }
.tl-bar .lanes { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-bar .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.warp-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.tl-stage { position: fixed; inset: 0; z-index: 1; perspective: 1100px; perspective-origin: 50% 38%; overflow: hidden; pointer-events: none; }
.tl-world { position: absolute; left: 50%; top: 58%; width: 0; height: 0; transform-style: preserve-3d; }
.tl-floor {
  position: absolute; left: 0; top: 0; transform-style: preserve-3d; pointer-events: none;
}
.tl-lane-line { position: absolute; top: 0; width: 2px; transform-origin: 0 0; transform: rotateX(90deg); background: linear-gradient(to bottom, color-mix(in srgb, var(--uc) 80%, transparent), color-mix(in srgb, var(--uc) 10%, transparent)); }
.tl-lane-name { position: absolute; font-family: var(--f-mono); font-size: 13px; color: var(--uc); white-space: nowrap; transform-origin: 50% 50%; }
.tl-card {
  position: absolute; left: 0; top: 0; width: 380px; margin-left: -190px; margin-top: -200px; pointer-events: auto;
  padding: 22px 22px 20px; border-radius: 12px; background: rgba(12, 14, 19, .9); border: 1px solid color-mix(in srgb, var(--uc) 35%, transparent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 60px -20px color-mix(in srgb, var(--uc) 60%, transparent);
  text-align: left; will-change: transform, opacity; backface-visibility: hidden;
  transition: border-color .2s, background .2s;
}
.tl-card:hover { border-color: var(--uc); background: rgba(18, 21, 28, .95); }
.tl-card::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: 190px; background: linear-gradient(color-mix(in srgb, var(--uc) 70%, transparent), transparent); }
.tl-card .tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tl-card .tc-year { font-family: var(--f-disp); font-stretch: 125%; font-weight: 800; font-size: 38px; line-height: 1; color: var(--uc); letter-spacing: -0.03em; }
.tl-card h3 { font-size: 23px; margin-top: 14px; }
.tl-card p { font-size: 16px; color: var(--muted); margin-top: 8px; line-height: 1.55; }
.tl-card .tc-film { font-size: 13.5px; color: var(--dim); margin-top: 12px; }
.tl-card.is-major { width: 430px; margin-left: -215px; }
.tl-card.is-major h3 { font-size: 27px; }
.tl-card.is-major .tc-badge { font-size: 11px; color: #111; background: var(--uc); padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.tl-year-mark { position: absolute; left: 0; top: 0; font-family: var(--f-disp); font-stretch: 125%; font-weight: 900; font-size: 220px; line-height: 1; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px rgba(235, 230, 220, .14); white-space: nowrap; transform-origin: 50% 50%; pointer-events: none; }
.tl-scroller { position: relative; z-index: 0; }
.tl-hud { position: fixed; left: 24px; bottom: 28px; z-index: 5; pointer-events: none; }
.tl-hud .hud-year { font-family: var(--f-disp); font-stretch: 125%; font-weight: 800; font-size: clamp(56px, 8vw, 104px); line-height: .9; letter-spacing: -0.05em; }
.tl-hud .hud-sub { font-size: 13px; color: var(--muted); margin-top: 8px; font-family: var(--f-mono); }
.tl-rail { position: fixed; right: 20px; top: calc(var(--header-h) + 90px); bottom: 32px; width: 56px; z-index: 5; display: flex; flex-direction: column; }
.tl-rail .rail-track { position: relative; flex: 1; border-right: 1px solid var(--line-2); cursor: pointer; }
.tl-rail .rail-tick { position: absolute; right: 0; transform: translateY(-50%); font-family: var(--f-mono); font-size: 10.5px; color: var(--dim); padding-right: 10px; white-space: nowrap; }
.tl-rail .rail-tick::after { content: ''; position: absolute; right: -4px; top: 50%; width: 7px; height: 1px; background: var(--dim); }
.tl-rail .rail-dot { position: absolute; right: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--text); transform: translateY(-50%); box-shadow: 0 0 0 4px rgba(235, 230, 220, .12); }
.tl-intro { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; text-align: center; pointer-events: none; transition: opacity .5s; }
.tl-intro h2 { font-size: clamp(32px, 5vw, 60px); font-weight: 800; letter-spacing: -0.04em; }
.tl-intro p { color: var(--muted); margin-top: 10px; }
.tl-intro .hint { margin-top: 24px; font-family: var(--f-mono); font-size: 12px; color: var(--dim); animation: pulse-y 2s var(--ease) infinite; }
@keyframes pulse-y { 50% { transform: translateY(6px); } }

/* 목록 보기 */
.tl-list { position: relative; z-index: 2; padding: calc(var(--header-h) + 90px) 0 96px; }
.tl-list .yr-block { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.tl-list .yr-block > h2 { font-family: var(--f-disp); font-stretch: 125%; font-weight: 800; font-size: 40px; letter-spacing: -0.04em; position: sticky; top: calc(var(--header-h) + 80px); align-self: start; }
.tl-list .yr-items { display: grid; gap: 10px; }
.tl-item { display: grid; grid-template-columns: 4px 1fr; gap: 16px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; transition: border-color .2s; }
.tl-item:hover { border-color: var(--line-2); }
.tl-item > i { border-radius: 2px; background: var(--uc); }
.tl-item h3 { font-size: 17px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-item p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.tl-item .meta { margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--dim); }

.ev-dlg { max-width: min(560px, calc(100vw - 32px)); }
.ev-dlg .dlg-body { padding: 0 24px 24px; overflow-y: auto; }
.ev-dlg .ev-big-year { font-family: var(--f-disp); font-stretch: 125%; font-weight: 800; font-size: 56px; line-height: 1; color: var(--uc); letter-spacing: -0.04em; }

/* 목록 보기: 가운데 축 연대표 */
.tl-list { max-width: 1080px; }
.tlx-head { text-align: center; padding: 8px 0 40px; }
.tlx-title { display: flex; flex-direction: column; align-items: center; font-family: var(--f-disp); font-stretch: 125%; font-weight: 900; line-height: .9; letter-spacing: -0.01em; }
.tlx-title span:first-child { font-size: clamp(40px, 7vw, 76px); }
.tlx-title span:last-child { font-size: clamp(34px, 6vw, 64px); }
.tlx-kicker { font-family: var(--f-disp); font-stretch: 112%; font-weight: 500; font-size: 20px; letter-spacing: .08em; margin-top: 10px; }
.tlx-head p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.tlx-legend { display: flex; justify-content: center; gap: 120px; margin-top: 18px; font-family: var(--f-mono); font-size: 12px; color: var(--dim); }
.tlx { position: relative; padding: 12px 0 64px; --spine: #e3342f; }
.tlx::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: var(--spine); border-radius: 3px; }
.tlx-row { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; padding: 10px 0; }
.tlx-row.is-zig { margin-top: -30px; }
.tlx-cell { display: flex; align-items: center; gap: 18px; min-width: 0; }
.tlx-row .tlx-cell:first-child { justify-content: flex-end; }
.tlx-tick { flex: none; width: 22px; height: 4px; background: var(--spine); }
.tlx-row .tlx-cell:first-child .tlx-tick { margin-right: -6px; }
.tlx-row .tlx-cell:last-child .tlx-tick { margin-left: -6px; }
.tlx-date { flex: none; font-family: 'Instrument Serif', 'Noto Serif KR', Georgia, serif; font-style: italic; font-size: 21px; color: #f2eee6; white-space: nowrap; }
.tlx-item { display: flex; flex-direction: column; gap: 4px; max-width: 340px; padding: 6px 4px; text-align: center; align-items: center; transition: transform .35s var(--ease-out); }
.tlx-row .tlx-cell:first-child .tlx-item:hover { transform: translateX(-4px); }
.tlx-row .tlx-cell:last-child .tlx-item:hover { transform: translateX(4px); }
.tlx-logo { display: block; line-height: 1.02; text-wrap: balance; transition: filter .25s, text-shadow .25s; }
.tlx-item:hover .tlx-logo { filter: brightness(1.25); }
.tlx-sub { display: flex; gap: 8px; align-items: baseline; justify-content: center; flex-wrap: wrap; font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--uc) 75%, #fff); }
.tlx-sub i { font-style: normal; font-family: var(--f-mono); font-weight: 400; color: var(--dim); font-size: 10.5px; }
/* 제목 스타일 4종: 영화마다 하나씩 */
.tlx-item.s0 .tlx-logo { font-family: var(--f-disp), var(--f-sans); font-stretch: 62%; font-weight: 900; font-size: 30px; letter-spacing: .02em; text-transform: uppercase; color: color-mix(in srgb, var(--uc) 30%, #f4efe6); text-shadow: 0 2px 0 color-mix(in srgb, var(--uc) 45%, #000), 0 0 22px color-mix(in srgb, var(--uc) 35%, transparent); }
.tlx-item.s1 .tlx-logo { font-family: var(--f-disp), var(--f-sans); font-stretch: 125%; font-weight: 300; font-size: 24px; letter-spacing: .22em; text-transform: uppercase; color: #dcdce2; text-shadow: 0 0 14px rgba(255, 255, 255, .15); }
.tlx-item.s2 .tlx-logo { font-family: 'Noto Serif KR', Georgia, serif; font-weight: 900; font-size: 26px; letter-spacing: .06em; text-transform: uppercase; color: var(--uc); text-shadow: 0 1px 0 rgba(0, 0, 0, .8), 0 0 18px color-mix(in srgb, var(--uc) 40%, transparent); }
.tlx-item.s3 .tlx-logo { font-family: var(--f-disp), var(--f-sans); font-stretch: 100%; font-style: italic; font-weight: 900; font-size: 30px; letter-spacing: -0.02em; text-transform: uppercase; color: color-mix(in srgb, var(--uc) 85%, #fff); transform: skewX(-6deg); text-shadow: 0 2px 0 color-mix(in srgb, var(--uc) 35%, #000); }
.tlx-item.is-major .tlx-logo { font-size: 1.28em; }
.tlx-item.s0.is-major .tlx-logo, .tlx-item.s3.is-major .tlx-logo { font-size: 38px; }
.tlx-item.s1.is-major .tlx-logo { font-size: 30px; }
.tlx-item.s2.is-major .tlx-logo { font-size: 33px; }
.tlx-item.is-target .tlx-logo { animation: tlx-flash 2.4s var(--ease); }
@keyframes tlx-flash { 0%, 60% { filter: brightness(1.6) drop-shadow(0 0 12px var(--uc)); } }
.tlx-era { position: relative; left: 50%; width: 100vw; margin: 22px 0 22px -50vw; padding: 12px 0; border-top: 5px solid var(--spine); border-bottom: 5px solid var(--spine); text-align: center; }
.tlx-era span { position: relative; font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-size: clamp(30px, 4vw, 42px); color: #f2eee6; padding: 0 14px; text-shadow: 0 0 10px #000, 0 0 2px #000; }
.tlx-era + .tlx-row.is-zig, .tlx-era + .tlx-row { margin-top: 0; }
@media (max-width: 760px) {
  .tlx::before { left: 18px; }
  .tlx-row, .tlx-row.is-zig { grid-template-columns: 1fr; margin-top: 0; padding: 12px 0 12px 18px; }
  .tlx-row .tlx-cell:empty { display: none; }
  .tlx-cell, .tlx-row .tlx-cell:first-child { justify-content: flex-start; flex-wrap: wrap; gap: 4px 12px; }
  .tlx-row .tlx-cell:first-child .tlx-tick, .tlx-row .tlx-cell:last-child .tlx-tick { order: -2; margin: 0 0 0 -3px; }
  .tlx-date { order: -1; font-size: 18px; }
  .tlx-item { align-items: flex-start; text-align: left; flex-basis: 100%; padding-left: 34px; }
  .tlx-sub { justify-content: flex-start; }
  .tlx-legend { display: none; }
  .tlx-item.s0 .tlx-logo, .tlx-item.s3 .tlx-logo { font-size: 24px; }
}

/* ───────────────── 관계도 ───────────────── */
body[data-page="graph"] { overflow: hidden; height: 100vh; }
.graph-wrap { position: fixed; inset: 0; }
.graph-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.graph-canvas.is-hover { cursor: pointer; }
.graph-canvas:active { cursor: grabbing; }
.g-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.g-label {
  position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; font-weight: 600; color: #fff;
  text-shadow: 0 1px 2px #000, 0 0 8px #000; padding: 1px 6px; border-radius: 4px; will-change: transform, opacity;
}
.g-label small { font-weight: 400; color: rgba(255, 255, 255, .6); margin-left: 4px; font-size: 11px; }
.g-label.is-focus { background: rgba(0, 0, 0, .65); text-shadow: none; box-shadow: 0 0 0 1px var(--uc); }
.g-label.is-dead::after { content: ' †'; color: #ff9b9b; font-weight: 400; }
.g-panel {
  position: absolute; top: calc(var(--header-h) + 16px); left: 16px; width: 280px; max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto; padding: 18px; border-radius: var(--r-lg); background: rgba(10, 12, 16, .88); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 5; scrollbar-width: thin;
}
.g-panel h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; }
.g-panel .g-count { font-size: 12px; color: var(--muted); margin-top: 6px; font-family: var(--f-mono); }
.g-panel h2 { font-size: 12px; color: var(--dim); font-weight: 600; margin: 20px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.g-panel h2 button { font-size: 11px; color: var(--muted); font-weight: 500; }
.g-panel h2 button:hover { color: var(--text); }
.g-panel .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.g-panel .toggle-chip { height: 28px; font-size: 12px; padding: 0 10px; }
.g-panel .field { width: 100%; margin-top: 16px; }
.g-panel .g-collapse { display: none; }
.g-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 4; font-size: 12px; color: var(--dim); font-family: var(--f-mono); white-space: nowrap; pointer-events: none; }
.g-detail {
  position: absolute; top: calc(var(--header-h) + 16px); right: 16px; width: 340px; max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto; border-radius: var(--r-lg); background: rgba(10, 12, 16, .92); border: 1px solid var(--line-2);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 6; transform: translateX(calc(100% + 24px)); transition: transform .45s var(--ease-out);
  scrollbar-width: thin;
}
.g-detail.is-open { transform: none; }
.g-detail .gd-head { position: relative; padding: 20px 20px 16px; border-bottom: 1px solid var(--line); overflow: hidden; }
.g-detail .gd-head::before { content: ''; position: absolute; inset: 0; background: radial-gradient(100% 120% at 100% 0%, color-mix(in srgb, var(--uc) 25%, transparent), transparent 65%); }
.g-detail .gd-head > * { position: relative; }
.g-detail .gd-head .icon-btn { position: absolute; top: 12px; right: 12px; }
.g-detail h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.035em; margin-top: 12px; }
.g-detail .alias { color: var(--muted); font-size: 14px; margin-top: 2px; }
.g-detail .bio { font-size: 14px; color: var(--muted); margin-top: 12px; }
.g-detail .gd-body { padding: 8px 20px 20px; }
.g-detail .gd-group { margin-top: 14px; }
.g-detail .gd-group h3 { font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--rc); }
.g-rel { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 8px 6px; border-radius: 8px; width: 100%; text-align: left; transition: background .15s; }
.g-rel:hover { background: rgba(255, 255, 255, .05); }
.g-rel i { width: 10px; height: 10px; border-radius: 50%; background: var(--uc); margin-top: 6px; }
.g-rel b { font-size: 14px; font-weight: 600; display: block; }
.g-rel span { font-size: 12.5px; color: var(--muted); display: block; }
.g-detail .gd-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.g-detail .gd-foot .btn { flex: 1; }
.g-legend { position: absolute; right: 16px; bottom: 16px; z-index: 4; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; max-width: 460px; padding: 10px 14px; border-radius: 10px; background: rgba(10, 12, 16, .7); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend i { width: 14px; height: 2px; border-radius: 1px; background: var(--c); }
.g-legend i.dash { background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 6px); opacity: .7; }
.g-loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; color: var(--muted); font-family: var(--f-mono); font-size: 13px; transition: opacity .6s; }

@media (max-width: 900px) {
  .g-panel { width: auto; right: 16px; max-height: 50vh; padding: 14px; }
  .g-panel .g-collapse { display: inline-flex; position: absolute; top: 10px; right: 10px; }
  .g-panel.is-collapsed .g-body { display: none; }
  .g-detail { top: auto; bottom: 0; right: 0; left: 0; width: auto; max-height: 62vh; border-radius: 16px 16px 0 0; transform: translateY(105%); }
  .g-legend { display: none; }
  .g-hint { display: none; }
}

/* ───────────────── 인물 ───────────────── */
.dir-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dir-tools .field { width: 280px; }
.dir-group { margin-top: 48px; }
.dir-group .fg-head .fg-num { font-size: 15px; -webkit-text-stroke: 0; color: var(--gc); font-family: var(--f-mono); font-weight: 500; line-height: 1.6; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; perspective: 1000px; }
.c-card {
  --rx: 0deg; --ry: 0deg;
  position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 14px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease-out), border-color .25s, background .25s;
}
.c-card.is-tilt { transition: transform .08s linear, border-color .25s; }
.c-card:hover { border-color: color-mix(in srgb, var(--uc) 45%, transparent); background: var(--surface-2); }
.c-card .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #0b0b0b;
  background: radial-gradient(circle at 32% 30%, #fff 0%, var(--uc) 55%, color-mix(in srgb, var(--uc) 35%, #000) 100%); box-shadow: 0 0 24px -6px var(--uc); }
.c-card.is-dead .av { filter: grayscale(.75) brightness(.8); }
.c-card b { display: block; font-size: 15px; }
.c-card span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-card .dead { font-style: normal; position: absolute; top: 10px; right: 12px; font-size: 11px; color: #ff9b9b; }

.ch-hero { position: relative; min-height: 640px; padding-top: var(--header-h); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px; }
.ch-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 70% at 72% 45%, color-mix(in srgb, var(--uc) 14%, transparent), transparent 70%); pointer-events: none; }
.ch-info { position: relative; z-index: 2; padding: 48px 0; }
.ch-info .crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: center; margin-bottom: 24px; }
.ch-info .crumbs a:hover { color: var(--text); }
.ch-info h1 { font-size: clamp(44px, 6.4vw, 88px); font-weight: 800; letter-spacing: -0.05em; line-height: .98; margin-top: 18px; }
.ch-info .ch-alias { font-size: 22px; color: var(--uc); font-weight: 600; margin-top: 10px; letter-spacing: -0.02em; }
.ch-info .ch-bio { margin-top: 20px; font-size: 17px; color: var(--muted); max-width: 480px; }
.ch-info .ch-status { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.ch-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 36px; margin-top: 32px; }
.ch-stats b { display: block; font-family: var(--f-disp); font-stretch: 125%; font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -0.04em; }
.ch-stats span { font-size: 13px; color: var(--muted); }
.ch-3d { position: relative; height: min(640px, 80vh); }
.ch-3d canvas { width: 100%; height: 100%; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 62%, transparent 100%); }
.ch-3d .orbit-labels { position: absolute; inset: 0; pointer-events: none; }
.orbit-label { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: rgba(6, 7, 10, .6); border: 1px solid color-mix(in srgb, var(--rc) 50%, transparent); color: #fff; transition: background .2s; will-change: transform; }
.orbit-label:hover { background: color-mix(in srgb, var(--rc) 30%, #06070a); }
.ch-3d .orbit-legend { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; justify-content: center; width: 100%; }
.ch-3d .orbit-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ch-3d .orbit-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.ch-body { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; padding: 32px 0 96px; }
.ch-sec + .ch-sec { margin-top: 48px; }
.ch-sec > h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.rel-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; transition: background .2s; }
.rel-row:hover { background: var(--surface); }
.rel-row .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #0b0b0b;
  background: radial-gradient(circle at 32% 30%, #fff 0%, var(--uc) 55%, color-mix(in srgb, var(--uc) 35%, #000) 100%); }
.rel-row b { font-size: 15px; display: block; }
.rel-row .note { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.rel-row .hist { display: flex; gap: 4px; align-items: center; margin-top: 6px; flex-wrap: wrap; font-size: 11px; color: var(--dim); }
.rel-row .hist .rel-chip { height: 18px; font-size: 11px; padding: 0 6px; }
.rel-row .chips { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.film-list { display: grid; gap: 2px; }
.film-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; transition: background .2s; }
.film-row:hover { background: var(--surface); }
.film-row .mono { font-size: 12px; color: var(--dim); }
.film-row b { font-weight: 600; font-size: 14.5px; }
.film-row .first { font-size: 11px; color: var(--uc); }
.ev-mini { position: relative; padding: 0 0 20px 22px; border-left: 1px solid var(--line-2); }
.ev-mini::before { content: ''; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--uc); box-shadow: 0 0 10px var(--uc); }
.ev-mini:last-child { padding-bottom: 0; }
.ev-mini .y { font-family: var(--f-mono); font-size: 12px; color: var(--dim); }
.ev-mini h3 { font-size: 16px; margin-top: 2px; }
.ev-mini p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.var-grid { display: grid; gap: 10px; }
.var-card { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: center; padding: 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--uc) 30%, transparent); background: color-mix(in srgb, var(--uc) 6%, var(--surface)); overflow: hidden; transition: transform .4s var(--ease-out), border-color .2s; }
.var-card:hover { transform: translateY(-2px); border-color: var(--uc); }
.var-card .av { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff 0%, var(--uc) 55%, color-mix(in srgb, var(--uc) 35%, #000) 100%); display: grid; place-items: center; font-weight: 800; color: #0b0b0b; font-size: 18px; }
.var-card b { display: block; font-size: 15px; }
.var-card span { font-size: 12.5px; color: var(--muted); }
.ch-locked { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: calc(var(--header-h) + 40px) 24px 40px; }
.ch-locked h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; margin: 16px 0 10px; }
.ch-locked p { color: var(--muted); max-width: 440px; margin: 0 auto 24px; }

/* ── 반응형 */
@media (max-width: 1080px) {
  .u-grid { grid-template-columns: repeat(2, 1fr); }
  .ch-hero { grid-template-columns: 1fr; min-height: 0; }
  .ch-3d { height: 440px; order: -1; margin-top: 16px; }
  .ch-info { padding-top: 0; }
  .ch-body { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .section { padding: 72px 0; }
  .section-head { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat .f-vis { width: 40%; opacity: .6; }
  .u-grid { grid-template-columns: 1fr; }
  .spoiler-band { grid-template-columns: 1fr; padding: 28px; gap: 28px; }
  .film-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
  .poster-face .p-title { font-size: 16px; }
  .tl-list .yr-block { grid-template-columns: 1fr; gap: 12px; }
  .tl-list .yr-block > h2 { position: static; font-size: 30px; }
  .tl-rail { display: none; }
  .tl-card { width: 280px; margin-left: -140px; }
  .tl-card.is-major { width: 300px; margin-left: -150px; }
  .tl-bar { padding: 10px 16px; }
  .tl-bar .right { margin-left: 0; }
  .meta-grid { grid-template-columns: repeat(2, 1fr); }
  .dir-tools .field { width: 100%; }
  .spoiler-list button { grid-template-columns: 28px 1fr 56px; }
  .spoiler-list .sp-u { display: none; }
  .spoiler-list .is-current::after { display: none; }
  .hero-scroll { display: none; }
  .hero-label b { font-size: 10px; }
  .hero-label { opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero h1 .line > span { transform: none; }
  .hero-sub, .hero-cta { opacity: 1; }
}

/* 관계도 우주 라벨 */
.g-ulabel { position: absolute; left: 0; top: 0; font-family: var(--f-mono); font-size: 13px; color: var(--uc); white-space: nowrap; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; will-change: transform; transition: opacity .3s; }
.g-ulabel span { font-family: var(--f-sans); font-size: 11px; color: rgba(235, 230, 220, .55); }

/* 아주 좁은 화면: 헤더 버튼 압축 */
@media (max-width: 520px) {
  .nx-actions { gap: 6px; }
  .nx-spoiler { padding: 0 12px; }
  .nx-spoiler-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nx-lang span { min-width: 24px; padding: 0 4px; }
}
