/* 경기천년제목 (GyeonggiTitle) — 헤드라인 · 섹션 타이틀 · UI 탭 */
@font-face {
  font-family: 'GyeonggiTitle';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: local('경기천년제목 Light'), local('GyeonggiTitle Light'), local('GyeonggiTitleL'),
       url('assets/fonts/GyeonggiTitle-Light.ttf') format('truetype');
}
@font-face {
  font-family: 'GyeonggiTitle';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local('경기천년제목 Medium'), local('GyeonggiTitle Medium'), local('GyeonggiTitleM'),
       url('assets/fonts/GyeonggiTitle-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'GyeonggiTitle';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local('경기천년제목 Bold'), local('GyeonggiTitle Bold'), local('GyeonggiTitleB'), local('경기천년제목V Bold'),
       url('assets/fonts/GyeonggiTitle-Bold.ttf') format('truetype');
}

/* 경기천년바탕 (GyeonggiBatang) — 신화 인용구 · 서사 강조 */
@font-face {
  font-family: 'GyeonggiBatang';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: local('경기천년바탕 Regular'), local('GyeonggiBatang Regular'), local('경기천년바탕'),
       url('assets/fonts/GyeonggiBatang-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'GyeonggiBatang';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local('경기천년바탕 Bold'), local('GyeonggiBatang Bold'),
       url('assets/fonts/GyeonggiBatang-Bold.ttf') format('truetype');
}

/* KoPubWorld돋움체 (KoPubWorldDotum) — 고가독성 본문 · 설정표 · 카드 설명 */
@font-face {
  font-family: 'KoPubWorldDotum';
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: local('KoPubWorld돋움체_Pro Light'), local('KoPubWorldDotum_Pro Light'), local('KoPubWorldDotum Light'), local('KoPubDotum Light'),
       url('assets/fonts/KoPubWorldDotum-Light.otf') format('opentype');
}
@font-face {
  font-family: 'KoPubWorldDotum';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: local('KoPubWorld돋움체_Pro Medium'), local('KoPubWorldDotum_Pro Medium'), local('KoPubWorldDotum Medium'), local('KoPubDotum Medium'),
       url('assets/fonts/KoPubWorldDotum-Medium.otf') format('opentype');
}
@font-face {
  font-family: 'KoPubWorldDotum';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local('KoPubWorld돋움체_Pro Medium'), local('KoPubWorldDotum_Pro Medium'), local('KoPubWorldDotum Medium'), local('KoPubDotum Medium'),
       url('assets/fonts/KoPubWorldDotum-Medium.otf') format('opentype');
}
@font-face {
  font-family: 'KoPubWorldDotum';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local('KoPubWorld돋움체_Pro Bold'), local('KoPubWorldDotum_Pro Bold'), local('KoPubWorldDotum Bold'), local('KoPubDotum Bold'),
       url('assets/fonts/KoPubWorldDotum-Bold.otf') format('opentype');
}

:root {
  --ink: #060913;
  --panel: #0c1222;
  --cyan: #22d3ee;
  --gold: #f59e0b;
  --muted: #a3b1c6;
  --white: #f4f7fc;
  --line: #ffffff1f;
  --body: 'KoPubWorldDotum', 'KoPubWorld돋움체_Pro', 'KoPubWorldDotum_Pro', '경기천년제목', 'Pretendard', sans-serif;
  --serif: 'GyeonggiTitle', '경기천년제목', 'GyeonggiBatang', '경기천년바탕', serif;
  --batang: 'GyeonggiBatang', '경기천년바탕', 'KoPubWorld바탕체_Pro', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; scroll-padding-top: 98px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.82;
  letter-spacing: -0.015em;
  word-break: keep-all;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.intro-open { overflow: hidden; }
body.view-home { height: 100svh; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 6px; }
button[hidden], [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  background: var(--cyan);
  color: #041019;
  font-weight: 700;
  padding: 10px 20px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

.eyebrow {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.6;
  color: #8ce4f5;
}
.cyan-line {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  margin-right: 12px;
  vertical-align: middle;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.5vw;
  border-bottom: 1px solid #ffffff18;
  background: #060913d9;
  backdrop-filter: blur(16px);
}
.wordmark { display: flex; flex-direction: column; line-height: 1.2; }
.wordmark span {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}
.wordmark small {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .16em;
  color: #8ce4f5;
}
.site-header nav {
  display: flex;
  gap: clamp(20px, 2.3vw, 38px);
  font-size: 15px;
  font-weight: 500;
}
.site-header nav a {
  position: relative;
  padding: 14px 0;
  color: #c5d0e0;
  transition: color .2s;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { color: #fff; }
.site-header nav a::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  transform: scaleX(0);
  transition: transform .2s;
}
.site-header nav a:hover::after,
.site-header nav a[aria-current="page"]::after { transform: scaleX(1); }

.header-year {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .14em;
  color: #f7d27a;
}
.menu-toggle { display: none; }

main > [data-view]:not(#home) { min-height: calc(100svh - 160px); }
main > .section[data-view] { padding-top: 136px; }
#seoul { padding-top: 88px; }

/* Intro Gate */
.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: transparent;
  isolation: isolate;
}
.intro-half {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #04070f;
  will-change: transform;
  transition: transform 1.15s cubic-bezier(.7,.02,.2,1), opacity 1s;
}
.intro-half.upper { clip-path: polygon(0 0, 100% 0, 100% 12%, 0 88%); }
.intro-half.lower { clip-path: polygon(0 88%, 100% 12%, 100% 100%, 0 100%); }
.intro-scene {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, #0e384da8, transparent 58%),
    linear-gradient(#060913d8, #060913f2),
    url('assets/hero/hero-sky.webp') center/cover;
}
.intro-seal {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(460px, 58vw, 55svh);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  opacity: .55;
  border-radius: 50%;
  animation: slow-spin 48s linear infinite;
}
.intro-logo {
  position: absolute;
  left: 50%;
  top: 39%;
  width: min(620px, 72vw, 75svh);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 34px #000c);
  animation: intro-reveal 1.2s both;
}
.intro-caption {
  position: absolute;
  top: 78%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  text-align: center;
  transition: opacity .15s;
  animation: intro-reveal 1.5s both;
}
.intro-caption .eyebrow { font-size: 12px; color: #8ce4f5; margin-bottom: 10px; }
.intro-greeting { font-family: var(--serif); font-size: 22px; margin: 0 0 22px; color: #f3f6fb; }
.intro-enter { min-width: 220px; text-align: left; }
.intro-corner {
  position: absolute;
  bottom: 28px;
  left: 4.5vw;
  right: 4.5vw;
  display: flex;
  justify-content: space-between;
  color: #708099;
  font-size: 11px;
  letter-spacing: .12em;
  transition: opacity .15s;
}
.intro-skip {
  position: absolute;
  right: 4.5vw;
  top: 30px;
  padding: 10px 0;
  background: transparent;
  font-size: 13px;
  color: #b4c2d8;
  border-bottom: 1px solid #ffffff40;
}
.slash-line {
  position: absolute;
  left: 0;
  top: 88%;
  width: var(--cut-width, 120%);
  height: 3px;
  background: #fff;
  box-shadow: 0 0 14px 4px var(--cyan), 0 0 48px 12px var(--gold);
  transform: rotate(var(--cut-angle, -30deg)) scaleX(0);
  transform-origin: left;
  opacity: 0;
}
.slash-flash {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  opacity: 0;
  pointer-events: none;
}
.intro.slashing .intro-caption,
.intro.slashing .intro-corner,
.intro.slashing .intro-skip { opacity: 0; pointer-events: none; }
.intro.slashing .slash-line { animation: cut .65s ease-out both; }
.intro.slashing .slash-flash { animation: cut-flash .6s both; }
.intro.slashing .upper { transform: translate(-35%, -75%) rotate(-7deg); opacity: 0; transition-delay: .21s; }
.intro.slashing .lower { transform: translate(35%, 75%) rotate(7deg); opacity: 0; transition-delay: .21s; }

/* 1. Hero Section (#home) : GGW/8888.webp 와이드 블렌딩 */
.hero {
  position: relative;
  isolation: isolate;
  height: 100svh;
  min-height: 700px;
  padding-top: 88px;
  background: var(--ink);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  z-index: -4;
  animation: pan-in 14s ease-out both;
}
.hero-artwork {
  position: absolute;
  top: 96px;
  right: 4vw;
  bottom: 24px;
  width: min(46vw, 680px);
  z-index: -1;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.hero-keyart {
  width: auto;
  height: 100%;
  max-height: calc(100svh - 130px);
  object-fit: contain;
  object-position: center right;
  border-radius: 4px;
  box-shadow: 0 20px 60px #000d, 0 0 40px #22d3ee22;
  border: 1px solid #ffffff28;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, #060913f5 0%, #060913dc 38%, #06091345 66%, #06091318 100%),
    linear-gradient(0deg, #060913 0%, transparent 22%, #06091355 92%);
}
.hero-copy {
  width: min(650px, 50vw);
  margin: 0 0 36px 7vw;
}
.hero-copy .eyebrow { margin: 0 0 18px; }
.hero-logo {
  width: min(390px, 42vw);
  height: auto;
  margin: -10px 0 8px -12px;
  filter: drop-shadow(0 6px 28px #000b);
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1.45;
  letter-spacing: -.045em;
  margin: 0 0 20px;
  font-weight: 700;
}
.hero-description {
  font-size: 17px;
  line-height: 1.95;
  margin: 0 0 32px;
  color: #d6e0ee;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 700;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.primary {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #041019;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  box-shadow: 0 8px 28px #22d3ee33;
}
.primary:hover {
  background: linear-gradient(135deg, #38bdf8, #67e8f9);
  transform: translateY(-2px);
}
.button-mark { font-weight: 400; font-size: 22px; }
.text-button {
  font-size: 15px;
  background: none;
  padding: 10px 0;
  border-bottom: 1px solid #ffffff55;
  color: #e6ecf5;
}
.text-button:hover { color: var(--cyan); border-color: var(--cyan); }

.hero-label {
  position: absolute;
  right: 3.2vw;
  top: 46%;
  writing-mode: vertical-rl;
  display: flex;
  gap: 18px;
  color: #ffffff90;
  text-shadow: 0 2px 16px #000;
}
.hero-label span { font-size: 50px; letter-spacing: .2em; font-weight: 800; }
.hero-label small { font-size: 12px; letter-spacing: .16em; }
.hero-bottom {
  position: absolute;
  bottom: 22px;
  left: 4.5vw;
  right: 4.5vw;
  display: flex;
  justify-content: space-between;
  align-items: end;
  font-size: 11px;
  letter-spacing: .1em;
  color: #9fb0c7;
}
.hero-bottom a { display: flex; align-items: center; gap: 16px; }
.scroll-track {
  display: inline-block;
  width: 1px;
  height: 36px;
  background: #ffffff40;
  position: relative;
  overflow: hidden;
}
.scroll-track::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 15px;
  background: var(--cyan);
  animation: scroll-pulse 2.4s infinite;
}

/* Common Sections */
.section { padding: 105px 8vw; }
.section-heading { max-width: 900px; margin-bottom: 42px; }
.section-heading h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.48;
  letter-spacing: -.045em;
  margin: 14px 0 20px;
  font-weight: 600;
}
.section-heading h2 span { color: #8ce4f5; }
.section-lead { font-size: 16px; color: #b4c2d8; line-height: 1.95; margin: 0; }
.heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.heading-row .section-heading { margin-bottom: 30px; }

/* 2. Beginning / Start Guide (#beginning) */
.beginning {
  background: radial-gradient(ellipse at 85% 0, #0d2b3e80, transparent 40%);
  width: min(1320px, calc(100% - 80px));
  margin-inline: auto;
  padding-inline: 0;
}
.mode-guide {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}
.mode-guide-copy { min-width: 0; }
.mode-guide-copy .section-heading { margin-bottom: 28px; }
.mode-guide h3, .start-subheading h3 {
  font-family: var(--serif);
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: -.04em;
  margin: 12px 0 18px;
}
.mode-introduction > .eyebrow { margin: 0 0 8px; }
.mode-introduction > h3 { font-size: 22px; margin: 0 0 10px; }
.mode-introduction > p:not(.eyebrow),
.start-subheading > p:not(.eyebrow) {
  font-size: 16px;
  line-height: 1.85;
  color: #b3c0d4;
  margin: 0 0 14px;
}
.mode-command-list {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.cmd-chip {
  background: #22d3ee14;
  border: 1px solid #22d3ee55;
  color: #9be8f7;
  padding: 6px 13px;
  font-size: 14px;
  font-weight: 500;
  transition: background .18s, border-color .18s, transform .18s;
}
.cmd-chip:hover {
  background: #22d3ee2b;
  border-color: var(--cyan);
  color: #fff;
  transform: translateY(-1px);
}
.cmd-chip.accent {
  background: #f59e0b1a;
  border-color: #f59e0b70;
  color: #fcd34d;
}
.start-subheading code {
  display: inline-block;
  padding: 1px 8px;
  font-size: 0.92em;
  background: #22d3ee1a;
  border: 1px solid #22d3ee55;
  color: #8ce4f5;
}
.guide-hint {
  border-left: 2px solid var(--cyan);
  padding-left: 14px;
  font-size: 14px;
  line-height: 1.8;
  color: #9bdcf0;
}
.mode-guide .starts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 26px;
}
.mode-guide .starts article {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  column-gap: 20px;
  padding-top: 16px;
  border-top: 1px solid #22d3ee45;
}
.mode-guide .starts article > .eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  font-size: 11px;
  letter-spacing: .06em;
}
.mode-guide .starts h3 {
  grid-column: 1;
  grid-row: 2;
  margin: 5px 0 6px;
  font-size: 20px;
  line-height: 1.5;
  color: #fff;
}
.mode-guide .starts article > p:not(.eyebrow) {
  grid-column: 1;
  grid-row: 3;
  font-size: 13px;
  line-height: 1.65;
  color: #98a8be;
  margin: 0;
}
.mode-guide .starts article > div {
  grid-column: 2;
  grid-row: 1 / span 3;
  border-left: 1px solid var(--line);
  padding: 0 0 0 18px;
  margin: 0;
}
.mode-guide .starts article > div > span {
  font-size: 13px;
  color: #f6c96c;
  line-height: 1.7;
  font-weight: 500;
}
.mode-guide .starts article > div > p {
  font-size: 14px;
  line-height: 1.85;
  color: #c9d3e3;
  margin: 6px 0 0;
}

.mode-poster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.guide-image {
  display: block;
  min-width: 0;
  padding: 0;
  text-align: left;
  background: #0c1220;
  border: 1px solid #ffffff25;
  width: 100%;
  transition: border-color .2s;
}
.guide-image > img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: filter .2s;
}
.guide-image:hover { border-color: var(--cyan); }
.guide-image:hover > img { filter: brightness(1.06); }
.guide-image > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: 13px;
  color: #d8e1ee;
  border-top: 1px solid #ffffff14;
}
.guide-image b { font-weight: 400; color: var(--cyan); font-size: 18px; }

.female-play, .female-notice {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding-top: 38px;
}
.start-subheading { margin-bottom: 28px; }
.female-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}
.female-scenes { display: grid; gap: 24px; }
.female-standing { background: #0c1220; }

.notice-option { border-top: 1px solid var(--line); }
.notice-option:last-child { border-bottom: 1px solid var(--line); }
.notice-option > summary {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  list-style: none;
  cursor: pointer;
}
.notice-option > summary::-webkit-details-marker { display: none; }
.notice-index { color: var(--cyan); font-size: 12px; letter-spacing: .12em; font-weight: 600; }
.notice-option summary strong { display: block; font-size: 17px; font-weight: 500; }
.notice-option summary small { display: block; margin-top: 5px; color: #96a4b8; font-size: 13px; }
.notice-plus { margin-left: auto; font-size: 24px; color: var(--cyan); }
.notice-option[open] .notice-plus { font-size: 0; }
.notice-option[open] .notice-plus::after { content: '−'; font-size: 24px; }
.notice-content { padding: 0 0 28px 40px; min-width: 0; }
.notice-toolbar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.guide-copy {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  background: var(--cyan);
  color: #041019;
  font-size: 14px;
  font-weight: 700;
}
.guide-copy:hover { background: #67e8f9; }
.notice-toolbar p { flex: 1; min-width: 220px; color: #a5b3c7; font-size: 14px; margin: 0; }
.copy-status { font-size: 14px; color: #67e8f9; margin: 12px 0 0; }
.copy-status:empty { display: none; }
.notice-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 14px/1.9 var(--body);
  color: #d0daea;
  background: #090e1a;
  border: 1px solid #ffffff1a;
  padding: 20px;
  margin: 16px 0 0;
}
.manual-copy {
  width: 100%;
  height: 160px;
  margin-top: 14px;
  padding: 14px;
  color: #e5e9f0;
  background: #101829;
  border: 1px solid var(--cyan);
  font: 14px/1.8 var(--body);
}

/* 3. World Archive (#world) : 카테고리별 상세 카드 & 표 & 한 줄 지표 */
.world { background: radial-gradient(ellipse at 100% 0, #0d233a, transparent 55%); }
.world-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 26px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.world-index button {
  padding: 10px 16px;
  background: #0f172a;
  border: 1px solid #ffffff24;
  font-size: 14px;
  font-weight: 500;
  transition: border-color .2s, color .2s;
}
.world-index button:hover { border-color: var(--cyan); color: #8ce4f5; }

/* 숫자·설명 줄 안 깨지는 4열 요약 바 */
.world-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 0 12px;
}
.fact-item {
  background: #0c1324;
  border: 1px solid #ffffff1f;
  border-left: 3px solid var(--cyan);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fact-item strong {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}
.fact-item span {
  font-size: 14px;
  color: #b4c2d8;
  line-height: 1.5;
  word-break: keep-all;
}

.world-chapter {
  padding-top: 56px;
  margin-top: 60px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 106px;
}
.archive-heading { max-width: 920px; margin-bottom: 30px; }
.archive-heading > .eyebrow { margin: 0 0 10px; }
.archive-heading h3 {
  font-family: var(--serif);
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.48;
  letter-spacing: -.04em;
  font-weight: 600;
  margin: 0 0 14px;
}
.archive-heading h3 span { color: #8ce4f5; }
.archive-heading > p:not(.eyebrow) { font-size: 16px; line-height: 1.9; color: #b8c5d9; margin: 0; }

/* 카테고리별 설명 박스 그리드 */
.lore-card-grid {
  display: grid;
  gap: 22px;
}
.lore-card-grid.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lore-card-grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.lore-box {
  background: #0b1222;
  border: 1px solid #ffffff22;
  border-top: 2px solid var(--cyan);
  padding: 26px 26px 28px;
}
.lore-box.highlight-cyan {
  background: linear-gradient(160deg, #0d2138, #0a1120 70%);
  border-color: #22d3ee45;
  border-top: 3px solid var(--cyan);
}
.lore-box.highlight-gold {
  background: linear-gradient(160deg, #241b12, #0a1120 70%);
  border-color: #f59e0b45;
  border-top: 3px solid var(--gold);
}
.lore-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #8ce4f5;
  background: #22d3ee14;
  border: 1px solid #22d3ee40;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.lore-box.highlight-gold .lore-tag {
  color: #fcd34d;
  background: #f59e0b1a;
  border-color: #f59e0b45;
}
.lore-box h4 {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
  margin: 0 0 14px;
  color: #fff;
}
.lore-box p {
  font-size: 15px;
  line-height: 1.9;
  color: #c2cfe2;
  margin: 0;
}
.lore-box p + p { margin-top: 12px; }
.lore-box strong { color: #fff; font-weight: 600; }

.lore-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #c2cfe2;
  font-size: 15px;
  line-height: 1.9;
}
.lore-list li + li { margin-top: 10px; }
.lore-list code {
  background: #22d3ee1a;
  color: #8ce4f5;
  padding: 1px 6px;
  font-size: 0.92em;
}

/* 세계관 비교 표 */
.lore-table-wrap {
  margin-top: 26px;
  background: #0a101f;
  border: 1px solid #ffffff22;
  padding: 24px 26px;
  overflow-x: auto;
}
.sub-table-title {
  font-size: 17px;
  font-weight: 600;
  color: #8ce4f5;
  margin: 0 0 14px;
}
.lore-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.8;
}
.lore-table th, .lore-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid #ffffff17;
  vertical-align: top;
}
.lore-table th {
  color: #8ce4f5;
  font-weight: 600;
  background: #10192e;
  white-space: nowrap;
}
.lore-table td { color: #c7d3e4; }
.lore-table td strong { color: #fff; }

/* 7 Factions Interactive Stage */
.city-viewer {
  position: relative;
  isolation: isolate;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid #ffffff22;
}
.city-viewer > img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  z-index: -3;
}
.city-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, #060913eb 0%, #060913b8 42%, #06091330 80%),
    linear-gradient(0deg, #060913eb 0%, transparent 55%);
}
.city-info { padding: 68px 52px 120px; max-width: 600px; }
.city-info h3 {
  font-family: var(--serif);
  font-size: clamp(34px, 3.8vw, 48px);
  font-weight: 600;
  margin: 10px 0 20px;
  line-height: 1.25;
}
.city-info > p:not(.eyebrow) { font-size: 16px; line-height: 1.95; color: #d4deec; margin: 0; }
.city-number {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .2em;
  color: #8ce4f5;
  margin-top: 18px;
}
.city-select {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid #ffffff2e;
  background: #060913b0;
  backdrop-filter: blur(12px);
}
[role="tab"] {
  color: #a3b1c6;
  background: none;
  border-bottom: 2px solid transparent;
  padding: 18px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
[role="tab"][aria-selected="true"] {
  color: #fff;
  border-color: var(--cyan);
  background: #22d3ee18;
}
[role="tab"]:hover { color: #fff; background: #ffffff0a; }
.tab-index { font-size: 11px; color: #7d8ca3; }
[aria-selected="true"] .tab-index { color: var(--cyan); }

/* 주요 이벤트 모음 & 배경 카드 그리드 (설명 포함) */
.event-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.event-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  text-align: left;
  background: #0c1220;
  border: 1px solid #ffffff22;
  transition: border-color .2s, transform .2s;
}
.event-card:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.event-card > img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.event-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.event-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.event-card-head strong {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}
.event-card-head span {
  font-size: 12px;
  color: var(--cyan);
  white-space: nowrap;
}
.event-card-body p {
  font-size: 14px;
  line-height: 1.8;
  color: #b6c3d6;
  margin: 0;
}

.archive-photo {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  text-align: left;
  background: #0c1220;
  border: 1px solid #ffffff22;
  transition: border-color .2s;
}
.archive-photo > img { width: 100%; aspect-ratio: 1.48; object-fit: cover; }
.archive-photo > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #ced8e8;
  padding: 12px 15px;
}
.archive-photo b { font-weight: 400; font-size: 18px; color: var(--cyan); }
.archive-photo:hover { border-color: var(--cyan); }

/* Monsters */
.monster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.monster-card {
  background: #0c1220;
  border: 1px solid #ffffff20;
  overflow: hidden;
}
.monster-card .archive-photo { border: 0; }
.monster-card > div { padding: 20px; }
.monster-card .eyebrow { font-size: 12px; color: #f6c96c; margin: 0 0 6px; }
.monster-card h5 { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
.monster-card p:not(.eyebrow) { color: #b8c4d6; font-size: 14px; line-height: 1.8; margin: 0; }

/* 4. Characters (#characters) */
.characters { border-top: 1px solid #ffffff0a; }
.character-feature {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 380px;
  background: radial-gradient(ellipse at 22% 60%, #10334a, #0b101d 68%);
  border: 1px solid #22d3ee40;
}
.character-feature > img {
  width: 42%;
  height: 400px;
  object-fit: cover;
  object-position: center 20%;
  mask-image: linear-gradient(90deg, #000 72%, transparent);
}
.character-feature > div { padding: 48px 3.5vw; position: relative; z-index: 1; max-width: 680px; }
.character-feature h3 { font-family: var(--serif); font-size: 40px; line-height: 1.35; margin: 10px 0 18px; }
.character-feature p:not(.eyebrow) { font-size: 16px; color: #c4d0e0; line-height: 1.95; margin: 0 0 22px; }
.feature-sign {
  position: absolute;
  right: 1vw;
  bottom: -40px;
  font-size: 320px;
  line-height: 1;
  font-weight: 900;
  color: #ffffff04;
  pointer-events: none;
}

.roster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 46px 0 22px;
}
.roster-header h3 { font-size: 20px; font-weight: 600; white-space: nowrap; margin: 0; }
.roster-header h3 > span { font-size: 13px; color: var(--cyan); margin-left: 10px; font-weight: 500; }
.roster-filters { display: flex; gap: 22px; flex-wrap: wrap; }
.roster-filters button {
  font-size: 14px;
  color: #98a4b8;
  background: none;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.roster-filters button[aria-pressed="true"] { color: #fff; border-color: var(--cyan); }

.roster-years {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 36px;
}
.roster-years > span { color: #98a4b8; font-size: 13px; margin-right: 8px; }
.roster-years button {
  background: #ffffff08;
  border: 1px solid #ffffff20;
  color: #b9c4d4;
  font-size: 13px;
  padding: 7px 14px;
}
.roster-years button[aria-pressed="true"] {
  border-color: var(--cyan);
  color: #fff;
  background: #22d3ee1a;
}

.roster-groups { display: grid; gap: 44px; }
.roster-group-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.roster-group-heading h3 { margin: 0; color: #eff4fb; font-size: 19px; font-weight: 600; }
.roster-group-heading span { color: #8ce4f5; font-size: 13px; }

.roster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 26px 18px;
}
.person-card { padding: 0; text-align: left; background: none; min-width: 0; }
.person-portrait {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: #0d1424;
  border: 1px solid #ffffff1a;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}
.person-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  transition: transform .5s, filter .3s;
}
.person-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 58%, #060913d8);
  pointer-events: none;
}
.person-portrait > span {
  position: absolute;
  bottom: 10px;
  left: 11px;
  font-size: 11px;
  color: #f3f6fb;
  z-index: 1;
}
.person-portrait > span.portrait-mark {
  left: auto;
  right: 12px;
  font-size: 20px;
  color: var(--cyan);
}
.person-card:hover img { transform: scale(1.04); }
.person-label { padding: 12px 0 4px; }
.person-label h4 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: #fff; }
.person-label > span { font-size: 12px; color: #8ce4f5; }
.person-label .person-summary {
  color: #a6b3c6;
  font-size: 12px;
  line-height: 1.75;
  margin: 8px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.person-label .person-more { display: block; color: #f6c96c; font-size: 11px; margin-top: 8px; }

/* 5. Seoul Nightscape (#seoul) */
.academy-visual {
  height: 500px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.academy-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  position: absolute;
  inset: 0;
}
.academy-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--ink), transparent 80%),
    linear-gradient(90deg, #060913d8, #06091325);
}
.academy-title { position: absolute; left: 8vw; bottom: 56px; }
.academy-title h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 3.8vw, 50px);
  line-height: 1.45;
  letter-spacing: -.045em;
  margin: 12px 0 0;
  font-weight: 600;
}
.academy-content { padding: 10px 8vw 80px; }
.academy-intro {
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
  gap: 7%;
  margin-bottom: 52px;
}
.big-number {
  font-size: 88px;
  line-height: 1.1;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 22px;
  color: #8ce4f5;
}
.big-number small {
  font-size: 12px;
  max-width: 100px;
  line-height: 1.7;
  color: #98a4b8;
}
.academy-intro h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; margin: 0 0 12px; }
.academy-intro p { font-size: 16px; color: #aeb9cb; line-height: 1.9; margin: 0; }
.campus-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.campus-tabs [role="tab"] { padding: 15px 20px; }
.campus-panel {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
}
.campus-panel h3 { font-family: var(--serif); font-size: 32px; line-height: 1.4; margin: 10px 0 18px; }
.campus-panel p:not(.eyebrow) { font-size: 16px; color: #b8c4d6; line-height: 1.95; margin: 0; }

/* 6. Relics & Hierarchy (#relics) */
.combat { background: radial-gradient(ellipse at 40% 35%, #122942, transparent 65%); }
.weapon-stage {
  height: 500px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #ffffff22;
  background: #080d1a;
}
.weapon-stage > img {
  position: absolute;
  width: 62%;
  height: 100%;
  left: 0;
  top: 0;
  object-fit: contain;
  object-position: center;
  padding: 28px;
  z-index: -2;
}
.weapon-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent 25%, #060913d8 58%, #060913f8 100%);
}
.weapon-caption {
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: 36%;
  padding: 24px 0;
}
.weapon-caption h3 { font-family: var(--serif); font-size: 38px; line-height: 1.25; margin: 14px 0 18px; }
.weapon-caption p:not(.eyebrow) { font-size: 16px; color: #c4d0e2; line-height: 1.95; margin: 0 0 16px; }
.weapon-caption > span { font-size: 12px; letter-spacing: .2em; color: #8ce4f5; }
.weapon-tabs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
  background: #090e1c;
}
.combat-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.combat-type-grid article {
  padding: 22px 22px;
  border-top: 2px solid var(--cyan);
  background: #0c1220;
}
.combat-type-grid article.special-rank { border-top-color: var(--gold); }
.combat-type-grid h4 { font-size: 19px; margin: 0 0 10px; font-weight: 600; color: #fff; }
.combat-type-grid p { font-size: 14.5px; line-height: 1.85; color: #b6c3d6; margin: 0 0 12px; }
.combat-type-grid span { display: block; font-size: 13px; color: #8ce4f5; line-height: 1.6; }

/* Profile Dialog & Uncropped Multi-Image Viewer */
dialog {
  padding: 0;
  background: var(--panel);
  color: var(--white);
  border: 1px solid #ffffff30;
}
dialog::backdrop {
  background: #03050bd9;
  backdrop-filter: blur(8px);
}
.dialog-open { overflow: hidden; }
.dialog-close {
  position: absolute;
  right: 14px;
  top: 12px;
  background: #060913cc;
  border: 1px solid #ffffff35;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  width: 42px;
  height: 42px;
  z-index: 3;
  color: #fff;
}
.profile-dialog {
  width: min(1180px, calc(100vw - 48px));
  max-height: calc(100svh - 48px);
  background: linear-gradient(140deg, #10192e, #080d18 72%);
  overflow: auto;
  overscroll-behavior: contain;
}
.profile-dialog[open] { display: block; }
.profile-close {
  position: sticky;
  float: right;
  top: 14px;
  margin: 14px 14px 0 0;
}
.profile-heading {
  padding: 40px 46px 24px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 30px;
}
.profile-heading .eyebrow { margin: 0; color: #8ce4f5; }
.profile-heading h2 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.4;
  margin: 8px 42px 10px 0;
}
.profile-style { color: #f6c96c; font-size: 14px; margin: 0; }
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 40px;
  padding: 0 46px 46px;
  align-items: start;
}
.profile-copy, .profile-card { min-width: 0; }
.profile-quote {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  color: #fff;
  border-left: 3px solid var(--cyan);
  padding: 10px 0 10px 18px;
  margin: 0 0 26px;
  background: #22d3ee0c;
}
.profile-intro {
  color: #d6e0ee;
  font-size: 16px;
  line-height: 1.95;
  margin: 0 0 26px;
}
.profile-section { margin: 0 0 24px; }
.profile-section h3, .spoiler-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: #8ce4f5;
  line-height: 1.6;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.profile-section h3::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--cyan);
  flex: none;
}
.profile-section p, .spoiler-content p {
  color: #b8c4d6;
  font-size: 15px;
  line-height: 1.9;
  margin: 0;
}
.profile-card { position: sticky; top: 24px; }
.profile-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}
.profile-pose-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-pose-tabs button {
  padding: 6px 12px;
  font-size: 13px;
  background: #ffffff0c;
  border: 1px solid #ffffff24;
  color: #c2cee0;
}
.profile-pose-tabs button[aria-selected="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #041019;
  font-weight: 700;
}
.profile-namecard {
  display: block;
  width: 100%;
  padding: 0;
  background: #060913;
  border: 1px solid #ffffff28;
  text-align: left;
  overflow: hidden;
}
.profile-namecard img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72svh;
  object-fit: contain;
  margin: 0 auto;
}
.profile-namecard > span {
  display: flex;
  justify-content: space-between;
  color: #8ce4f5;
  font-size: 13px;
  padding: 12px 16px;
  border-top: 1px solid #ffffff14;
}
.profile-namecard:hover { border-color: var(--cyan); }

/* Extra & Spoiler Details */
.profile-extra {
  border-top: 1px solid #ffffff20;
  border-bottom: 1px solid #ffffff20;
  margin-top: 26px;
}
.profile-extra > summary {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  cursor: pointer;
  list-style: none;
  padding: 17px 0;
  color: #d6e0ee;
  font-size: 14px;
  font-weight: 500;
}
.profile-extra > summary::-webkit-details-marker { display: none; }
.profile-extra > summary::after { content: "+"; color: var(--cyan); font-size: 18px; }
.profile-extra[open] > summary::after { content: "−"; }
.profile-extra-copy { padding: 6px 0 22px; }
.profile-extra-copy section + section { margin-top: 20px; }
.profile-extra-copy h3 { font-size: 15px; font-weight: 600; color: #f6c96c; margin: 0 0 6px; }
.profile-extra-copy p { color: #b8c4d6; font-size: 14px; line-height: 1.9; margin: 0; }

.spoiler-details {
  border: 1px solid #f59e0b4a;
  background: #f59e0b0d;
}
.person-spoiler { margin-top: 24px; }
.spoiler-details > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 18px 20px;
  cursor: pointer;
  color: #f7e3b5;
}
.spoiler-details > summary::-webkit-details-marker { display: none; }
.spoiler-badge {
  display: inline-block;
  color: #fcd34d;
  border: 1px solid #f59e0b66;
  background: #f59e0b1a;
  padding: 3px 8px;
  font-size: 11px;
  flex: none;
}
.spoiler-label { flex: 1; font-size: 15px; font-weight: 500; }
.spoiler-label small { font-size: 11px; color: #f59e0b; margin-right: 10px; }
.spoiler-indicator::after { content: '+'; font-size: 20px; color: #fcd34d; }
.spoiler-details[open] > summary .spoiler-indicator::after { content: '−'; }
.spoiler-content { border-top: 1px solid #f59e0b30; padding: 22px 24px; }
.spoiler-content section + section { margin-top: 20px; }
.spoiler-content p + p { margin-top: 12px; }
.world-secrets { border-top: 1px solid var(--line); margin-top: 70px; padding-top: 52px; }
.secret-reader-note { color: #98a4b8; font-size: 14px; margin: 0 0 24px; }
.secret-archive { display: grid; gap: 14px; }

/* Fullscreen Image Lightbox with Situation Description */
.namecard-dialog {
  width: min(1260px, calc(100vw - 36px));
  max-height: calc(100svh - 36px);
  background: #050811;
  border: 1px solid #ffffff35;
  overflow: hidden;
}
#image-dialog[open] { display: flex; flex-direction: column; }
#image-dialog .namecard-controls {
  position: static;
  order: -1;
  flex: none;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #080d1a;
  border-bottom: 1px solid #ffffff1a;
  width: 100%;
}
.lightbox-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
.lightbox-buttons { display: flex; gap: 8px; }
.namecard-controls button {
  position: static;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #ffffff55;
  background: #0c1222;
  border-radius: 50%;
  color: #fff;
}
.namecard-zoom svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#image-dialog .namecard-stage {
  overflow: auto;
  min-height: 0;
  max-height: calc(100svh - 170px);
  background: #04060d;
}
#image-dialog .namecard-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100svh - 170px);
  object-fit: contain;
  margin: auto;
}
.lightbox-caption {
  padding: 16px 22px;
  background: #090f1e;
  border-top: 1px solid #ffffff1a;
  color: #d0daea;
  font-size: 15px;
  line-height: 1.8;
  margin: 0;
}
#image-dialog.namecard-enlarged .namecard-stage { height: calc(100svh - 160px); }
#image-dialog.namecard-enlarged .namecard-image { width: auto; max-width: none; max-height: none; margin: 0; }

/* Footer */
footer {
  margin: 0 8vw;
  padding: 44px 0 34px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
footer p { font-size: 13px; color: var(--muted); margin: 0; }
footer > span { font-size: 12px; color: #6e7b91; }

@keyframes intro-reveal { from { opacity: 0; filter: blur(9px); } to { opacity: 1; filter: blur(0); } }
@keyframes slow-spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes cut {
  0% { opacity: 0; transform: rotate(var(--cut-angle, -30deg)) scaleX(0); }
  15% { opacity: 1; }
  35% { transform: rotate(var(--cut-angle, -30deg)) scaleX(1); opacity: 1; }
  100% { transform: rotate(var(--cut-angle, -30deg)) scaleX(1); opacity: 0; }
}
@keyframes cut-flash { 0%, 12%, 100% { opacity: 0; } 24% { opacity: .22; } }
@keyframes pan-in { from { transform: scale(1.06); } to { transform: scale(1); } }
@keyframes scroll-pulse { to { transform: translateY(45px); } }

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .roster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .combat-type-grid, .lore-card-grid.three-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-guide { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  body.view-home { height: auto; overflow-y: auto; }
  .site-header { height: 74px; }
  .header-year { display: none; }
  .hero {
    height: auto;
    min-height: 100svh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 94px 6vw 56px;
    gap: 24px;
  }
  .hero-artwork {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(100%, 400px);
    opacity: 1;
    z-index: 1;
    margin: 0 auto;
    justify-content: center;
  }
  .hero-keyart {
    width: 100%;
    height: auto;
    max-height: 56svh;
    object-position: center;
  }
  .hero-copy {
    width: 100%;
    margin: 0;
    z-index: 2;
  }
  .hero-logo { width: min(300px, 68vw); margin: 0 0 8px -6px; }
  .heading-row { display: block; }
  .heading-row .section-lead { margin-bottom: 28px; }
  .lore-card-grid.three-cols, .lore-card-grid.two-cols, .event-card-grid, .monster-grid, .campus-panel, .academy-intro {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .character-feature { flex-direction: column; min-height: 0; }
  .character-feature > img {
    width: 100%;
    height: 300px;
    object-position: center 18%;
    mask-image: linear-gradient(180deg, #000 72%, transparent);
  }
  .character-feature > div { padding: 24px 24px 30px; }
  .character-feature h3 { font-size: 30px; }
  .roster-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .city-viewer { height: auto; min-height: 460px; padding-bottom: 62px; }
  .city-info {
    position: relative;
    left: auto;
    bottom: auto;
    max-width: 100%;
    padding: 220px 22px 24px;
  }
  .city-select, .weapon-tabs, .campus-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .city-select [role="tab"], .weapon-tabs [role="tab"], .campus-tabs [role="tab"] {
    flex: 0 0 auto;
    padding: 15px 18px;
  }
  .weapon-stage { height: auto; min-height: 460px; display: flex; flex-direction: column; }
  .weapon-stage > img { position: relative; width: 100%; height: 250px; padding: 20px; }
  .weapon-stage::after { background: linear-gradient(0deg, #060913 30%, #060913cc 62%, transparent 90%); }
  .weapon-caption { position: relative; top: auto; bottom: auto; left: auto; right: auto; width: 100%; transform: none; padding: 12px 22px 26px; }
  .weapon-caption h3 { font-size: 28px; margin: 8px 0 12px; }
  .profile-grid { grid-template-columns: 1fr; gap: 24px; padding: 0 22px 32px; }
  .profile-card { order: -1; position: static; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; line-height: 1.78; }
  .site-header { height: 64px; padding: 0 5vw; }
  .wordmark span { font-size: 18px; }
  .wordmark small { font-size: 9.5px; margin-top: 3px; letter-spacing: .12em; }
  .menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: transparent;
  }
  .menu-toggle span { width: 22px; height: 2px; background: #fff; }
  .site-header nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    padding: 16px 6vw 22px;
    background: #060913f8;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--line);
  }
  .site-header nav.open { display: flex; }
  .site-header nav a { font-size: 16px; padding: 11px 0; }
  .intro-logo { width: 84vw; top: 36%; }
  .intro-greeting { font-size: 18px; }
  .hero { padding: 80px 5vw 44px; gap: 20px; }
  .hero h1 { font-size: 26px; line-height: 1.42; margin-bottom: 14px; }
  .hero-description { font-size: 15.5px; line-height: 1.8; margin-bottom: 22px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-actions .button { width: 100%; justify-content: space-between; }
  main > .section[data-view] { padding-top: 90px; }
  .section { padding: 64px 5vw; }
  .beginning { width: calc(100% - 24px); padding-left: 16px; padding-right: 16px; }
  .mode-poster-grid, .female-gallery, .world-facts { grid-template-columns: 1fr; }
  .cmd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .world-index { padding: 12px; gap: 8px; }
  .world-index button { font-size: 13px; padding: 8px 12px; flex: 1 1 calc(50% - 8px); text-align: center; }
  .lore-box { padding: 20px 18px; }
  .lore-box h4 { font-size: 18px; }
  .lore-table { min-width: 520px; }
  .lore-table th, .lore-table td { padding: 11px 13px; font-size: 14.5px; }
  .mode-guide .starts article { display: block; }
  .mode-guide .starts article > div { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; margin-top: 10px; }
  .roster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .combat-type-grid { grid-template-columns: 1fr; }
  .academy-visual { height: 320px; }
  .academy-title { left: 5vw; right: 5vw; bottom: 28px; }
  .academy-content { padding: 10px 5vw 60px; }
  .big-number { font-size: 56px; }
  .profile-dialog { width: calc(100% - 16px); max-height: 92svh; }
  .profile-heading { padding: 24px 18px 16px; }
  .profile-heading h2 { font-size: 25px; }
  .profile-grid { padding: 0 18px 26px; }
  .lightbox-caption { padding: 12px 14px; font-size: 14px; }
}

/* 경기천년체 & KoPubWorld 타이포그래피 가독성 최적화 */
h1, h2, h3, h4, h5,
.site-header nav a,
.world-index button,
.fact-item strong,
.sub-table-title,
.lore-tag,
.spoiler-label,
.person-label h4,
.roster-filters button,
.roster-years button,
.cmd-chip strong {
  font-family: var(--serif);
  letter-spacing: -0.02em;
}

.hero-copy h1,
.section-heading h2,
.archive-heading h3,
.profile-quote {
  font-family: var(--batang);
  letter-spacing: -0.025em;
}

.lore-box p,
.lore-list li,
.lore-table td,
.event-card-body p,
.monster-card p,
.profile-intro,
.profile-section p,
.spoiler-content p,
.section-lead {
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.86;
  letter-spacing: -0.012em;
  color: #e4ebf5;
}

.lore-table th {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: -0.01em;
}

