:root {
  --ink: #070708;
  --paper: #e7e0d2;
  --muted: #aaa294;
  --crimson: #bc2031;
  --bright: #f04451;
  --gold: #c8a55a;
  --line: rgba(231, 224, 210, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  background: radial-gradient(circle at 85% 8%, rgba(144, 20, 34, 0.16), transparent 28rem),
              linear-gradient(180deg, #070708, #0b090a 55%, #050506);
  color: var(--paper);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  height: 82px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 8, 0.78);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(200, 165, 90, 0.64);
  transform: rotate(45deg);
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.brand-mark i {
  font-style: normal;
  transform: rotate(-45deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-copy strong {
  font-family: Georgia, serif;
  font-size: 17px;
  letter-spacing: 0.12em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.18em;
}

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

.site-nav a {
  position: relative;
  padding: 12px 14px;
  color: #bbb4aa;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.site-nav a:after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 5px;
  height: 1px;
  background: var(--bright);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.site-nav a:hover:after,
.site-nav a.active:after {
  transform: scaleX(1);
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
}

.portal-link {
  color: var(--gold) !important;
  border: 1px solid rgba(200, 165, 90, 0.3);
  padding: 6px 12px !important;
  margin-left: 8px;
  border-radius: 2px;
}

.portal-link:after {
  display: none !important;
}

.header-status {
  justify-self: end;
  color: #878078;
  font: 9px/1.2 ui-monospace, monospace;
  letter-spacing: 0.14em;
}

.header-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #4ebc76;
  box-shadow: 0 0 12px #4ebc76;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding-top: 82px;
  display: flex;
  align-items: center;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.08) brightness(0.66);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 6, 0.96), rgba(5, 5, 6, 0.78) 37%, rgba(5, 5, 6, 0.16) 74%),
              linear-gradient(0deg, #070708, transparent 32%);
}

.hero-shade:after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 70px 0 150px;
}

.eyebrow,
.section-index {
  color: var(--gold);
  font: 10px/1.4 ui-monospace, monospace;
  letter-spacing: 0.2em;
}

.hero h1 {
  margin: 24px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(70px, 11vw, 164px);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
}

.hero h1 span:last-child {
  margin-left: clamp(36px, 8vw, 116px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 68, 81, 0.92);
  text-shadow: 0 0 38px rgba(188, 32, 49, 0.18);
}

.hero-korean {
  margin: 30px 0 0;
  color: var(--bright);
  font: 800 13px/1.2 ui-monospace, monospace;
  letter-spacing: 0.42em;
}

.hero-lead {
  margin: 20px 0 0;
  color: #d8d0c4;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(18px, 2.1vw, 28px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.button {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 25px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  transition: 0.2s;
  cursor: pointer;
}

.button-primary {
  border-color: var(--crimson);
  background: var(--crimson);
  color: #fff;
}

.button-primary:hover {
  background: var(--bright);
  transform: translateY(-2px);
}

.button-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.hero-coordinate {
  position: absolute;
  z-index: 3;
  top: 116px;
  right: clamp(20px, 4vw, 64px);
  color: rgba(231, 224, 210, 0.62);
  text-align: right;
  font: 9px/1.8 ui-monospace, monospace;
  letter-spacing: 0.13em;
}

.hero-stats {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  background: rgba(7, 7, 8, 0.54);
  backdrop-filter: blur(12px);
}

.hero-stats div {
  min-height: 112px;
  padding: 24px clamp(18px, 3vw, 48px);
  display: flex;
  align-items: center;
  gap: 14px;
  border-right: 1px solid var(--line);
}

.hero-stats strong {
  font-family: Georgia, serif;
  color: var(--gold);
  font-size: 36px;
  font-weight: 400;
}

.hero-stats span {
  color: #a9a196;
  font: 9px/1.5 ui-monospace, monospace;
  letter-spacing: 0.12em;
}

/* World Intro */
.world-intro {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 140px 0;
  display: grid;
  grid-template-columns: 0.55fr 1.15fr 1fr;
  gap: 50px;
  border-bottom: 1px solid var(--line);
}

.world-heading p {
  margin: 18px 0 12px;
  color: var(--bright);
  font-size: 12px;
  font-weight: 800;
}

.world-heading h2,
.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(36px, 5vw, 66px);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.world-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.world-copy p:first-child {
  margin-top: 0;
}

.world-seals {
  grid-column: 2 / 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: #827b72;
  font: 9px/1.5 ui-monospace, monospace;
  letter-spacing: 0.15em;
}

.world-seals i {
  color: var(--crimson);
  font-style: normal;
}

/* Archipelago Grid */
.archipelago {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 130px 0 160px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 48px;
}

.section-heading h2 {
  margin-top: 16px;
}

.section-heading > p {
  max-width: 420px;
  margin: 0;
  color: #969087;
  font-size: 13px;
  line-height: 1.8;
}

.destination-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.destination-card {
  position: relative;
  min-height: 430px;
  grid-column: span 4;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}

.destination-card:nth-child(1),
.destination-card:nth-child(4) {
  grid-column: span 8;
}

.destination-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s;
}

.destination-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 5, 6, 0.98), rgba(5, 5, 6, 0.45) 52%, rgba(5, 5, 6, 0.06));
}

.destination-card:hover img {
  transform: scale(1.045);
  filter: saturate(1.12);
}

.destination-number {
  position: absolute;
  right: 18px;
  top: 16px;
  color: rgba(255, 255, 255, 0.6);
  font: 10px ui-monospace, monospace;
}

.destination-content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
}

.destination-content small {
  color: var(--gold);
  font: 8px/1.5 ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.destination-content h3 {
  margin: 8px 0 10px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 28px;
  font-weight: 400;
}

.destination-content p {
  max-width: 520px;
  margin: 0;
  color: #b9b2a9;
  font-size: 12px;
  line-height: 1.8;
}

.destination-link {
  display: inline-flex;
  gap: 12px;
  margin-top: 18px;
  color: #eee8df;
  font-size: 11px;
  font-weight: 800;
}

.destination-link:hover,
.destination-link:focus-visible {
  color: var(--gold);
}

.destination-link b {
  color: var(--bright);
}

.destination-card.aqua small,
.destination-card.ice small {
  color: #7ddbe8;
}

.destination-card.violet small {
  color: #bd8cff;
}

.destination-card.pearl small {
  color: #f1c69b;
}

/* Crew Teaser */
.crew-teaser {
  min-height: 420px;
  padding: 100px 20px 130px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border-top: 1px solid var(--line);
  background: radial-gradient(circle at 50% 50%, rgba(188, 32, 49, 0.12), transparent 32rem);
}

.crew-teaser p {
  margin: 24px 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(24px, 3.4vw, 46px);
  line-height: 1.45;
}

.text-link {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.text-link span {
  margin-left: 12px;
}

footer {
  min-height: 100px;
  padding: 0 clamp(20px, 4vw, 64px) 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #6f6962;
  font: 8px/1.4 ui-monospace, monospace;
  letter-spacing: 0.14em;
  border-top: 1px solid var(--line);
}

footer strong {
  color: #a99e8e;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 400;
}

/* Subpage Base */
.subpage {
  padding-top: 82px;
}

.subhero {
  position: relative;
  min-height: 700px;
  display: flex;
  align-items: end;
  overflow: hidden;
}

.subhero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.64) brightness(0.55);
}

.subhero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 6, 0.95), rgba(5, 5, 6, 0.28)),
              linear-gradient(0deg, #070708, transparent 48%);
}

.subhero-copy {
  position: relative;
  z-index: 2;
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 120px 0 100px;
}

.subhero h1,
.map-hero h1,
.roster-hero h1 {
  margin: 20px 0 24px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(58px, 8vw, 112px);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.subhero-copy > p {
  color: #c5bdb1;
  font-size: 17px;
  line-height: 1.9;
}

.page-section {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 130px 0;
}

/* World Powers */
.power-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.power-card {
  min-height: 370px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.025), transparent);
}

.power-card > span {
  align-self: end;
  color: #554f49;
  font: 10px ui-monospace, monospace;
}

.power-card small {
  margin-top: 50px;
  color: var(--gold);
  font: 9px ui-monospace, monospace;
  letter-spacing: 0.14em;
}

.power-card h3 {
  margin: 13px 0 18px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 28px;
  font-weight: 400;
}

.power-card p {
  margin: 0;
  color: #9f988e;
  font-size: 13px;
  line-height: 1.9;
}

.power-card b {
  margin-top: auto;
  padding-top: 30px;
  color: #6e6861;
  font: 8px ui-monospace, monospace;
  letter-spacing: 0.11em;
}

.manifesto {
  min-height: 600px;
  padding: 130px 20px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  border-block: 1px solid var(--line);
  background: radial-gradient(circle at center, rgba(188, 32, 49, 0.16), transparent 28rem);
}

.manifesto blockquote {
  margin: 28px 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: 1.35;
}

.manifesto > p {
  max-width: 760px;
  color: #9d958b;
  font-size: 14px;
  line-height: 2;
}

/* System Phases */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.phase-grid article {
  min-height: 300px;
  padding: 30px;
  border: 1px solid var(--line);
  background: #0d0c0d;
}

.phase-icon {
  display: block;
  margin-bottom: 55px;
  font-size: 28px;
}

.phase-grid small {
  color: var(--gold);
  font: 9px ui-monospace, monospace;
  letter-spacing: 0.13em;
}

.phase-grid h3 {
  margin: 10px 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 30px;
  font-weight: 400;
}

.phase-grid p {
  color: #989087;
  font-size: 12px;
  line-height: 1.8;
}

.world-cta {
  width: min(100% - 40px, 1240px);
  margin: 0 auto 120px;
  padding: 70px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  border: 1px solid rgba(188, 32, 49, 0.34);
  background: linear-gradient(120deg, rgba(188, 32, 49, 0.15), rgba(255, 255, 255, 0.015));
}

.world-cta h2 {
  margin: 15px 0 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.2;
}

/* Map Page */
.map-hero {
  width: min(100% - 40px, 1240px);
  min-height: 510px;
  margin: 0 auto;
  padding: 120px 0 80px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
}

.map-hero > div:first-child > p {
  color: #aaa297;
  line-height: 1.9;
}

.compass {
  width: 220px;
  aspect-ratio: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  place-items: center;
  border: 1px solid rgba(200, 165, 90, 0.34);
  border-radius: 50%;
  color: var(--gold);
  font: 10px ui-monospace, monospace;
  position: relative;
}

.compass:before,
.compass:after {
  content: "";
  position: absolute;
  background: rgba(200, 165, 90, 0.3);
}

.compass:before {
  width: 1px;
  height: 100%;
}

.compass:after {
  width: 100%;
  height: 1px;
}

.compass i {
  z-index: 1;
  font-size: 54px;
  font-style: normal;
}

.map-ledger {
  height: 46px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-block: 1px solid var(--line);
  color: #91887e;
  font: 9px ui-monospace, monospace;
  letter-spacing: 0.15em;
}

.destination-archive {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 80px 0 150px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.archive-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.86fr) 1.14fr;
  min-height: 300px;
  border: 1px solid var(--line);
  background: #0c0b0c;
  overflow: hidden;
  scroll-margin-top: 110px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.archive-card:target,
.archive-card:focus-visible {
  border-color: var(--gold);
  background: #11100f;
  box-shadow: 0 0 0 1px rgba(200, 165, 90, 0.2), 0 18px 46px rgba(0, 0, 0, 0.3);
  outline: none;
}

.archive-card:target .archive-copy h2,
.archive-card:focus-visible .archive-copy h2 {
  color: var(--gold);
}

.archive-image {
  position: relative;
  min-height: 300px;
  overflow: hidden;
}

.archive-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.72);
  transition: 0.5s;
}

.archive-card:hover img {
  transform: scale(1.04);
  filter: saturate(1);
}

.archive-image:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, #0c0b0c);
}

.archive-image > span {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  color: #fff;
  font: 10px ui-monospace, monospace;
}

.archive-image small {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  left: 16px;
  color: #e0bd72;
  font: 700 9px ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.archive-copy {
  position: relative;
  z-index: 2;
  padding: 28px 26px 24px 8px;
}

.archive-copy h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}

.archive-copy > p {
  color: #b7afa4;
  font-size: 13px;
  line-height: 1.85;
}

.archive-copy dl {
  margin: 25px 0 0;
  padding-top: 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.archive-copy dl div {
  margin-top: 15px;
}

.archive-copy dt {
  color: #b09768;
  font: 800 9px/1.3 ui-monospace, monospace;
  letter-spacing: 0.16em;
}

.archive-copy dd {
  margin: 6px 0 0;
  color: #ded6ca;
  font-family: "Noto Sans KR", Arial, sans-serif;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.7;
  word-break: keep-all;
}

/* Character Archive */
.roster-hero {
  width: min(100% - 40px, 1240px);
  min-height: 580px;
  margin: 0 auto;
  padding: 130px 0 80px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 60px;
  border-bottom: 1px solid var(--line);
}

.roster-hero > p {
  max-width: 420px;
  margin-bottom: 40px;
  color: #a59d92;
  font-size: 14px;
  line-height: 2;
}

.roster-section {
  width: min(100% - 40px, 1240px);
  margin: 0 auto;
  padding: 55px 0 150px;
}

.roster-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.location-filter {
  width: min(100%, 360px);
  display: grid;
  gap: 8px;
}

.location-filter > span {
  color: #8f7851;
  font: 800 8px ui-monospace, monospace;
  letter-spacing: 0.16em;
}

.location-filter select {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #0d0c0d;
  color: #d8d0c5;
  font: 700 11px inherit;
  cursor: pointer;
}

.location-filter select:focus-visible {
  border-color: var(--gold);
  outline: none;
}

.search-box {
  width: min(100%, 380px);
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #4f4944;
}

.search-box span {
  color: var(--gold);
  font: 8px ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.search-box input {
  width: 100%;
  padding: 12px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: 12px inherit;
}

.search-box input::placeholder {
  color: #625d57;
}

.result-count {
  margin: 35px 0 18px;
  color: #6c665f;
  font: 8px ui-monospace, monospace;
  letter-spacing: 0.14em;
}

.character-groups {
  display: grid;
  gap: 78px;
}

.character-location-section > header {
  margin-bottom: 20px;
  padding: 0 2px 17px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.character-location-section > header span {
  color: #8f7851;
  font: 800 8px ui-monospace, monospace;
  letter-spacing: 0.16em;
}

.character-location-section > header h2 {
  margin: 9px 0 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 400;
  line-height: 1.15;
}

.character-location-section > header > b {
  padding-bottom: 5px;
  color: #756d64;
  font: 800 9px ui-monospace, monospace;
  letter-spacing: 0.13em;
}

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

.character-card {
  border: 1px solid var(--line);
  background: #0d0c0d;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.character-card:hover,
.character-card:focus-visible {
  border-color: rgba(200, 165, 90, 0.62);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  outline: none;
  transform: translateY(-2px);
}

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle, #2c2022, #0b0a0b 70%);
}

.portrait > span {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 72px;
  color: #50383b;
}

.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.8);
  transition: 0.45s;
}

.character-card:hover .portrait img {
  transform: scale(1.025);
  filter: saturate(1);
}

.portrait:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0d0c0d, transparent 38%);
}

.portrait small,
.portrait b {
  position: absolute;
  z-index: 2;
  top: 13px;
  font: 9px ui-monospace, monospace;
}

.portrait small {
  left: 13px;
  color: #aaa;
}

.portrait b {
  right: 13px;
  padding: 5px 7px;
  border: 1px solid rgba(200, 165, 90, 0.5);
  color: var(--gold);
  font-weight: 500;
}

.character-copy {
  min-height: 190px;
  padding: 20px;
}

.character-copy > span {
  color: var(--gold);
  font: 8px ui-monospace, monospace;
  letter-spacing: 0.1em;
}

.character-copy h2 {
  margin: 9px 0 4px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 26px;
  font-weight: 400;
}

.character-copy strong {
  color: #c4bbb0;
  font-size: 11px;
}

.character-copy p {
  margin: 16px 0 0;
  color: #8f8880;
  font-size: 11px;
  line-height: 1.75;
}

.empty-roster {
  padding: 90px;
  text-align: center;
  border: 1px solid var(--line);
  color: #8c857d;
}

/* Modal Popup */
.character-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: clamp(18px, 4vw, 58px);
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(3, 3, 4, 0.84);
  backdrop-filter: blur(14px);
}

.character-modal {
  position: relative;
  width: min(100%, 980px);
  max-height: 88svh;
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) 1.18fr;
  overflow: hidden;
  border: 1px solid rgba(200, 165, 90, 0.45);
  background: #0c0b0c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.character-modal-close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 7, 8, 0.76);
  color: #bbb3a8;
  font-size: 20px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.character-modal-close:hover,
.character-modal-close:focus-visible {
  border-color: var(--gold);
  color: var(--bright);
  background: rgba(20, 18, 20, 0.95);
  outline: none;
}

.character-modal-portrait {
  position: relative;
  min-height: 620px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle, #2c2022, #09090a 70%);
}

.character-modal-portrait:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 70%, #0c0b0c),
              linear-gradient(0deg, rgba(12, 11, 12, 0.55), transparent 45%);
}

.character-modal-portrait > span {
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 120px;
  color: #50383b;
}

.character-modal-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.9);
}

.character-modal-copy {
  padding: 72px 54px 46px;
  overflow-y: auto;
}

.character-modal-meta {
  color: var(--gold);
  font: 800 9px/1.6 ui-monospace, monospace;
  letter-spacing: 0.13em;
}

.character-modal-copy h2 {
  margin: 14px 0 7px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 400;
  line-height: 1;
}

.character-modal-copy > strong {
  color: #d8d0c5;
  font-size: 14px;
  line-height: 1.6;
}

.character-vitals {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.character-vitals > div {
  min-height: 96px;
  padding: 19px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.character-vitals small,
.character-overview small {
  display: block;
  color: #8f7851;
  font: 800 8px ui-monospace, monospace;
  letter-spacing: 0.16em;
}

.character-vitals b {
  display: block;
  margin-top: 10px;
  color: #eee7dc;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

.character-overview {
  margin-top: 34px;
}

.character-overview p {
  margin: 11px 0 0;
  color: #b8b0a5;
  font-size: 14px;
  line-height: 1.9;
}

/* Island Modal */
.island-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: clamp(18px, 4vw, 58px);
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(3, 3, 4, 0.84);
  backdrop-filter: blur(14px);
}

.island-modal {
  position: relative;
  width: min(100%, 1020px);
  max-height: 88svh;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) 1.05fr;
  overflow: hidden;
  border: 1px solid rgba(200, 165, 90, 0.45);
  background: #0c0b0c;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

.island-modal-close {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 7, 8, 0.76);
  color: #bbb3a8;
  font-size: 20px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.island-modal-close:hover,
.island-modal-close:focus-visible {
  border-color: var(--gold);
  color: var(--bright);
  background: rgba(20, 18, 20, 0.95);
  outline: none;
}

.island-modal-image {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background: #070708;
}

.island-modal-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.8);
}

.island-modal-image:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 65%, #0c0b0c),
              linear-gradient(0deg, rgba(12, 11, 12, 0.7), transparent 45%);
}

.island-modal-copy {
  padding: 56px 44px 40px;
  overflow-y: auto;
}

.island-modal-meta {
  color: var(--gold);
  font: 800 9px/1.6 ui-monospace, monospace;
  letter-spacing: 0.13em;
}

.island-modal-copy h2 {
  margin: 10px 0 14px;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 400;
  line-height: 1.1;
}

.island-modal-desc {
  color: #b8b0a5;
  font-size: 13px;
  line-height: 1.85;
  margin: 0 0 24px;
}

.island-modal-details {
  display: grid;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.island-modal-section small {
  display: block;
  color: #8f7851;
  font: 800 8px ui-monospace, monospace;
  letter-spacing: 0.16em;
  margin-bottom: 6px;
}

.island-modal-section p {
  margin: 0;
  color: #eee7dc;
  font-size: 13px;
  line-height: 1.7;
}

.island-modal-section p.resident-names {
  color: var(--gold);
  font-weight: 700;
}

.archive-card {
  cursor: pointer;
}

/* Scroll Quick Navigation Button */
.crs-scroll-nav {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crs-scroll-nav button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(200, 165, 90, 0.4);
  background: rgba(12, 11, 12, 0.85);
  backdrop-filter: blur(8px);
  color: var(--gold);
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
}

.crs-scroll-nav button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.crs-scroll-nav button:hover {
  background: var(--crimson);
  color: #fff;
  border-color: var(--bright);
}

/* Responsive */
@media (max-width: 1050px) {
  .power-grid,
  .phase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .destination-archive {
    grid-template-columns: 1fr;
  }
  .character-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }
  .site-nav {
    display: none;
  }
  .hero-shade {
    background: linear-gradient(90deg, rgba(5, 5, 6, 0.92), rgba(5, 5, 6, 0.34)),
                linear-gradient(0deg, #070708, transparent 40%);
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-stats div {
    min-height: 76px;
    padding-block: 13px;
  }
  .world-intro {
    grid-template-columns: 1fr;
    padding: 100px 0;
  }
  .world-seals {
    grid-column: auto;
  }
  .destination-card,
  .destination-card:nth-child(1),
  .destination-card:nth-child(4) {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .subpage {
    padding-top: 70px;
  }
  .subhero {
    min-height: 620px;
  }
  .power-grid,
  .phase-grid {
    grid-template-columns: 1fr;
  }
  .world-cta,
  .map-hero,
  .roster-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .world-cta {
    padding: 38px;
  }
  .compass {
    width: 150px;
  }
  .destination-archive {
    padding-top: 45px;
  }
  .archive-card {
    grid-template-columns: 1fr;
  }
  .archive-image {
    min-height: 260px;
  }
  .archive-image:after {
    background: linear-gradient(0deg, #0c0b0c, transparent 45%);
  }
  .archive-copy {
    padding: 22px;
  }
  .map-ledger span:last-child {
    display: none;
  }
  .roster-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .location-filter,
  .search-box {
    width: 100%;
  }
  .character-groups {
    gap: 58px;
  }
  .character-location-section > header {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .character-modal-backdrop {
    padding: 12px;
  }
  .character-modal {
    max-height: none;
    grid-template-columns: 1fr;
  }
  .character-modal-portrait {
    min-height: 54svh;
  }
  .character-modal-portrait:after {
    background: linear-gradient(0deg, #0c0b0c, transparent 42%);
  }
  .character-modal-copy {
    padding: 34px 24px 30px;
  }
  .character-modal-copy h2 {
    font-size: 48px;
  }
  .character-vitals {
    margin-top: 28px;
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 70px;
    padding-inline: 16px;
  }
  .brand-copy small,
  .header-status {
    display: none;
  }
  .brand-copy strong {
    font-size: 14px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .hero {
    padding-top: 70px;
    align-items: start;
  }
  .hero-content {
    padding-top: 140px;
  }
  .hero h1 {
    font-size: clamp(58px, 21vw, 92px);
  }
  .hero h1 span:last-child {
    margin-left: 18px;
  }
  .hero-coordinate {
    top: 94px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-stats div:nth-child(even) {
    border-right: 0;
  }
  .hero-stats strong {
    font-size: 26px;
  }
  .world-intro {
    gap: 28px;
  }
  .world-seals {
    gap: 14px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
  .destination-card,
  .destination-card:nth-child(1),
  .destination-card:nth-child(4) {
    grid-column: 1 / -1;
    min-height: 390px;
  }
  footer {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px;
  }
}

@media (max-width: 500px) {
  .character-grid {
    grid-template-columns: 1fr;
  }
  .archive-card {
    min-height: 0;
  }
  .roster-hero {
    min-height: 520px;
  }
  .roster-hero h1,
  .map-hero h1,
  .subhero h1 {
    font-size: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .destination-card img,
  .button {
    transition: none;
  }
}
