:root {
  --bg: #030708;
  --bg-soft: #081011;
  --panel: rgba(7, 16, 17, 0.88);
  --panel-strong: rgba(4, 10, 11, 0.96);
  --line: rgba(145, 177, 111, 0.24);
  --line-bright: rgba(167, 205, 119, 0.64);
  --accent: #9fbd6c;
  --accent-soft: #d5e3b1;
  --text: #e6eadf;
  --muted: #8c9a8f;
  --blue: #43a8ff;
  --max: 1080px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(67, 168, 255, 0.08), transparent 32rem),
    linear-gradient(180deg, #020506 0%, #071011 42%, #020506 100%);
  font-family: "Pretendard Variable", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  word-break: keep-all;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  z-index: 0;
}

img { max-width: 100%; display: block; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 24px 24px 44px;
}

.dossier-frame {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(9, 18, 19, .94), rgba(2, 7, 8, .94));
  box-shadow: 0 28px 90px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.018);
}

.hero {
  min-height: 690px;
  padding: 68px 72px 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  border-radius: 26px 26px 12px 12px;
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 58%;
  height: 52%;
  background:
    linear-gradient(to top, rgba(0,0,0,.9), transparent),
    repeating-linear-gradient(78deg, rgba(18,30,31,.9) 0 7px, transparent 7px 14px);
  clip-path: polygon(0 100%, 0 45%, 12% 39%, 12% 18%, 21% 18%, 23% 50%, 36% 42%, 38% 7%, 46% 8%, 49% 53%, 61% 48%, 63% 27%, 70% 27%, 71% 57%, 84% 51%, 84% 36%, 93% 36%, 100% 54%, 100% 100%);
  opacity: .34;
  z-index: -2;
}
.hero::before { left: -3%; transform: scaleX(-1); }
.hero::after { right: -3%; }

.scan-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(139,183,101,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,183,101,.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle, black, transparent 78%);
}

.hero-fog {
  position: absolute;
  inset: auto -12% -13% -12%;
  height: 55%;
  z-index: -1;
  background: radial-gradient(ellipse, rgba(119,151,111,.14), transparent 67%);
  filter: blur(18px);
}

.corner { position: absolute; width: 60px; height: 60px; pointer-events: none; }
.corner::before, .corner::after { content: ""; position: absolute; background: var(--line-bright); }
.corner::before { width: 44px; height: 1px; }
.corner::after { width: 1px; height: 44px; }
.corner-tl { top: 18px; left: 18px; }
.corner-tl::before { top: 0; left: 0; }
.corner-tl::after { top: 0; left: 0; }
.corner-tr { top: 18px; right: 18px; }
.corner-tr::before { top: 0; right: 0; }
.corner-tr::after { top: 0; right: 0; }
.corner-bl { bottom: 22px; left: 18px; }
.corner-bl::before { bottom: 0; left: 0; }
.corner-bl::after { bottom: 0; left: 0; }
.corner-br { bottom: 22px; right: 18px; }
.corner-br::before { bottom: 0; right: 0; }
.corner-br::after { bottom: 0; right: 0; }

.eyebrow,
.section-kicker,
.faction-label,
.footer-small {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
}

.hero-emblem {
  width: min(226px, 33vw);
  margin: 12px auto 8px;
  filter: drop-shadow(0 14px 28px rgba(44,143,255,.22));
}

.hero-logo {
  width: min(820px, 94%);
  margin: 10px auto -12px;
  filter: drop-shadow(0 16px 25px rgba(0,0,0,.7)) drop-shadow(0 0 28px rgba(140,178,104,.08));
}

.hero-code {
  color: var(--accent);
  margin: 0 0 16px;
  letter-spacing: .26em;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  max-width: 800px;
  font-family: "Iropke Batang", "Noto Serif KR", Georgia, serif;
  font-size: clamp(23px, 3.2vw, 38px);
  font-weight: 600;
  letter-spacing: -.02em;
  text-shadow: 0 3px 20px rgba(0,0,0,.7);
}

.intro-panel {
  width: min(760px, 100%);
  margin: 30px auto 0;
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: rgba(3, 10, 11, .72);
  box-shadow: inset 0 0 35px rgba(113,149,96,.035);
  text-align: left;
}

.intro-panel p {
  margin: 0 0 8px;
  color: #c9d0c8;
  font-size: 15px;
  line-height: 1.75;
}
.intro-panel p:last-child { margin-bottom: 0; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-top: 26px;
  color: #7f8d82;
  font: 600 10px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em;
}

main { padding-top: 18px; }
.section {
  margin-top: 18px;
  padding: 30px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 11, .88);
  box-shadow: 0 20px 55px rgba(0,0,0,.28);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.section-index {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line-bright);
  color: var(--accent);
  font: 700 14px/1 ui-monospace, monospace;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -.04em;
}

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

.info-card {
  min-height: 286px;
  padding: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(11, 23, 24, .82), rgba(4, 10, 11, .96));
  position: relative;
  overflow: hidden;
}

.info-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -38px auto;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(150,184,103,.08);
  transform: rotate(45deg);
}

.card-icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  margin-bottom: 18px;
}

.info-card h3 {
  margin: 0 0 16px;
  font-size: 21px;
  color: var(--accent-soft);
}

.info-card ul,
.faction-copy ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-card li,
.faction-copy li {
  position: relative;
  padding-left: 16px;
  margin: 9px 0;
  color: #b9c2b9;
  line-height: 1.55;
  font-size: 14px;
}

.info-card li::before,
.faction-copy li::before {
  content: "";
  position: absolute;
  top: .68em;
  left: 0;
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 14px;
  border: 1px solid var(--line);
  background: #050c0d;
}
.stat-strip > * { padding: 18px; border-right: 1px solid var(--line); }
.stat-strip > *:last-child { border-right: 0; }
.stat-strip div { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 126px; }
.stat-strip strong { color: var(--accent-soft); font-size: 27px; }
.stat-strip span { color: var(--muted); font-size: 12px; }
.stat-strip small { margin-top: 6px; color: #a9b2aa; font-size: 13px; line-height: 1.6; }

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

.faction-card {
  position: relative;
  min-height: 500px;
  padding: 28px;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, rgba(8,18,19,.94), rgba(2,7,8,.98));
}

.faction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.05) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(255,255,255,.04) 50%, transparent 50.2%);
  background-size: 80px 80px;
  pointer-events: none;
}

.overline-card { box-shadow: inset 0 0 80px rgba(67,168,255,.035); }
.frontis-card { box-shadow: inset 0 0 80px rgba(235,241,232,.025); }

.faction-visual {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 100%;
  padding-top: 0;
}
.faction-symbol {
  width: 100%;
  max-width: 320px;
  max-height: 300px;
  object-fit: contain;
  align-self: center;
  filter: drop-shadow(0 18px 25px rgba(0,0,0,.56));
}
.overline-card .faction-symbol {
  width: 112%;
  max-width: 360px;
  max-height: 340px;
  filter: drop-shadow(0 12px 22px rgba(44,143,255,.18));
}
.frontis-card .faction-symbol {
  max-width: 320px;
  max-height: 300px;
}
.faction-wordmark {
  width: auto;
  max-width: 94%;
  height: 76px;
  object-fit: contain;
  object-position: center;
  margin-top: -40px;
}
.overline-wordmark,
.frontis-wordmark {
  max-height: none;
}

.faction-copy {
  position: relative;
  z-index: 1;
  align-self: center;
}
.faction-copy h3 {
  margin: 8px 0 18px;
  font-size: 30px;
  letter-spacing: .08em;
}
.faction-copy li { margin: 11px 0; font-size: 14px; }

.card-code {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: #65746a;
  font: 600 10px/1 ui-monospace, monospace;
  letter-spacing: .18em;
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
.character-card {
  display: flex;
  flex-direction: column;
  min-height: 860px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(8,18,19,.94), rgba(2,7,8,.98));
  overflow: hidden;
}
.character-image-wrap { position: relative; min-height: 520px; max-height: 560px; overflow: hidden; }
.character-image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.character-card:nth-child(2) .character-image-wrap img {
  transform: scale(1.08);
  transform-origin: center top;
  object-position: 50% 0%;
}
.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,7,8,.92), rgba(2,7,8,.12) 42%, transparent 68%);
}
.character-no {
  position: absolute;
  left: 16px;
  bottom: 14px;
  color: var(--accent);
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .16em;
}
.character-body {
  position: relative;
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
}
.character-name-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.character-name-row p { margin: 0 0 5px; color: var(--accent); font-size: 10px; letter-spacing: .15em; }
.character-name-row h3 { margin: 0; font-size: 38px; letter-spacing: -.04em; }
.character-name-row > span { color: #aab5ab; font-size: 13px; white-space: nowrap; }
.profile-list { margin: 6px 0 0; }
.profile-list div { display: grid; grid-template-columns: 70px 1fr; padding: 9px 0; border-bottom: 1px dashed rgba(150,180,120,.14); }
.profile-list dt { color: #738177; font-size: 13px; }
.profile-list dd { margin: 0; color: #d1d7cf; font-size: 14px; font-weight: 600; }
.character-summary {
  margin: 0;
  min-height: 92px;
  color: #c3cbc2;
  font-size: 14px;
  line-height: 1.75;
}
.tag-section { display: flex; flex-direction: column; gap: 8px; min-height: 82px; }
.mini-label { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(159,189,108,.22);
  background: rgba(11,22,22,.42);
  color: #d9dfd7;
  font-size: 12px;
  line-height: 1.3;
}
.ability-box {
  margin-top: 2px;
  min-height: 286px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(11,22,22,.55);
}
.ability-box span { display: block; color: var(--accent); font-size: 11px; letter-spacing: .12em; }
.ability-box strong { display: block; margin-top: 7px; font-size: 20px; line-height: 1.35; }
.ability-list { margin: 12px 0 0; padding: 0; list-style: none; }
.ability-list li {
  position: relative;
  padding-left: 14px;
  margin: 8px 0;
  color: #bcc5bc;
  font-size: 13px;
  line-height: 1.6;
}
.ability-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}
.ability-box p { margin: 12px 0 0; color: #7e8a81; font: 600 11px/1.4 ui-monospace, monospace; }


.treatment-panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(7,17,18,.9), rgba(3,8,9,.96));
}
.treatment-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.treatment-heading h3 {
  margin: 5px 0 0;
  font-size: 26px;
  letter-spacing: -.03em;
}
.treatment-heading > span {
  color: #647168;
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .16em;
  white-space: nowrap;
}
.treatment-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.treatment-card {
  position: relative;
  min-height: 250px;
  padding: 20px;
  border: 1px solid rgba(145,177,111,.2);
  background: rgba(5,13,14,.72);
  overflow: hidden;
}
.treatment-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 84px;
  height: 84px;
  border: 1px solid rgba(159,189,108,.07);
  transform: rotate(45deg);
}
.treatment-card h4 {
  margin: 8px 0 14px;
  color: var(--accent-soft);
  font-size: 19px;
}
.treatment-code {
  color: var(--accent);
  font: 700 10px/1 ui-monospace, monospace;
  letter-spacing: .16em;
}
.treatment-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.treatment-card li {
  position: relative;
  padding-left: 14px;
  margin: 9px 0;
  color: #b9c3ba;
  font-size: 13px;
  line-height: 1.6;
}
.treatment-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}
.common-treatment {
  box-shadow: inset 0 0 50px rgba(67,168,255,.025);
}

.footer {
  margin-top: 18px;
  padding: 24px 30px;
  border-radius: 10px 10px 26px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer strong { display: block; margin-top: 7px; font-size: 17px; }
.footer-state { color: #9aa59c; font: 700 11px/1 ui-monospace, monospace; letter-spacing: .12em; display: flex; align-items: center; gap: 9px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(159,189,108,.65); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(159,189,108,0); } 100% { box-shadow: 0 0 0 0 rgba(159,189,108,0); } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .hero { min-height: 630px; padding: 56px 36px 34px; }
  .info-grid.three { grid-template-columns: 1fr; }
  .info-card { min-height: auto; }
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .faction-grid, .character-grid { grid-template-columns: 1fr; }
  .treatment-grid { grid-template-columns: 1fr; }
  .faction-card { min-height: 460px; }
}

@media (max-width: 640px) {
  .page-shell { padding: 10px 10px 24px; }
  .hero { min-height: 590px; padding: 48px 20px 28px; border-radius: 16px 16px 8px 8px; }
  .hero-emblem { width: min(154px, 40vw); margin: 10px auto 6px; }
  .hero-logo { width: 112%; max-width: none; }
  .hero-code { font-size: 10px; letter-spacing: .18em; }
  .intro-panel { padding: 18px; }
  .intro-panel p { font-size: 13px; }
  .hero-meta { gap: 8px 12px; font-size: 8px; }
  .section { padding: 20px 14px; }
  .section-heading { margin-bottom: 16px; }
  .section-index { width: 42px; height: 42px; }
  .info-card { padding: 20px; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat-strip > * { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat-strip > *:last-child { border-bottom: 0; }
  .faction-card { grid-template-columns: 1fr; min-height: auto; padding: 22px 18px 60px; }
  .faction-visual { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding-top: 0; }
  .faction-symbol { width: 70%; max-height: 220px; }
  .overline-card .faction-symbol { width: 78%; max-height: 240px; }
  .faction-wordmark { width: auto; max-width: 74%; height: 58px; margin-top: -18px; }
  .faction-copy h3 { font-size: 26px; }
  .character-card { min-height: auto; }
  .character-image-wrap { min-height: 360px; max-height: none; }
  .character-card:nth-child(2) .character-image-wrap img { transform: scale(1.04); transform-origin: center top; object-position: 50% 0%; }
  .image-overlay { background: linear-gradient(to top, rgba(3,8,9,.88), transparent 52%); }
  .character-body { padding: 24px 20px; gap: 12px; }
  .treatment-panel { padding: 18px 14px; }
  .treatment-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .treatment-card { min-height: auto; padding: 18px; }
  .footer { align-items: flex-start; flex-direction: column; padding: 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot { animation: none; }
}

@media (max-width: 640px) {
  .corner { width: 48px; height: 48px; }
  .corner::before { width: 34px; }
  .corner::after { height: 34px; }
  .corner-tl, .corner-tr { top: 14px; }
  .corner-bl, .corner-br { bottom: 18px; }
  .corner-tl, .corner-bl { left: 14px; }
  .corner-tr, .corner-br { right: 14px; }
}
