/* 人斬士 — 유신혈풍담 */
:root {
  --bg: #0b0a09;
  --bg-2: #13100e;
  --panel: #19140f;
  --panel-2: #221b16;
  --line: #3a2e26;
  --text: #ece4d5;
  --muted: #a99d8b;
  --blood: #b0231c;
  --gold: #c9a45c;
  --paper: #efe7d6;
  --serif: "Noto Serif KR", "Nanum Myeongjo", serif;
  --jp: "Noto Serif JP", "Noto Serif KR", serif;
  --brush: "Yuji Boku", "Noto Serif JP", serif;
  --max: 1120px;
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.11' stroke-width='1.2'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0M6 24a18 18 0 0 1 36 0M12 24a12 12 0 0 1 24 0M18 24a6 6 0 0 1 12 0M-24 12a24 24 0 0 1 48 0M-18 12a18 18 0 0 1 36 0M-12 12a12 12 0 0 1 24 0M24 12a24 24 0 0 1 48 0M30 12a18 18 0 0 1 36 0M36 12a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(1000px 500px at 85% 0%, rgba(176, 35, 28, .10), transparent 60%);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
code {
  font-family: var(--serif); font-weight: 700; color: var(--gold);
  background: rgba(201, 164, 92, .08); border: 1px solid rgba(201, 164, 92, .25);
  padding: 1px 7px; border-radius: 3px; font-size: .9em; white-space: nowrap;
}

/* ── 상단 메뉴 */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(11, 10, 9, .82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: var(--brush); font-size: 1.45rem; text-decoration: none; letter-spacing: .06em; line-height: 1; }
.nav-links { display: flex; gap: 20px; font-size: .95rem; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── 제목 */
.hero {
  position: relative; min-height: calc(100svh - 56px);
  display: grid; place-items: center; text-align: center;
  padding: 64px 16px 88px; overflow: hidden;
  background:
    url("images/bg-ink.webp") center / cover no-repeat,
    radial-gradient(800px 380px at 50% 30%, rgba(236, 228, 213, .07), transparent 70%);
}
.ink-bg { position: absolute; inset: auto 0 0 0; height: 70%; pointer-events: none; }
.ink-bg svg { width: 100%; height: 100%; display: block; }
.hero-slash {
  position: absolute; left: -10%; right: -10%; top: 46%; height: 3px;
  background: linear-gradient(90deg, transparent, var(--blood) 30%, #e2452f 50%, var(--blood) 70%, transparent);
  transform: rotate(-14deg) scaleX(0); transform-origin: left center;
  box-shadow: 0 0 24px rgba(226, 69, 47, .55);
  animation: slash 1.1s .4s cubic-bezier(.7, 0, .2, 1) forwards; opacity: .75;
}
@keyframes slash { to { transform: rotate(-14deg) scaleX(1); } }
.hero-art {
  position: absolute; bottom: 8%; margin: 0; width: min(30vw, 340px); aspect-ratio: 1;
  border: 3px solid #1d2a44; outline: 1px solid rgba(201, 164, 92, .4); outline-offset: 4px;
  background: linear-gradient(170deg, #1f2638, #0e0d10);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
.hero-art img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; }
.hero-art--l { left: 4%; transform: rotate(-6deg); }
.hero-art--r { right: 4%; transform: rotate(5deg); }
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero-era { color: var(--gold); letter-spacing: .4em; font-size: .85rem; margin: 0 0 4px; }
.hero-title {
  font-family: var(--brush); font-weight: 400;
  font-size: clamp(5rem, 22vw, 12rem); line-height: 1; margin: 0;
  letter-spacing: .02em;
  text-shadow: 0 0 40px rgba(176, 35, 28, .35), 0 4px 0 rgba(0, 0, 0, .5);
}
.hero-sub {
  margin: 10px 0 34px; font-size: clamp(1.15rem, 3.6vw, 1.6rem); font-weight: 700;
  letter-spacing: .5em; padding-left: .5em; color: #e0473a;
}
.btn-play {
  display: inline-block; padding: 14px 36px;
  background: var(--blood); color: #fff; font-weight: 700; text-decoration: none; letter-spacing: .1em;
  border: 1px solid #d23a2f; border-radius: 2px; transition: background .2s, transform .2s;
}
.btn-play:hover { background: #c92b22; transform: translateY(-2px); }
.btn-play.is-pending { background: var(--panel-2); border-color: var(--line); color: var(--muted); cursor: default; transform: none; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 40px auto 0; max-width: 520px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(11, 10, 9, .55);
}
.stats div { padding: 12px 4px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats dt { font-size: .78rem; color: var(--muted); }
.stats dd { margin: 2px 0 0; font-size: 1.3rem; font-weight: 700; }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: .8rem; animation: cue 2s infinite; }
@keyframes cue { 50% { transform: translate(-50%, 6px); opacity: .4; } }

/* ── 검은 화면 + 대사 */
.quotes { background: #000; }
.quote {
  min-height: 90svh; display: grid; place-items: center; padding: 0 24px; text-align: center;
}
.quote p {
  margin: 0; max-width: 18em;
  font-size: clamp(1.35rem, 4.6vw, 2.5rem); font-weight: 600; line-height: 1.7; letter-spacing: .04em;
  opacity: 0; filter: blur(6px); transform: translateY(16px);
  transition: opacity 1.4s ease, filter 1.4s ease, transform 1.4s ease;
}
.quote p::before, .quote p::after { color: var(--blood); font-family: var(--jp); }
.quote p::before { content: "「 "; }
.quote p::after { content: " 」"; }
.quote.on p { opacity: 1; filter: none; transform: none; }

/* ── 공통 섹션 */
.section { max-width: var(--max); margin: 0 auto; padding: 96px 16px 32px; }
.section--tight { padding-top: 48px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.section-kanji { font-family: var(--brush); font-size: 2.8rem; color: var(--blood); line-height: 1; }
.section-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: .05em; }
.lead { color: var(--muted); max-width: 760px; margin: 0 0 28px; }

/* ── 연표 */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; margin-left: -1px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--line), var(--blood), var(--line)); }
.tl-row { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: start; }
.tl-left { grid-column: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding-right: 4px; }
.tl-packs { font-size: .72rem; color: var(--muted); text-align: right; line-height: 1.5; }
.tl-packs b { color: var(--gold); font-weight: 700; display: block; }
.tl-open { display: inline-block; font-size: .66rem; padding: 0 6px; margin-left: 6px; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; vertical-align: 2px; }
.tl-row + .tl-row { margin-top: 6px; }
.tl-era {
  grid-column: 1; justify-self: end; text-align: right;
  background: var(--blood); color: #fff; padding: 8px 12px; border-radius: 2px;
  border: 0; cursor: pointer; line-height: 1.3; width: 136px;
  box-shadow: 0 6px 20px rgba(176, 35, 28, .25);
}
.tl-era b { display: block; font-size: 1.05rem; }
.tl-era small { font-size: .72rem; opacity: .85; }
.tl-era em { font-style: normal; font-size: .66rem; border: 1px solid rgba(255, 255, 255, .5); padding: 0 6px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.tl-era:hover { filter: brightness(1.15); }
.tl-row--era .tl-dot { background: var(--blood); width: 14px; height: 14px; margin-top: 16px; }
.tl-row--era .tl-line { grid-column: 3; height: 1px; background: linear-gradient(90deg, var(--blood), transparent); margin-top: 22px; }
.tl-dot { grid-column: 2; justify-self: center; width: 10px; height: 10px; margin-top: 15px; transform: rotate(45deg); background: var(--bg); border: 2px solid var(--gold); position: relative; z-index: 1; }
.tl-ev { grid-column: 3; }
.tl-ev summary {
  list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: baseline;
  padding: 8px 14px; border: 1px solid transparent; border-radius: 2px; transition: background .2s, border-color .2s;
}
.tl-ev summary::-webkit-details-marker { display: none; }
.tl-ev summary:hover, .tl-ev[open] summary { background: var(--panel); border-color: var(--line); }
.tl-y { color: var(--gold); font-weight: 700; font-size: .85rem; flex: none; min-width: 64px; }
.tl-t { font-weight: 600; }
.tl-ev--strike .tl-t { text-decoration: line-through; text-decoration-color: var(--blood); text-decoration-thickness: 2px; color: var(--muted); }
.tl-d { margin: 4px 0 8px; padding: 10px 14px 12px; color: var(--muted); font-size: .92rem; border-left: 2px solid var(--gold); background: rgba(25, 20, 15, .6); }

/* ── 세계관 요약 */
.sub-title { font-size: 1.1rem; margin: 36px 0 12px; display: flex; align-items: center; gap: 10px; }
.sub-title:first-of-type { margin-top: 8px; }
.sub-title::before { content: ""; width: 18px; height: 2px; background: var(--gold); }
.sub-desc { color: var(--muted); margin: -4px 0 16px; font-size: .93rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature--key { background: linear-gradient(160deg, #241c15, var(--panel)); border-left-color: var(--gold); }
.feature--key h3 { color: var(--gold); }
.feature--blood { background: linear-gradient(160deg, #2a1210, var(--panel)); }
.feature--blood h3 { color: #e2564a; }
.feature { background: var(--panel); border: 1px solid var(--line); padding: 18px 20px; border-left: 3px solid var(--blood); }
.feature h3 { margin: 0 0 4px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .93rem; }
.feature b { color: var(--text); }
.art-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.art-card { background: var(--panel); border: 1px solid var(--line); padding: 18px 20px; }
.art-card h4 { margin: 0 0 6px; font-size: 1.1rem; }
.art-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.art-card--key { background: linear-gradient(160deg, #241c15, var(--panel)); border-color: #5a4628; }
.art-card--key h4 { color: var(--gold); }
.art-card--blood { background: linear-gradient(160deg, #2a1210, var(--panel)); border-color: #5a1f1a; }
.art-card--blood h4 { color: #e2564a; }
.school-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.school-list li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 18px; background: var(--bg-2); }
.school-list b { color: var(--gold); }
.school-list span { color: var(--muted); }

/* ── 시점 막대 (볼륨 바) */
/* 시점 막대 + 세력 탭 줄이 함께 화면 위에 붙어서 따라온다 */
.chars-sticky {
  position: sticky; top: 56px; z-index: 20;
  margin: 0 -16px 10px; padding: 0 16px;
  background: rgba(11, 10, 9, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.era-panel {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 0 10px;
}
.era-panel--small { padding-bottom: 14px; }
.era-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px;
  width: min(100%, 360px); height: 44px; padding: 5px;
  background: #050404; border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; touch-action: none; user-select: none; outline: none;
}
.era-bar:focus-visible { box-shadow: 0 0 0 2px var(--gold); }
.era-seg {
  position: relative; border-radius: 3px; background: #1d1814;
  display: grid; place-items: center; font-size: .78rem; font-weight: 700; color: var(--muted);
  transition: background .25s, color .25s;
}
.era-seg:first-child { border-radius: 999px 3px 3px 999px; }
.era-seg:last-child { border-radius: 3px 999px 999px 3px; }
.era-seg.fill { background: linear-gradient(180deg, #c7372d, #8e1912); color: #fbe9e6; }
.era-seg.cur { box-shadow: inset 0 0 0 2px #f0b8a8; }
.era-info { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.era-kj { font-family: var(--brush); font-size: 1.6rem; color: var(--blood); line-height: 1; }
.era-name { font-size: 1.2rem; }
.era-date { color: var(--muted); font-size: .85rem; }

/* ── 세력 탭 */
.tab-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 12px; scrollbar-width: thin; }
.tab {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.tab svg { width: 26px; height: 26px; flex: none; }
.tab:hover { color: var(--text); }
.tab.is-on { background: var(--fc); border-color: var(--fc); color: #fff; font-weight: 700; }
.tab.is-on svg { color: #fff !important; }

.tab-panel { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* 대표 인물 */
.leader {
  position: relative; display: grid; grid-template-columns: minmax(200px, 340px) 1fr; gap: 36px; align-items: center;
  padding: 36px 32px; margin-top: 8px;
  background:
    radial-gradient(600px 260px at 80% 20%, rgba(236, 228, 213, .06), transparent 70%),
    linear-gradient(135deg, #15110e, #0c0a09);
  border: 1px solid var(--line);
  overflow: hidden;
}
.leader::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  background: var(--crest) center / contain no-repeat; opacity: .07; pointer-events: none;
}
.leader-crest { position: absolute; right: 22px; top: 20px; width: 70px; height: 70px; opacity: .25; }
.leader .frame { transform: rotate(-3deg); }
.leader-name { margin: 16px 0 0; font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; line-height: 1.2; }
.leader-role { color: var(--gold); font-size: .9rem; margin-top: 4px; }
.leader-box { position: relative; }
.leader-label { font-size: .8rem; color: var(--muted); letter-spacing: .1em; border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 12px; }
.leader-label b { color: var(--text); }
.leader-desc { margin: 0; font-size: 1rem; line-height: 1.9; }
.leader-btn { margin-top: 18px; background: none; border: 1px solid var(--line); color: var(--muted); padding: 6px 14px; cursor: pointer; border-radius: 2px; }
.leader-btn:hover { color: var(--text); border-color: var(--fc); }

/* 주요 인물 */
.roster {
  margin-top: 0; padding: 30px 28px 34px;
  background-color: color-mix(in srgb, var(--fc) 55%, #0b0a09);
  background-image: var(--wave), linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .55));
}
.roster-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.roster-head svg { width: 54px; height: 54px; color: #fff; flex: none; }
.roster-head small { display: block; font-size: .8rem; color: rgba(255, 255, 255, .7); }
.roster-head strong { font-family: var(--brush); font-size: 1.9rem; font-weight: 400; line-height: 1.1; letter-spacing: .04em; }
.group + .group { margin-top: 28px; }
.group-title { margin: 0 0 12px; font-size: .9rem; color: rgba(255, 255, 255, .85); display: flex; align-items: center; gap: 10px; }
.group-title::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .2); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; }

.card { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; align-self: start; text-align: center; background: none; border: 0; padding: 0; cursor: pointer; }
.card:disabled { cursor: default; }
.card .frame { transition: transform .25s; }
.card:hover .frame, .card:focus-visible .frame { transform: translateY(-4px) rotate(-1.5deg); }
.card-name { display: block; margin-top: 10px; font-weight: 700; font-size: .98rem; line-height: 1.35; }
.card-role { display: block; font-size: .76rem; color: rgba(255, 255, 255, .7); line-height: 1.4; margin-top: 2px; }
.card-role { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.frame-badge {
  position: absolute; left: 0; top: 0; z-index: 2;
  font-size: .64rem; line-height: 1.5; padding: 1px 7px; font-weight: 700;
  background: rgba(201, 164, 92, .92); color: #1a1208;
}

/* 액자 (정사각형) */
.frame {
  position: relative; aspect-ratio: 1; width: 100%;
  border: 3px solid #101a2e; outline: 1px solid rgba(201, 164, 92, .55); outline-offset: 3px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .12), transparent 65%),
    linear-gradient(170deg, color-mix(in srgb, var(--fc) 45%, #1a1e2c), #0c0c10);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; opacity: 0; transition: opacity .3s, filter .6s; }
.frame.ok img { opacity: 1; }
.frame .seal {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-weight: 900; font-size: 2.6rem; color: rgba(255, 255, 255, .85);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}
.frame.ok .seal { display: none; }
.frame.dead img, .frame.dead .seal { filter: grayscale(1) brightness(.75); }
.frame.dead { background: linear-gradient(170deg, #2a2a2a, #0c0c0c); }

/* ── 천은교 */
.cult-box {
  position: relative; overflow: hidden; padding: 36px 28px;
  border: 1px solid #2a1e1e; background: linear-gradient(160deg, #121010, #070606);
  transition: background 1s ease, border-color 1s ease;
}
.cult.open .cult-box { background: linear-gradient(160deg, #3a0c12, #120406); border-color: #7a1f2a; }
.cult-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cult-title { display: flex; align-items: center; gap: 14px; }
.cult-title svg { width: 56px; height: 56px; color: #6a5a5a; transition: color 1s; }
.cult.open .cult-title svg { color: #e2564a; }
.cult-title h2 { margin: 0; font-size: 1.6rem; }
.cult-title small { display: block; color: var(--muted); font-size: .85rem; }
.cult-kj { font-family: var(--jp); color: #e2564a; margin-left: 6px; font-size: 1rem; }
.toggle { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; color: var(--muted); font-weight: 700; }
.toggle .sw { width: 50px; height: 28px; border-radius: 999px; background: #2a2222; position: relative; transition: background .4s; border: 1px solid #4a3a3a; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #8a7a7a; transition: transform .4s, background .4s; }
.cult.open .toggle { color: #f3d6d2; }
.cult.open .toggle .sw { background: var(--blood); border-color: #e2564a; }
.cult.open .toggle .sw::after { transform: translateX(22px); background: #fff; }
.cult-desc { margin: 18px 0 26px; color: var(--muted); max-width: 720px; }
.cult.open .cult-desc { color: #f0d2cc; }
.cult-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px; align-items: end; max-width: 760px; }
.cult .frame { --fc: #3a1010; }
.cult:not(.open) .frame img { filter: brightness(0) contrast(1.2); opacity: .9; }
.cult:not(.open) .frame { background: linear-gradient(170deg, #2a2020, #0c0a0a); }
.cult:not(.open) .frame .seal { color: transparent; text-shadow: none; }
.frame .sil { position: absolute; inset: 12% 10% 0; width: 80%; height: 88%; display: none; fill: #050404; }
.cult:not(.open) .frame:not(.ok) .sil { display: block; }
.cult .card-name { color: var(--text); }
.cult:not(.open) .card-name, .cult:not(.open) .card-role { color: #6a5a5a; }

/* ── 지도 */
.area-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.chip { font-size: .85rem; padding: 4px 14px; border-radius: 999px; background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.is-on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.map-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.map-svg { border: 1px solid var(--line); background: #bfd0cd; line-height: 0; }
.map-svg svg { width: 100%; height: auto; display: block; }
.map-svg svg * { pointer-events: none; }
.map-svg svg .cell { pointer-events: auto; cursor: pointer; transition: filter .15s; }
.map-svg svg .cell:hover { filter: brightness(1.12); }
.map-svg svg .cell.sel { stroke: #fff; stroke-width: 3; filter: brightness(1.18); }
.map-info { background: var(--panel); border: 1px solid var(--line); padding: 18px; min-height: 160px; position: sticky; top: 130px; }
.map-hint { color: var(--muted); margin: 0; }
.mi-name { margin: 0; font-size: 1.4rem; }
.mi-kj { font-family: var(--jp); color: var(--muted); font-size: .95rem; margin-left: 6px; }
.mi-side { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .88rem; }
.mi-side i { width: 14px; height: 14px; border: 1px solid #000; display: inline-block; }
.mi-hist { margin: 12px 0 0; font-size: .9rem; line-height: 1.8; color: var(--text); opacity: .9; }
.mi-sub { margin: 16px 0 0; font-size: .8rem; color: var(--gold); letter-spacing: .1em; border-top: 1px solid var(--line); padding-top: 12px; }
.mi-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.mi-list button { width: 100%; text-align: left; background: var(--bg-2); border: 1px solid var(--line); padding: 6px 10px; cursor: pointer; font-size: .9rem; }
.mi-list button:hover { border-color: var(--gold); }
.mi-list small { color: var(--muted); margin-left: 6px; }
.mi-none { color: var(--muted); font-size: .88rem; margin: 8px 0 0; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: .88rem; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 22px; height: 14px; border: 1px solid #000; display: inline-block; }
.map-gauge { display: flex; height: 22px; margin-top: 10px; border: 1px solid #000; font-size: .75rem; font-weight: 700; line-height: 22px; overflow: hidden; }
.map-gauge div { color: #fff; padding-left: 6px; white-space: nowrap; overflow: hidden; }
.map-credit { font-size: .75rem; color: var(--muted); opacity: .8; margin-top: 10px; }

/* ── 안내 */
.guide-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.guide-card { background: var(--panel); border: 1px solid var(--line); padding: 22px 24px; }
.guide-card h3 { margin: 0 0 10px; }
.models, .cmds { list-style: none; margin: 0; padding: 0; }
.models li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.models li:last-child { border-bottom: 0; }
.models span { font-weight: 700; }
.models small { color: var(--muted); flex: 1; }
.badge { font-size: .72rem; padding: 1px 8px; border: 1px solid #5a4628; color: var(--gold); border-radius: 999px; font-weight: 700; }
.badge--hot { background: var(--blood); color: #fff; border-color: var(--blood); }
.cmds li { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.cmds li:last-child { border-bottom: 0; }
.cmds code { justify-self: start; }
.cmds span { font-size: .9rem; color: var(--muted); }
.cta { text-align: center; padding: 72px 0 24px; }
.cta p { color: var(--muted); margin: 0 0 18px; font-size: 1.1rem; }

.footer { text-align: center; padding: 40px 16px 56px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer p { margin: 4px 0; }
.footer-note { font-size: .78rem; opacity: .75; }

/* ── 인물 상세 */
.char-dialog {
  width: min(720px, calc(100vw - 24px)); max-height: calc(100svh - 32px);
  padding: 0; border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  border-top: 3px solid var(--fc, var(--blood));
}
.char-dialog::backdrop { background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); }
.dlg-close { position: absolute; top: 8px; right: 10px; z-index: 2; background: rgba(0,0,0,.4); border: 0; color: var(--text); font-size: 1.1rem; cursor: pointer; padding: 6px 10px; border-radius: 2px; }
.dlg { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 26px; }
.dlg .frame { transform: rotate(-2deg); }
.dlg-name { margin: 0; font-size: 1.6rem; line-height: 1.3; }
.dlg-meta { color: var(--gold); font-size: .88rem; margin-top: 2px; }
.dlg-desc { margin: 14px 0 0; }
.dlg-note { margin: 12px 0 0; padding: 10px 12px; background: var(--panel); border-left: 2px solid var(--gold); font-size: .9rem; color: var(--muted); }
.dlg-secret { margin: 12px 0 0; padding: 10px 12px; background: #2a0f10; border-left: 2px solid var(--blood); font-size: .9rem; color: #f0c4bd; }
.dlg-list { margin: 16px 0 0; display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; font-size: .9rem; border-top: 1px solid var(--line); padding-top: 14px; }
.dlg-list dt { color: var(--muted); }
.dlg-list dd { margin: 0; }

/* ── 모바일 */
@media (max-width: 820px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map-info { position: static; min-height: 0; }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { padding: 10px 16px; }
  .nav-links { gap: 14px; font-size: .85rem; }
  .section { padding-top: 72px; }
  .section-kanji { font-size: 2.1rem; }
  .section-head h2 { font-size: 1.35rem; }
  .hero-art { width: 38vw; bottom: 4%; opacity: .55; }
  .chars-sticky { top: 49px; }
  .era-panel { gap: 6px 14px; padding: 8px 0 6px; }
  .tab-row { padding-bottom: 8px; }
  .tab { padding: 4px 12px 4px 6px; font-size: .9rem; }
  .tab svg { width: 22px; height: 22px; }
  .era-bar { width: 100%; height: 40px; }
  .era-kj { font-size: 1.3rem; }
  .timeline::before { left: 92px; }
  .tl-row { grid-template-columns: 78px 28px 1fr; }
  .tl-era { width: 78px; padding: 6px 8px; }
  .tl-era b { font-size: .9rem; }
  .tl-era em { display: none; }
  .tl-ev summary { flex-direction: column; gap: 0; padding: 6px 8px; }
  .tl-d { padding-left: 14px; }
  .leader { grid-template-columns: 1fr; padding: 24px 18px; gap: 18px; }
  .leader .frame { width: 74%; margin: 0 auto; }
  .leader-head { text-align: center; }
  .roster { padding: 22px 14px 26px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .cult-box { padding: 26px 16px; }
  .cult-grid { grid-template-columns: 1fr 1fr; }
  .cult-grid .card:first-child { grid-column: 1 / -1; width: 70%; margin: 0 auto; }
  .school-list li { grid-template-columns: 1fr; gap: 2px; }
  .cmds li { grid-template-columns: 1fr; gap: 2px; }
  .dlg { grid-template-columns: 1fr; padding: 20px 18px; }
  .dlg .frame { width: 62%; margin: 0 auto; }
}
@media (max-width: 380px) {
  .nav-logo { font-size: 1.2rem; }
  .nav-links { gap: 10px; font-size: .8rem; }
}
/* ── 탈번 취소선 */
s.dap { text-decoration: line-through; text-decoration-color: #e2564a; text-decoration-thickness: 2px; }

/* ── 기예 (빛나는 글자) */
.dlg-skill { margin: 14px 0 0; padding: 12px 14px; border: 1px solid rgba(240, 198, 107, .45); background: radial-gradient(circle at 20% 0%, rgba(240, 198, 107, .14), transparent 70%), rgba(20, 14, 8, .8); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.dlg-skill-label { flex-basis: 100%; font-size: .72rem; letter-spacing: .2em; color: var(--gold); opacity: .85; }
.skill {
  font-size: 1.08rem; font-weight: 900; letter-spacing: .04em;
  color: #fff6dc;
  -webkit-text-stroke: .6px #f0c66b;
  text-shadow: 0 0 4px #f0c66b, 0 0 10px rgba(240, 198, 107, .8), 0 0 22px rgba(226, 86, 74, .6);
  animation: skillGlow 2.6s ease-in-out infinite;
}
@keyframes skillGlow { 50% { text-shadow: 0 0 6px #ffe2a0, 0 0 16px rgba(240, 198, 107, 1), 0 0 32px rgba(226, 86, 74, .8); } }

/* ── 경지 (넘겨 보기) */
.realm { position: relative; border: 1px solid var(--line); background: linear-gradient(160deg, #18130f, #0d0b0a); }
.realm-steps { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.realm-step { background: none; border: 0; padding: 10px 4px; cursor: pointer; color: var(--muted); font-size: .85rem; position: relative; }
.realm-step + .realm-step { border-left: 1px solid var(--line); }
.realm-step.is-on { color: #fff; background: linear-gradient(180deg, #8e1912, #5a0f0b); font-weight: 700; }
.realm-step.is-past { color: #e7b1a6; }
.realm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.realm-track::-webkit-scrollbar { display: none; }
.realm-slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: center; padding: 30px 72px 34px; }
.realm-kj { font-family: var(--brush); font-size: 4.2rem; line-height: 1; color: var(--blood); text-align: center; }
.realm-no { display: block; font-family: var(--serif); font-size: .75rem; color: var(--muted); margin-top: 8px; letter-spacing: .2em; }
.realm-name { margin: 0 0 6px; font-size: 1.5rem; }
.realm-d { margin: 0; color: var(--muted); line-height: 1.9; }
.realm-nav { position: absolute; inset: 41px 0 0 0; display: flex; justify-content: space-between; align-items: center; pointer-events: none; padding: 0 10px; }
.realm-arrow { pointer-events: auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(11, 10, 9, .8); color: var(--text); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.realm-arrow:hover { border-color: var(--gold); }
.realm-arrow:disabled { opacity: .25; cursor: default; }

/* ── 천은교 탭 */
.tab.tab--cult.is-on { background: #6a1424; border-color: #9c2a36; }
.cult .leader { transition: background 1s ease; }
.cult.open .leader { background: radial-gradient(600px 260px at 80% 20%, rgba(226, 86, 74, .18), transparent 70%), linear-gradient(135deg, #3a0c12, #120406); border-color: #7a1f2a; }
.cult .roster { transition: background-color 1s ease; }
.cult:not(.open) .roster { background-color: #141010; }
.cult .toggle { margin-top: 18px; }

@media (max-width: 720px) {
  .feature-grid { grid-template-columns: 1fr; }
  .realm-steps { grid-template-columns: repeat(6, 1fr); }
  .realm-step { font-size: .72rem; padding: 8px 0; }
  .realm-slide { grid-template-columns: 1fr; gap: 10px; padding: 22px 52px 26px; text-align: center; }
  .realm-kj { font-size: 3.2rem; }
  .realm-nav { padding: 0 6px; }
  .realm-arrow { width: 32px; height: 32px; font-size: 1.2rem; }
  .tl-packs { font-size: .64rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slash { animation: none; transform: rotate(-14deg); }
  html { scroll-behavior: auto; }
  .quote p { transition: none; }
}
