/* ============================================================
   《폐급 아카데미의 이사장이 됨》 공식 설정 아카이브 스타일시트
   Direction: 상아빛 학적부 양피지 · 카본 잉크 · 제국 크림슨 · 황금 직인
   Unslop: 4px 그리드 · 중첩 반경 · 3단계 텍스트 · 가중치 400~600 · 무글로우
   ============================================================ */

@font-face {
  font-family: 'LevelUp';
  src: url('assets/fonts/LevelUp-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'LevelUp';
  src: url('assets/fonts/LevelUp-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KoPubWorldDotum';
  src: url('assets/fonts/KoPubWorldDotum-Medium.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KoPubWorldDotum';
  src: url('assets/fonts/KoPubWorldDotum-Bold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GyeonggiBatang';
  src: url('assets/fonts/GyeonggiBatang-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Warm Institutional Paper Ramp */
  --bg: #f7f2e7;
  --surface: #fdfbf5;
  --surface-tint: #efe8da;
  --surface-raised: #e8dfd0;

  /* Three Text Roles (contrast >= 4.5:1) */
  --ink: #1f1a22;
  --ink-sec: #524a56;
  --ink-muted: #6b626f;

  /* Single Primary Accent: Imperial Crimson */
  --accent: #8b2232;
  --accent-hover: #6e1826;
  --accent-soft: rgba(139, 34, 50, 0.09);
  --accent-line: rgba(139, 34, 50, 0.28);

  /* Signature Detail: Antique Brass Seal */
  --brass: #8c6320;
  --brass-mid: #b58a3b;
  --brass-line: rgba(165, 121, 46, 0.34);
  --brass-soft: rgba(181, 138, 59, 0.12);

  /* Hairlines & Subtle Light Depth */
  --line: rgba(31, 26, 34, 0.10);
  --line-strong: rgba(31, 26, 34, 0.18);
  --shadow-sm: 0 1px 2px rgba(31, 26, 34, 0.05);
  --shadow-md: 0 8px 24px rgba(31, 26, 34, 0.08);

  /* Nested Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Type & Rhythm */
  --font-display: 'LevelUp', 'KoPubWorldDotum', sans-serif;
  --font-body: 'KoPubWorldDotum', 'LevelUp', sans-serif;
  --font-quote: 'GyeonggiBatang', Georgia, serif;

  --header-h: 64px;
  --container-w: 1184px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  word-break: keep-all;
  overflow-wrap: break-word;
  font-variant-numeric: tabular-nums;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.skip-link:focus {
  top: 16px;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== 상단 고정 내비게이션 ==================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(247, 242, 231, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brass-line);
}

.header-inner {
  max-width: var(--container-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wordmark-logo {
  display: block;
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 1.5px rgba(31, 26, 34, 0.52)) contrast(1.08) brightness(0.95);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  position: relative;
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-sec);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-tint);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.header-actions {
  display: none;
  align-items: center;
}

.menu-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.menu-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  padding-top: var(--header-h);
}

/* ==================== 공통 섹션 · 타이포 · 버튼 · 직인 ==================== */
.band {
  padding: 64px 0;
  background: var(--bg);
}

.band-tinted {
  background: var(--surface-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
}

.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--brass-mid);
  flex-shrink: 0;
}

.eyebrow-light {
  color: #e6c989;
}

.eyebrow-light::before {
  background: #e6c989;
}

.section-title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.section-title-sm {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.subsection-title {
  margin: 40px 0 16px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.card-heading {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--ink);
}

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-head-row .section-title {
  margin-bottom: 0;
}

.prose {
  margin: 0 0 12px;
  color: var(--ink-sec);
  font-size: 15px;
  line-height: 1.72;
}

.prose:last-child {
  margin-bottom: 0;
}

/* Signature Detail: 황금 직인 등급 표장 */
.grade-seal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--brass);
  background: var(--surface);
  border: 1.5px solid var(--brass-mid);
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px var(--brass-line);
}

.grade-seal.is-accent {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px var(--accent-line);
}

.grade-seal.is-sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease), transform 0.12s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--surface);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-sec);
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.16s var(--ease);
}

.link-arrow:hover {
  color: var(--accent-hover);
}

.link-arrow .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.16s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

/* ==================== 1. 홈 (#home) ==================== */
.hero {
  position: relative;
  min-height: 600px;
  height: calc(100vh - var(--header-h));
  max-height: 760px;
  overflow: hidden;
  border-bottom: 1px solid var(--brass-line);
  background: var(--surface-tint);
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(96deg,
      rgba(247, 242, 231, 0.96) 0%,
      rgba(247, 242, 231, 0.90) 36%,
      rgba(247, 242, 231, 0.36) 64%,
      rgba(247, 242, 231, 0.12) 100%),
    linear-gradient(180deg,
      rgba(247, 242, 231, 0) 76%,
      rgba(247, 242, 231, 0.94) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: 32px;
}

.hero-copy {
  max-width: 464px;
  padding: 24px 0;
}

.hero-stagger-1,
.hero-stagger-2,
.hero-stagger-3,
.hero-stagger-4 {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
}

body.hero-ready .hero-stagger-1 { opacity: 1; transform: translateY(0); transition-delay: 0.02s; }
body.hero-ready .hero-stagger-2 { opacity: 1; transform: translateY(0); transition-delay: 0.08s; }
body.hero-ready .hero-stagger-3 { opacity: 1; transform: translateY(0); transition-delay: 0.14s; }
body.hero-ready .hero-stagger-4 { opacity: 1; transform: translateY(0); transition-delay: 0.20s; }

.hero-title-logo {
  margin: 0 0 16px;
  line-height: 0;
}

.hero-logo-img {
  width: min(100%, 408px);
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(31, 26, 34, 0.34)) contrast(1.06);
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.72;
  color: var(--ink-sec);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.hero-card-stage {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--brass-line);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: border-color 0.16s var(--ease);
}

.hero-card-stage:hover {
  border-color: var(--accent);
}

.hero-card-img {
  width: 100%;
  aspect-ratio: 1216 / 832;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: opacity 0.24s var(--ease);
}

.hero-character-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.hero-character-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.hero-char-faction {
  font-size: 12px;
  color: var(--brass);
  font-weight: 600;
}

.hero-char-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.hero-char-power {
  font-size: 13px;
  color: var(--ink-muted);
}

.hero-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hero-switch-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--surface-tint);
  padding: 0;
  transition: border-color 0.16s var(--ease), opacity 0.16s var(--ease);
  opacity: 0.72;
}

.hero-switch-btn:hover {
  opacity: 1;
  border-color: var(--brass-mid);
}

.hero-switch-btn.is-active {
  opacity: 1;
  border-color: var(--accent);
}

.hero-switch-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
}

/* 홈 에디토리얼 스플릿 */
.editorial-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 40px;
}

.text-links {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.editorial-media {
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.editorial-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* 홈 주요 인물 그리드 */
.home-roster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.roster-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.16s var(--ease);
}

.roster-card:hover {
  border-color: var(--accent);
}

.roster-card-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface-tint);
  overflow: hidden;
}

.roster-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
}

.roster-card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roster-card-faction {
  font-size: 12px;
  color: var(--brass);
}

.roster-card-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.roster-card-power {
  font-size: 12px;
  color: var(--ink-muted);
}

/* 크로스오버 3작품 카드 */
.crossover-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.crossover-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.16s var(--ease);
}

.crossover-card:hover {
  border-color: var(--accent);
}

.crossover-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center 14%;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.crossover-meta {
  min-width: 0;
}

.crossover-source {
  display: block;
  font-size: 12px;
  color: var(--brass);
  margin-bottom: 4px;
}

.crossover-name {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.crossover-role {
  display: block;
  font-size: 13px;
  color: var(--ink-sec);
  margin-top: 2px;
}

/* ==================== 서브 페이지 공통 배너 ==================== */
.page-banner {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--brass-line);
  background: var(--ink);
}

.page-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.page-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 19, 27, 0.56) 0%, rgba(24, 19, 27, 0.86) 100%);
}

.page-banner-inner {
  position: relative;
  z-index: 2;
  padding-top: 48px;
  padding-bottom: 36px;
}

.page-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--surface);
}

.page-lead {
  margin: 0;
  max-width: 680px;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(253, 251, 245, 0.82);
}

/* ==================== 2. 세계관: 칼데라 3단 단면도 & 17거점 ==================== */
.caldera-atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 24px;
  align-items: start;
}

.atlas-tiers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.atlas-tier {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.atlas-tier.is-active {
  border-color: var(--brass-mid);
}

.atlas-tier-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.atlas-tier-level {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}

.atlas-tier-alt {
  font-size: 13px;
  color: var(--ink-muted);
}

.atlas-tier-desc {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-sec);
}

.atlas-loc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.loc-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 13px;
  color: var(--ink-sec);
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.loc-chip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.loc-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.atlas-preview {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.atlas-preview-media {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-tint);
  margin-bottom: 16px;
}

.atlas-preview-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.atlas-zoom-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  background: rgba(31, 26, 34, 0.82);
  color: var(--surface);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.14s var(--ease);
}

.atlas-zoom-btn:hover {
  background: var(--accent);
}

.atlas-preview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.atlas-preview-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.atlas-preview-hook {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border-left: 2px solid var(--brass-mid);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.atlas-gate-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.6;
}

.char-link-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.char-pill {
  height: 32px;
  padding: 0 10px 0 4px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.char-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.char-pill img {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  object-position: center 14%;
}

/* 연대기 타임라인 */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-left: 24px;
  border-left: 1px solid var(--brass-line);
}

.timeline-item {
  position: relative;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px;
  top: 26px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--brass-mid);
}

.timeline-era {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 4px;
}

.timeline-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.timeline-notes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.timeline-note {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.timeline-note strong {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

/* 2컬럼 카드 · 서클 래더 · 데이터 표 */
.two-col-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.rank-ladder {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sec);
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.rank-btn:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.rank-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.rank-detail {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.rank-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.rank-detail-head strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.rank-detail-share {
  font-size: 12px;
  color: var(--brass);
  font-weight: 600;
}

.rank-detail-examples {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.clean-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clean-list li {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.clean-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.clean-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  font-size: 14px;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface-tint);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-sec);
  vertical-align: top;
  line-height: 1.6;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tr.is-highlight td {
  background: var(--accent-soft);
  color: var(--ink);
}

/* 5대 권력 기둥 */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.pillar-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pillar-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

.pillar-conflict {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ==================== 접이식 스포일러 공통 모듈 ==================== */
.spoiler-box {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  overflow: hidden;
}

.spoiler-trigger {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  transition: background-color 0.16s var(--ease);
}

.spoiler-trigger:hover {
  background: var(--bg);
}

.spoiler-trigger-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.spoiler-trigger-left .icon {
  color: var(--accent);
}

.spoiler-heading {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.spoiler-sub {
  display: block;
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.spoiler-action {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.spoiler-content {
  padding: 0 24px 24px;
  border-top: 1px solid var(--line);
}

.spoiler-notice {
  margin: 20px 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--accent);
}

.spoiler-section {
  margin-top: 24px;
}

.spoiler-section h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.spoiler-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.spoiler-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.spoiler-card-tag {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 4px;
}

.spoiler-card h4 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.spoiler-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.spoiler-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.evidence-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}

.evidence-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  cursor: pointer;
}

.evidence-card-body {
  padding: 12px 16px;
}

.evidence-card-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.evidence-card-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-sec);
}

/* ==================== 3. 5대 학원 (#academies) ==================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-chip {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-sec);
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.academies-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.academy-card {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.academy-media {
  position: relative;
  background: var(--surface-tint);
}

.academy-media img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.academy-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.academy-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.academy-title-wrap h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.academy-concept {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--brass);
}

.academy-conflict {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.event-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-card-media {
  cursor: pointer;
  overflow: hidden;
}

.event-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.event-card-body {
  padding: 16px 20px 20px;
}

.event-tag {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 4px;
}

.event-card-body h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.event-card-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sec);
}

/* ==================== 4. 등장인물 (#characters) ==================== */
.char-stage {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--brass-line);
  background: var(--surface-tint);
}

.char-stage-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

.char-stage-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(247, 242, 231, 0.78) 0%, rgba(247, 242, 231, 0.96) 100%);
}

.char-stage-inner {
  position: relative;
  z-index: 2;
  padding-top: 36px;
  padding-bottom: 44px;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 32px;
  align-items: start;
}

.char-visual-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.char-artwork-frame {
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--brass-line);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 460px;
}

.char-artwork {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.char-artwork.is-landscape {
  aspect-ratio: 1216 / 832;
  object-fit: cover;
}

.char-view-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-tab {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sec);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.view-tab:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.view-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.view-tab-zoom {
  flex: 0 0 40px;
  padding: 0;
}

.char-sheet {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.char-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.tag {
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.tag-faction {
  background: var(--brass-soft);
  color: var(--brass);
}

.tag-circle {
  background: var(--surface-tint);
  color: var(--ink-sec);
}

.tag-crossover {
  background: var(--accent-soft);
  color: var(--accent);
}

.char-name-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.char-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

.char-code {
  font-size: 13px;
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.char-role {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink-sec);
}

.char-crossover-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--accent);
}

.char-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-cell span {
  font-size: 12px;
  color: var(--ink-muted);
}

.meta-cell strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.char-power-box {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.box-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 4px;
}

.power-title {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.power-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.char-bio-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.bio-tab {
  position: relative;
  height: 36px;
  padding: 0 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.14s var(--ease);
}

.bio-tab:hover {
  color: var(--ink);
}

.bio-tab.is-active {
  color: var(--accent);
}

.bio-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.char-bio-body {
  min-height: 112px;
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-sec);
}

.char-bio-body p {
  margin: 0 0 10px;
}

.char-bio-body p:last-child {
  margin-bottom: 0;
}

.quote-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border-left: 2px solid var(--brass-mid);
}

.quote-tag {
  display: block;
  font-size: 12px;
  color: var(--brass);
  margin-bottom: 4px;
}

.quote-text {
  margin: 0;
  font-family: var(--font-quote);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
}

/* 인물별 스포일러 아코디언 */
.char-secret-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-line);
  background: var(--bg);
  overflow: hidden;
}

.char-secret-btn {
  width: 100%;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: background-color 0.14s var(--ease);
}

.char-secret-btn:hover {
  background: var(--accent-soft);
}

.char-secret-state {
  margin-left: auto;
  font-size: 12px;
}

.char-secret-body {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--accent-line);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-sec);
}

.char-nav-arrows {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

/* 인물 도감 디렉터리 */
.directory-controls {
  margin-bottom: 20px;
}

.directory-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.directory-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.directory-count {
  font-size: 14px;
  color: var(--ink-muted);
}

.search-wrap {
  position: relative;
  width: 260px;
}

.search-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 14px;
  color: var(--ink);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.char-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 0.14s var(--ease);
}

.char-card:hover {
  border-color: var(--brass-mid);
}

.char-card.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.char-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-tint);
  overflow: hidden;
}

.char-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
}

.char-card-grade {
  position: absolute;
  top: 8px;
  right: 8px;
}

.char-card-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.char-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.char-card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.char-card-circle {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.char-card-role {
  font-size: 13px;
  color: var(--ink-sec);
}

.char-card-power {
  font-size: 12px;
  color: var(--brass);
  margin-top: 4px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

/* 무명 NPC 그리드 */
.npcs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.npc-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.npc-card img {
  width: 100%;
  aspect-ratio: 16 / 12;
  object-fit: cover;
  object-position: center 15%;
  cursor: pointer;
}

.npc-card-body {
  padding: 14px 16px 16px;
}

.npc-card-faction {
  display: block;
  font-size: 12px;
  color: var(--brass);
  margin-bottom: 2px;
}

.npc-card-body h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.npc-card-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-sec);
}

/* ==================== 5. 경영 · 연출 · 위협 (#systems) ==================== */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.promo-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.promo-step {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.promo-deadline {
  font-size: 12px;
  color: var(--brass);
}

.promo-reward {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.graphics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.graphic-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.graphic-cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cmd-kbd {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--radius-xs);
  background: var(--ink);
  color: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.graphic-alias {
  font-size: 12px;
  color: var(--ink-muted);
}

.graphic-card h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.graphic-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.traffic-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.traffic-head {
  margin-bottom: 16px;
}

.traffic-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.traffic-step {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
}

.traffic-step-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.traffic-step-top strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.traffic-step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-sec);
}

.monsters-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.monster-card {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.monster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  cursor: pointer;
}

.monster-card-body {
  padding: 16px 20px 20px;
}

.monster-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.monster-tier {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.monster-price {
  font-size: 12px;
  color: var(--brass);
}

.monster-card-body h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.monster-card-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sec);
}

/* ==================== 6. 시작웹툰 (#webtoon) ==================== */
.webtoon-strip {
  max-width: 780px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #141216;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.webtoon-strip img {
  width: 100%;
  height: auto;
  display: block;
}

.webtoon-footer-cta {
  max-width: 780px;
  margin: 32px auto 0;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* ==================== 7. 시작 안내 (#guide) ==================== */
.scenarios-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.scenario-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scenario-tab {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.14s var(--ease), background-color 0.14s var(--ease);
}

.scenario-tab:hover {
  border-color: var(--brass-mid);
}

.scenario-tab.is-active {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: inset 3px 0 0 var(--accent);
}

.scenario-tab-badge {
  display: block;
  font-size: 12px;
  color: var(--brass);
  font-weight: 600;
  margin-bottom: 4px;
}

.scenario-tab-title {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.scenario-tab-cmd {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.scenario-detail {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.scenario-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.scenario-detail h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.scenario-loc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--brass);
}

.scenario-points {
  margin: 16px 0;
  padding-left: 18px;
  color: var(--ink-sec);
  font-size: 14px;
  line-height: 1.7;
}

.scenario-points li {
  margin-bottom: 6px;
}

.starter-list {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.starter-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.starter-item-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 4px;
}

.starter-item-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}

/* 명령어 복사 그룹 */
.cmd-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cmd-group-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.cmd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.cmd-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: border-color 0.14s var(--ease);
}

.cmd-card:hover {
  border-color: var(--accent);
}

.cmd-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cmd-card-tag {
  font-size: 12px;
  color: var(--ink-muted);
}

.cmd-card-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-sec);
}

.copy-toast {
  min-height: 24px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

/* 안내 이미지 2종 & 여캐플 배너 */
.guide-sheets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.guide-sheet-card {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.guide-sheet-btn {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.guide-sheet-btn img {
  width: 100%;
  height: auto;
}

.guide-sheet-card figcaption {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-sec);
  text-align: center;
}

.fe-showcase {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--brass-line);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.fe-showcase img {
  width: 100%;
  aspect-ratio: 1216 / 832;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ==================== 8. 여캐플 안내 (#female) ==================== */
.fe-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.fe-chip-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease);
}

.fe-chip-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.fe-chip-cmd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  color: var(--accent);
}

.fe-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.fe-gallery-card {
  margin: 0;
  padding: 8px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}

.fe-gallery-card img {
  width: 100%;
  aspect-ratio: 1216 / 832;
  object-fit: cover;
  object-position: center 14%;
  border-radius: var(--radius-xs);
  cursor: pointer;
}

.fe-gallery-card img.is-standing {
  object-fit: contain;
  object-position: center top;
  background: #ffffff;
}

.fe-gallery-card figcaption {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sec);
  text-align: center;
}

.fe-presets-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.fe-rules {
  margin: 0 0 24px;
  padding-left: 18px;
  color: var(--ink-sec);
  font-size: 14px;
  line-height: 1.7;
}

.fe-preset-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.fe-preset-tab {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: left;
  transition: border-color 0.14s var(--ease);
}

.fe-preset-tab:hover {
  border-color: var(--brass-mid);
}

.fe-preset-tab.is-active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.fe-preset-idx {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

.fe-preset-title {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.fe-preset-sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.fe-preset-panel {
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.fe-preset-bar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.fe-preset-note {
  font-size: 13.5px;
  color: var(--ink-sec);
}

.fe-preset-pre {
  margin: 0;
  padding: 20px;
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-x: auto;
}

/* ==================== 푸터 · 라이트박스 ==================== */
.site-footer {
  border-top: 1px solid var(--brass-line);
  background: var(--surface);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-logo {
  height: 36px;
  width: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--ink-sec);
}

.footer-links a:hover {
  color: var(--accent);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 15, 20, 0.86);
}

.lightbox-panel {
  position: relative;
  z-index: 2;
  width: min(100%, 1040px);
  max-height: 92vh;
  border-radius: var(--radius-md);
  background: #1c181f;
  border: 1px solid rgba(253, 251, 245, 0.14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lightbox-bar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(253, 251, 245, 0.10);
  color: var(--surface);
}

.lightbox-caption {
  font-size: 14px;
  font-weight: 600;
}

.lightbox-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--surface);
  transition: background-color 0.14s var(--ease);
}

.lightbox-close:hover {
  background: rgba(253, 251, 245, 0.12);
}

.lightbox-media {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-media img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-xs);
}

.lightbox-media.is-webtoon {
  align-items: flex-start;
}

.lightbox-media.is-webtoon img {
  max-height: none;
  width: min(100%, 760px);
}

.lightbox-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  border-top: 1px solid rgba(253, 251, 245, 0.10);
}

.lightbox-thumbs:empty {
  display: none;
}

.lb-thumb {
  width: 64px;
  height: 44px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  border: 1.5px solid transparent;
  opacity: 0.6;
  flex-shrink: 0;
}

.lb-thumb.is-active {
  opacity: 1;
  border-color: var(--brass-mid);
}

.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== 반응형 (태블릿 · 모바일 360px 엄수) ==================== */
@media (max-width: 1040px) {
  .header-actions {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 12px 16px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--brass-line);
    box-shadow: var(--shadow-md);
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    justify-content: flex-start;
    height: 40px;
    border: 1px solid var(--line);
    background: var(--bg);
  }

  .site-nav a[aria-current="page"]::after {
    display: none;
  }

  .site-nav a[aria-current="page"] {
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .hero {
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 36px 0 44px;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hero-copy {
    max-width: none;
    padding: 0;
  }

  .editorial-split,
  .caldera-atlas,
  .two-col-cards,
  .char-stage-inner,
  .scenarios-layout,
  .academy-card,
  .fe-showcase {
    grid-template-columns: minmax(0, 1fr);
  }

  .atlas-preview {
    position: static;
  }

  .home-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crossover-grid,
  .events-grid,
  .promo-grid,
  .monsters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graphics-grid,
  .traffic-steps,
  .char-grid,
  .npcs-grid,
  .fe-gallery-grid,
  .fe-preset-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container,
  .header-inner {
    padding: 0 16px;
  }

  .band {
    padding: 44px 0;
  }

  .wordmark-logo {
    height: 40px;
  }

  .hero {
    padding: 28px 0 36px;
  }

  .hero-character-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hero-switcher {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .section-head-row,
  .directory-top,
  .fe-presets-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-wrap {
    width: 100%;
  }

  .home-roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .crossover-grid,
  .events-grid,
  .promo-grid,
  .graphics-grid,
  .traffic-steps,
  .monsters-grid,
  .guide-sheets-grid,
  .spoiler-evidence-grid,
  .fe-preset-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .char-grid,
  .npcs-grid,
  .fe-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .char-artwork-frame {
    min-height: 320px;
  }

  .char-sheet,
  .info-card,
  .scenario-detail,
  .academy-body {
    padding: 16px;
  }

  .spoiler-trigger {
    padding: 16px;
  }

  .spoiler-content {
    padding: 0 16px 16px;
  }

  .starter-item {
    flex-direction: column;
  }

  .timeline {
    padding-left: 16px;
  }

  .timeline-item {
    padding: 16px;
  }

  .timeline-item::before {
    left: -22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
