/* ============================================================
   《너의 찬란한 판타지아》 공식 세계관 아카이브 스타일시트
   방향: 파스텔 창공 · 양피지 · 황동 헤어라인 (Granblue Editorial + Unslop)
   ============================================================ */

@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: 'LevelUp';
  src: url('assets/fonts/LevelUp-Bold.otf') format('opentype');
  font-weight: 700;
  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: 700;
  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 {
  --bg: #f7f3e8;
  --surface: #fffdf8;
  --surface-tint: #efe8d8;
  --surface-subtle: #f3ede0;

  --ink: #1b283f;
  --ink-sec: #44536b;
  --ink-muted: #6c7b93;

  --accent: #1f5f9e;
  --accent-hover: #17497b;
  --accent-soft: rgba(31, 95, 158, 0.10);

  --brass: #b0853c;
  --brass-line: rgba(176, 133, 60, 0.36);
  --brass-soft: rgba(176, 133, 60, 0.12);

  --line: rgba(27, 40, 63, 0.11);
  --line-strong: rgba(27, 40, 63, 0.20);

  --shadow-sm: 0 2px 10px rgba(27, 40, 63, 0.06);
  --shadow-md: 0 12px 32px rgba(27, 40, 63, 0.10);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-display: 'LevelUp', 'KoPubWorldDotum', sans-serif;
  --font-body: 'KoPubWorldDotum', 'LevelUp', sans-serif;
  --font-quote: 'GyeonggiBatang', Georgia, serif;

  --header-h: 64px;
  --container-w: 1180px;
  --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;
}

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

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

button,
input {
  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: 10px 16px;
  background: var(--ink);
  color: #fff;
  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.75;
  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, 243, 232, 0.90);
  backdrop-filter: blur(12px);
  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: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  flex-shrink: 0;
}

.wordmark-logo {
  display: block;
  height: 58px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s var(--ease);
}

.wordmark:hover .wordmark-logo {
  transform: translateY(-1px);
}

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

.site-nav a {
  position: relative;
  padding: 8px 14px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-sec);
  transition: color 0.18s var(--ease);
}

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

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

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

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

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

/* ==================== 공통 타이포그래피 · 밴드 · 버튼 ==================== */
.band {
  padding: 72px 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;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
}

.eyebrow-light {
  color: #f3dcab;
}

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

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

.subsection-title {
  margin: 40px 0 16px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  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 14px;
  color: var(--ink-sec);
  font-size: 15px;
  line-height: 1.75;
}

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

.muted-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.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.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

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

.btn-secondary {
  background: rgba(255, 253, 248, 0.90);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  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: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

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

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

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

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

/* ==================== 0. 기공선 오프닝 인트로 ==================== */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  overflow: hidden;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.65s var(--ease);
}

.intro-overlay.is-playing {
  display: flex;
}

.intro-overlay.is-fading {
  opacity: 0;
  pointer-events: none;
}

.intro-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(170deg, #8ec5ee 0%, #c8e5f8 48%, #f7f3e8 100%);
}

.intro-clouds {
  position: absolute;
  inset: -10% -20%;
  pointer-events: none;
}

.intro-clouds-back {
  background:
    radial-gradient(ellipse 46% 24% at 22% 74%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(ellipse 52% 26% at 72% 68%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 40% 20% at 48% 82%, rgba(247, 243, 232, 0.92) 0%, rgba(247, 243, 232, 0) 72%);
  animation: introCloudDrift 2.0s var(--ease) forwards;
}

.intro-clouds-front {
  background:
    radial-gradient(ellipse 44% 22% at 15% 88%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 48% 24% at 86% 86%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 70%);
  animation: introCloudPart 1.85s var(--ease) forwards;
}

.intro-brand {
  position: relative;
  z-index: 4;
  margin-top: 26vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: introBrandFlash 1.55s var(--ease) forwards;
}

.intro-logo {
  display: block;
  width: min(76vw, 460px);
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(255, 255, 255, 0.88));
}

.intro-ship-track {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.intro-wind-trail {
  position: absolute;
  width: 72vw;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.78) 55%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(-16deg);
  opacity: 0;
  animation: introWindSweep 1.35s var(--ease) forwards;
}

.intro-ship {
  width: min(62vw, 680px);
  height: auto;
  filter: drop-shadow(0 22px 34px rgba(27, 40, 63, 0.24));
  will-change: transform, opacity;
  animation: introShipFly 1.55s cubic-bezier(0.28, 0.08, 0.22, 1) forwards;
}

.intro-skip {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 5;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid var(--brass-line);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sec);
}

.intro-skip:hover {
  background: var(--surface);
  color: var(--ink);
}

@keyframes introShipFly {
  0% {
    opacity: 0;
    transform: translate3d(-58vw, 24vh, 0) scale(0.56) rotate(-3deg);
  }
  16% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(62vw, -28vh, 0) scale(1.22) rotate(-7deg);
  }
}

@keyframes introWindSweep {
  0% {
    opacity: 0;
    transform: translate3d(-45vw, 18vh, 0) rotate(-18deg) scaleX(0.5);
  }
  35% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translate3d(42vw, -18vh, 0) rotate(-18deg) scaleX(1.3);
  }
}

@keyframes introBrandFlash {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  26% {
    opacity: 1;
    transform: translateY(0);
  }
  74% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes introCloudDrift {
  0% {
    transform: translate3d(-4%, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(6%, -4%, 0) scale(1.08);
  }
}

@keyframes introCloudPart {
  0% {
    opacity: 0.92;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(10%) scale(1.14);
  }
}

/* ==================== 1. 홈 (#home) — 라이브 창공 히어로 + 명함 쇼케이스 ==================== */
.hero {
  position: relative;
  min-height: 620px;
  height: calc(100vh - var(--header-h));
  max-height: 780px;
  overflow: hidden;
  border-bottom: 1px solid var(--brass-line);
  background: #c7e2f6;
}

.hero-live-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-backdrop {
  position: absolute;
  inset: -5%;
  width: 110%;
  max-width: none;
  height: 110%;
  object-fit: cover;
  object-position: center 35%;
  will-change: transform;
  animation: heroSkyDrift 26s ease-in-out infinite alternate;
}

@keyframes heroSkyDrift {
  0% {
    transform: scale(1.02) translate3d(0%, 0%, 0);
  }
  100% {
    transform: scale(1.08) translate3d(-2.2%, -1.2%, 0);
  }
}

.hero-airship-layer {
  position: absolute;
  top: 10%;
  left: -18%;
  width: 220px;
  opacity: 0.56;
  will-change: transform;
  animation: heroShipCruise 42s linear infinite;
}

.hero-airship-cruiser {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 14px rgba(27, 40, 63, 0.16));
  animation: heroShipBob 5.4s ease-in-out infinite alternate;
}

@keyframes heroShipCruise {
  0% {
    transform: translate3d(0, 26px, 0) scale(0.84);
  }
  50% {
    transform: translate3d(66vw, -16px, 0) scale(0.98);
  }
  100% {
    transform: translate3d(134vw, -48px, 0) scale(0.88);
  }
}

@keyframes heroShipBob {
  0% {
    transform: translateY(-6px) rotate(-1deg);
  }
  100% {
    transform: translateY(7px) rotate(1.2deg);
  }
}

.hero-cloud-band {
  position: absolute;
  left: -20%;
  width: 240%;
  pointer-events: none;
  will-change: transform;
}

.hero-cloud-band-a {
  bottom: -6%;
  height: 44%;
  opacity: 0.62;
  background:
    radial-gradient(ellipse 22% 58% at 12% 85%, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 26% 66% at 36% 90%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 24% 62% at 62% 84%, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 22% 58% at 88% 88%, rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0) 70%);
  animation: heroCloudScrollA 32s linear infinite;
}

.hero-cloud-band-b {
  top: 4%;
  height: 36%;
  opacity: 0.42;
  background:
    radial-gradient(ellipse 20% 48% at 18% 35%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 24% 52% at 54% 28%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 20% 46% at 84% 38%, rgba(255, 255, 255, 0.76) 0%, rgba(255, 255, 255, 0) 70%);
  animation: heroCloudScrollB 48s linear infinite;
}

@keyframes heroCloudScrollA {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  100% {
    transform: translate3d(-34%, 0, 0);
  }
}

@keyframes heroCloudScrollB {
  0% {
    transform: translate3d(-28%, 0, 0);
  }
  100% {
    transform: translate3d(6%, 0, 0);
  }
}

.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(96deg,
      rgba(247, 243, 232, 0.92) 0%,
      rgba(247, 243, 232, 0.80) 34%,
      rgba(247, 243, 232, 0.22) 60%,
      rgba(247, 243, 232, 0.04) 100%),
    linear-gradient(180deg,
      rgba(247, 243, 232, 0.0) 78%,
      rgba(247, 243, 232, 0.90) 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.15fr);
  align-items: center;
  gap: 32px;
}

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

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

body.hero-ready .hero-stagger-1 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.04s;
}

body.hero-ready .hero-stagger-2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.12s;
}

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

body.hero-ready .hero-stagger-4 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.28s;
}

.hero-title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.8vw, 56px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ink);
}

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

.hero-logo-img {
  display: block;
  width: min(100%, 416px);
  max-width: 416px;
  height: auto;
  margin-left: -10px;
  filter: drop-shadow(0 6px 18px rgba(247, 243, 232, 0.78));
}

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

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

.btn-replay-intro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brass-line);
  background: rgba(255, 253, 248, 0.78);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-sec);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.btn-replay-intro .icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}

.btn-replay-intro:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stage {
  position: relative;
  height: 100%;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  transform: translate3d(72px, 0, 0);
  transition: opacity 0.68s var(--ease) 0.14s, transform 0.68s var(--ease) 0.14s;
}

body.hero-ready .hero-stage {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.hero-card-stage {
  position: relative;
  width: 100%;
  max-width: 580px;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-lg);
  border: 1px solid var(--brass-line);
  background: rgba(255, 253, 248, 0.65);
  box-shadow: 0 22px 48px rgba(27, 40, 63, 0.22);
  overflow: hidden;
  cursor: pointer;
}

.hero-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  will-change: transform, opacity;
}

.hero-card-img.is-whoosh {
  animation: heroCardWhoosh 0.56s var(--ease) forwards;
}

@keyframes heroCardWhoosh {
  0% {
    opacity: 0;
    transform: translate3d(76px, 0, 0) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.hero-card-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--brass);
  transform-origin: left center;
  transform: scaleX(0);
}

.hero-card-progress.is-running {
  animation: heroProgressFill 5.5s linear forwards;
}

.hero-stage.is-paused .hero-card-progress.is-running {
  animation-play-state: paused;
}

@keyframes heroProgressFill {
  0% {
    transform: scaleX(0);
  }
  100% {
    transform: scaleX(1);
  }
}

.hero-character-bar {
  position: relative;
  width: 100%;
  max-width: 580px;
  flex-shrink: 0;
  padding: 10px 16px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-character-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

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

.hero-char-power {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.hero-thumb-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(27, 40, 63, 0.16);
  background: var(--surface-tint);
  transition: border-color 0.18s var(--ease), opacity 0.18s var(--ease);
  opacity: 0.72;
}

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

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

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

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

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

.editorial-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--brass-line);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

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

/* 홈 로스터 프리뷰 */
.home-roster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

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

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

.roster-card-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 14%;
  background: var(--surface-tint);
}

.roster-card-body {
  padding: 12px;
}

.roster-card-faction {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 2px;
}

.roster-card-name {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.roster-card-role {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 홈 DLC 4공역 그리드 */
.dlc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dlc-card {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--brass-line);
  aspect-ratio: 16 / 9;
  background: var(--ink);
  text-align: left;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.dlc-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.dlc-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dlc-card-overlay {
  position: absolute;
  inset: 0;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(16, 25, 41, 0.05) 35%, rgba(16, 25, 41, 0.86) 100%);
  color: #fff;
}

.dlc-card-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: #f3dcab;
  margin-bottom: 4px;
}

.dlc-card-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.dlc-card-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}

/* ==================== 서브 페이지 공통 배너 ==================== */
.page-banner {
  position: relative;
  min-height: 240px;
  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;
}

.page-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 28, 46, 0.36) 0%, rgba(18, 28, 46, 0.84) 100%);
}

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

.page-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-lead {
  margin: 0;
  max-width: 680px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

/* ==================== 2. 세계관 (#world) ==================== */
.timeline {
  display: grid;
  gap: 16px;
  border-left: 2px solid var(--brass-line);
  padding-left: 24px;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 26px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: var(--surface);
  border: 2px solid var(--brass);
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 8px;
}

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

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

.timeline-chars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-body {
  margin: 0;
  font-size: 15px;
  color: var(--ink-sec);
  line-height: 1.75;
}

.timeline-notes {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 10px;
}

.timeline-note {
  padding: 10px 14px;
  background: var(--surface-subtle);
  border-left: 2px solid var(--brass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.timeline-note-term {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}

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

.timeline-poem {
  margin-top: 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.timeline-poem summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-poem summary::-webkit-details-marker {
  display: none;
}

.timeline-poem summary::after {
  content: '+';
  font-size: 16px;
  line-height: 1;
  color: var(--brass);
}

.timeline-poem[open] summary::after {
  content: '−';
}

.timeline-poem-list {
  list-style: none;
  margin: 12px 0 4px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.timeline-poem-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.6;
}

.timeline-poem-place {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--brass);
}

.timeline-poem-line {
  font-family: var(--font-quote);
  color: var(--ink);
}

/* 데이터 테이블 */
.zone-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.data-table th {
  background: var(--surface-subtle);
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

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

.data-table td:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.data-table td {
  color: var(--ink-sec);
}

/* 2단 정보 카드 */
.two-col-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

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

.card-heading {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

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

.rank-pill {
  min-width: 40px;
  height: 32px;
  padding: 0 11px;
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  color: var(--ink-sec);
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease), color 0.16s var(--ease);
}

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

.rank-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.rank-detail {
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--surface-subtle);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-sm);
}

.rank-detail-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.rank-detail-grade {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.rank-detail-tier {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
}

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

.rank-example-list {
  display: grid;
  gap: 8px;
}

.rank-example-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.rank-example-text {
  min-width: 0;
}

.rank-example-power {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.rank-example-note {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

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

.clean-list li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-sec);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

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

.clean-list strong {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

/* 3대 칭호 */
.titles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

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

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

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

.title-members {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.member-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

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

/* ==================== 필터 바 공통 ==================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

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

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

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

/* ==================== 3. 하늘섬 (#islands) ==================== */
.world-map-block {
  margin-bottom: 40px;
}

.world-map-card {
  background: var(--surface);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.world-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 18px;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-sec);
}

.world-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.is-high { background: #2e7ec8; }
.legend-dot.is-mid { background: var(--brass); }
.legend-dot.is-low { background: #b83b48; }
.legend-dot.is-start { background: #c82d3f; box-shadow: 0 0 0 2px rgba(255, 224, 130, 0.9); }

.world-map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e6eef7;
  overflow: hidden;
}

.world-map-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.world-map-pins {
  position: absolute;
  inset: 0;
}

.map-pin {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.18s var(--ease);
}

.map-pin:hover,
.map-pin.is-active {
  z-index: 25;
}

.map-pin-dot {
  position: relative;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: var(--brass);
  box-shadow: 0 2px 8px rgba(27, 40, 63, 0.36);
  transition: transform 0.18s var(--ease);
}

.map-pin.is-high .map-pin-dot {
  background: #2e7ec8;
}

.map-pin.is-low .map-pin-dot {
  background: #b83b48;
}

.map-pin.is-start .map-pin-dot {
  width: 15px;
  height: 15px;
  background: #c82d3f;
  box-shadow: 0 0 0 3px rgba(255, 224, 130, 0.85), 0 2px 10px rgba(200, 45, 63, 0.45);
}

.map-pin.is-start .map-pin-dot::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(200, 45, 63, 0.72);
  animation: mapPinPulse 2.1s ease-out infinite;
}

@keyframes mapPinPulse {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.map-pin.is-active .map-pin-dot {
  transform: scale(1.22);
}

.map-pin-label {
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(252, 248, 239, 0.94);
  border: 1px solid rgba(176, 133, 60, 0.78);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(27, 40, 63, 0.16);
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.map-pin.is-start .map-pin-label {
  background: rgba(196, 44, 62, 0.94);
  border-color: #ffe082;
  color: #fff;
}

.map-pin.is-active:not(.is-start) .map-pin-label {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.world-map-info {
  padding: 18px 22px;
  border-top: 1px solid var(--brass-line);
  background: var(--surface-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.world-map-info-main {
  flex: 1 1 420px;
  min-width: 0;
}

.world-map-info-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.world-map-info-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

.world-map-info-tier {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

.world-map-start-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(196, 44, 62, 0.12);
  border: 1px solid rgba(196, 44, 62, 0.35);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: #a82433;
}

.world-map-info-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-sec);
}

.island-card.is-flash {
  animation: islandFlash 1.4s var(--ease);
}

@keyframes islandFlash {
  0%, 100% { border-color: var(--line); box-shadow: none; }
  30% { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(176, 133, 60, 0.25); }
}

.islands-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

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

.island-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  overflow: hidden;
}

.island-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.island-bg-switch {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  background: rgba(27, 40, 63, 0.78);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.island-bg-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}

.island-bg-btn.is-active {
  background: #fff;
  color: var(--ink);
}

.island-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.island-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.island-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
}

.island-tier {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
  flex-shrink: 0;
}

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

.island-conflict {
  padding: 10px 12px;
  border-left: 2px solid var(--brass);
  background: var(--surface-subtle);
  font-size: 13px;
  color: var(--ink-sec);
  line-height: 1.6;
}

.island-conflict strong {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--ink);
  margin-bottom: 2px;
}

.island-specialty {
  font-size: 13px;
  color: var(--ink-muted);
}

.island-chars {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 사건 카드 */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

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

.media-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
  background: var(--ink);
}

.media-card-body {
  padding: 16px 18px 18px;
}

.media-card-tag {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

.media-card-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

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

/* ==================== 4. 등장인물 (#characters) — 그랑블루 스테이지 ==================== */
.char-stage {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--brass-line);
  background: #e6dfd0;
}

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

.char-stage-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(247, 243, 232, 0.56) 0%, rgba(247, 243, 232, 0.86) 56%, rgba(247, 243, 232, 0.94) 100%),
    linear-gradient(180deg, rgba(247, 243, 232, 0.16) 0%, rgba(247, 243, 232, 0.92) 100%);
}

.char-stage-inner {
  position: relative;
  z-index: 2;
  padding-top: 24px;
  padding-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.char-visual-col {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.char-artwork-frame {
  width: 100%;
  height: 510px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.char-artwork-frame.is-framed {
  align-items: center;
}

.char-artwork {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transition: opacity 0.2s var(--ease);
}

.char-artwork.is-standing {
  height: 100%;
  filter: drop-shadow(0 16px 26px rgba(27, 40, 63, 0.22));
}

.char-artwork.is-framed-img {
  border-radius: var(--radius-md);
  border: 1px solid var(--brass-line);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}

.char-view-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--brass-line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.view-tab {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sec);
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

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

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

.view-tab-zoom {
  width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
  border-radius: 0 999px 999px 0;
  margin-left: 2px;
}

.view-tab-zoom .icon {
  width: 15px;
  height: 15px;
}

/* 양피지 프로필 시트 */
.char-sheet {
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid var(--brass-line);
  border-top: 3px solid var(--brass);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

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

.tag-rank {
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--ink);
}

.tag-group {
  background: var(--brass-soft);
  color: #7c581c;
}

.tag-dlc {
  background: #23324d;
  color: #f3dcab;
}

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

.char-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.char-code {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

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

.char-meta-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  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-label {
  font-size: 11px;
  color: var(--ink-muted);
}

.meta-value {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.char-power-box,
.char-ship-box {
  padding: 12px 14px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

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

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

.power-desc,
.char-ship-box p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-sec);
}

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

.bio-tab {
  position: relative;
  padding: 8px 2px 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.16s 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: 120px;
  font-size: 14px;
  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;
}

.bio-appearance {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-muted);
}

.bio-appearance strong {
  color: var(--ink-sec);
  font-weight: 600;
}

.quote-list {
  display: grid;
  gap: 10px;
}

.quote-item {
  margin: 0;
  padding: 10px 14px;
  background: var(--surface-subtle);
  border-left: 2px solid var(--brass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quote-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 2px;
}

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

.char-nav-arrows {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* 도감 컨트롤 & 포트레이트 그리드 */
.directory-controls {
  margin-bottom: 24px;
}

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

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

.directory-count {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.directory-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.toggle-dlc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sec);
  cursor: pointer;
  user-select: none;
}

.toggle-dlc input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap .icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  pointer-events: none;
}

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

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

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}

.char-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: left;
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

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

.char-tile.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(31, 95, 158, 0.16);
}

.char-tile-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-tint);
  overflow: hidden;
}

.char-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
}

.char-tile-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(27, 40, 63, 0.84);
  color: #f3dcab;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
}

.char-tile-meta {
  padding: 8px 10px 10px;
}

.char-tile-name {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.char-tile-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ==================== 5. 함선 · 보물 · 성수 · 괴수 (#systems) ==================== */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

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

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

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

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

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

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

.beast-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

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

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

/* ==================== 6. 시작 안내 · 명령어 · 여캐플 (#guide) ==================== */
.scenarios-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

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

.scenario-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-align: left;
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease);
}

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

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

.scenario-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.scenario-btn-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.scenario-btn-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scenario-btn-tag {
  font-size: 11px;
  color: var(--ink-muted);
}

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

.scenario-detail-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  cursor: zoom-in;
  background: var(--ink);
}

.scenario-detail-body {
  padding: 24px 28px 28px;
}

.scenario-detail-tag {
  display: inline-block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

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

.scenario-excerpt {
  display: grid;
  gap: 12px;
  font-family: var(--font-quote);
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-sec);
}

.scenario-excerpt p {
  margin: 0;
}

.scenario-excerpt p.is-dialogue {
  padding-left: 12px;
  border-left: 2px solid var(--brass-line);
  color: var(--ink);
}

/* 명령어 칩 & 상세 */
.cmd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.cmd-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);
  transition: border-color 0.16s var(--ease), background-color 0.16s var(--ease), color 0.16s var(--ease);
}

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

.cmd-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.cmd-detail {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cmd-detail-main {
  flex: 1 1 360px;
}

.cmd-detail-cat {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
  margin-bottom: 4px;
}

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

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

.cmd-sample {
  display: inline-block;
  padding: 8px 12px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink);
}

.cmd-copy-btn {
  flex-shrink: 0;
}

/* !여캐플 전용 쇼케이스 */
.fe-showcase {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 36px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-lg);
}

.fe-standing-wrap {
  aspect-ratio: 7 / 9;
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.fe-standing-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  cursor: zoom-in;
}

.fe-info h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
}

.fe-card-preview {
  margin-top: 18px;
  max-width: 420px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brass-line);
  overflow: hidden;
  cursor: zoom-in;
}

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  display: block;
  height: 56px;
  width: auto;
  object-fit: contain;
}

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

.footer-brand span {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ==================== 1~5등급 함선 누끼 쇼케이스 (#systems) ==================== */
.ship-tiers-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.ship-tier-card {
  grid-column: span 2;
  background: var(--surface);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.ship-tier-card.is-wide {
  grid-column: span 3;
}

.ship-tier-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.ship-tier-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 18px 20px;
  background: linear-gradient(180deg, #c6dff5 0%, #e4f1fb 62%, #f7f3e8 100%);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}

.ship-tier-card.is-wide .ship-tier-stage {
  aspect-ratio: 16 / 9;
  padding: 20px 28px;
}

.ship-tier-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(27, 40, 63, 0.22));
  transition: transform 0.28s var(--ease);
}

.ship-tier-card:hover .ship-tier-img {
  transform: translateY(-4px) scale(1.03);
}

.ship-tier-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ship-tier-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ship-tier-grade {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(29, 95, 160, 0.22);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.ship-tier-crew {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brass);
}

.ship-tier-kind {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.ship-tier-note {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-sec);
}

/* ==================== 무명 주민 · 병사 · 선원 (바닐라 9종) ==================== */
.section-intro {
  max-width: 640px;
  margin: -10px 0 24px;
}

.island-npc-row {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.island-npc-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.npc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--brass-line);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-sec);
  cursor: zoom-in;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.npc-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
}

.npc-pill img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
}

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

.npc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}

.npc-card:hover {
  border-color: var(--brass-line);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.npc-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--line);
  cursor: zoom-in;
}

.npc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  transition: transform 0.28s var(--ease);
}

.npc-card:hover .npc-card-media img {
  transform: scale(1.03);
}

.npc-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.npc-card-faction {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

.npc-card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-sec);
}

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

/* ==================== 라이트박스 모달 ==================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 38, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 960px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
}

.lightbox-caption {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.lightbox-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-media {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 12px;
}

.lightbox-media img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-thumbs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.lb-thumb {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}

.lb-thumb.is-active {
  background: #fff;
  color: var(--ink);
}

/* ==================== 반응형 ==================== */
@media (max-width: 1024px) {
  .home-roster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .events-grid,
  .beasts-grid,
  .modules-grid,
  .titles-grid,
  .npcs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ship-tiers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ship-tier-card,
  .ship-tier-card.is-wide {
    grid-column: span 1;
  }

  .ship-tier-card:last-child {
    grid-column: span 2;
  }

  .char-stage-inner {
    grid-template-columns: 1fr;
  }

  .char-artwork-frame {
    height: 460px;
  }

  .scenarios-layout {
    grid-template-columns: 1fr;
  }

  .scenario-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--brass-line);
    padding: 12px 24px 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }

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

  .site-nav a {
    padding: 10px 8px;
  }

  .site-nav a[aria-current="page"]::after {
    left: 8px;
    right: auto;
    width: 28px;
  }

  .band {
    padding: 48px 0;
  }

  .hero {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .hero-scrim {
    background: linear-gradient(180deg,
      rgba(247, 243, 232, 0.92) 0%,
      rgba(247, 243, 232, 0.78) 46%,
      rgba(247, 243, 232, 0.36) 72%,
      rgba(247, 243, 232, 0.92) 100%);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 32px;
    padding-bottom: 24px;
    gap: 16px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-stage {
    height: auto;
    padding: 8px 0 0;
  }

  .hero-card-stage {
    max-width: 100%;
  }

  .hero-character-bar {
    max-width: 100%;
    padding: 10px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hero-airship-layer {
    width: 140px;
  }

  .char-visual-col {
    position: static;
  }

  .editorial-split,
  .two-col-cards,
  .islands-list,
  .dlc-grid,
  .events-grid,
  .titles-grid,
  .modules-grid,
  .beasts-grid,
  .fe-showcase,
  .ship-tiers-grid,
  .npcs-grid {
    grid-template-columns: 1fr;
  }

  .ship-tier-card,
  .ship-tier-card.is-wide,
  .ship-tier-card:last-child {
    grid-column: span 1;
  }

  .wordmark-logo {
    height: 48px;
  }

  .map-pin-label {
    padding: 1px 6px;
    font-size: 10px;
  }

  .map-pin-dot {
    width: 10px;
    height: 10px;
  }

  .world-map-info {
    padding: 14px 16px;
  }

  .hero-logo-img {
    width: min(88vw, 340px);
    margin-left: -4px;
  }

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

  .char-meta-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .char-artwork-frame {
    height: 380px;
  }

  .char-sheet {
    padding: 20px;
  }

  .search-wrap input {
    width: 100%;
  }

  .directory-tools {
    width: 100%;
  }

  .search-wrap {
    flex: 1;
  }

  .scenario-list {
    grid-template-columns: 1fr;
  }

  .fe-showcase {
    padding: 20px;
  }

  .fe-standing-wrap {
    height: 320px;
  }
}

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

  .treasures-grid,
  .monsters-grid {
    grid-template-columns: 1fr;
  }

  .char-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    display: none !important;
  }

  .hero-backdrop,
  .hero-airship-layer,
  .hero-airship-cruiser,
  .hero-cloud-band-a,
  .hero-cloud-band-b,
  .hero-card-img.is-whoosh,
  .hero-card-progress.is-running {
    animation: none !important;
  }

  .hero-stagger-1,
  .hero-stagger-2,
  .hero-stagger-3,
  .hero-stagger-4,
  .hero-stage {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
