/* Sections — Hero, World, Characters, Modal, Timeline, Keywords, CTA */

/* =========== HERO =========== */
.hero {
  position: relative;
  padding: 64px 0 96px;
  overflow: hidden;
  min-height: 760px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("assets/yuki/purification-scanlined.png");
  background-size: 1200px auto;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.75;
  filter: contrast(1.1) saturate(1.1);
}
@media (max-width: 1100px) {
  .hero-bg { background-size: cover; }
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    /* fire glow top-right */
    radial-gradient(ellipse at 75% 15%, rgba(232, 117, 85, 0.18), transparent 55%),
    /* lighter side darken */
    linear-gradient(90deg, rgba(10, 10, 12, 0.85) 0%, rgba(10, 10, 12, 0.55) 35%, rgba(10, 10, 12, 0.2) 60%, rgba(10, 10, 12, 0.4) 100%),
    /* lighter bottom fade */
    linear-gradient(180deg, transparent 50%, rgba(10, 10, 12, 0.5) 85%, var(--bg-0) 100%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* scanlines baked into background image — overlay disabled to avoid zoom-induced uneven stripes */
  display: none;
}
.hero-inner { position: relative; }
.hero-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 60px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.hero-meta-empty {
  border-bottom: none;
  padding-bottom: 0;
  min-height: 32px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: end;
  min-height: 560px;
}
.hero-left { padding-bottom: 8px; }
.hero-right { align-self: end; }
.hero-stamp-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
}
.hero-title {
  font-family: var(--serif);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}
.hero-title-jp {
  font-size: 24px;
  letter-spacing: 0.6em;
  color: var(--ink-2);
  font-weight: 300;
}
.hero-title-main {
  font-size: clamp(64px, 9vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink-0);
  font-weight: 500;
}

/* ===== Variant A: 정화 강조 (인버트 하이어라키) ===== */
.hero-title-A {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  --title-base: clamp(120px, 15vw, 220px);
}
.hero-title-A .hero-title-jp {
  font-size: calc(var(--title-base) * 0.085);
  letter-spacing: 1.4em;
  margin-bottom: calc(var(--title-base) * 0.1);
  color: var(--ink-2);
  display: flex;
  justify-content: flex-end;
  padding-right: calc(var(--title-base) * 0.56);
  font-weight: 300;
  font-feature-settings: "palt";
}
.hero-title-A .hero-title-jp::before {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-3) 70%);
  align-self: center;
  margin-right: 1.4em;
  opacity: 0.5;
  max-width: 30%;
}
.hero-title-A .hero-title-kicker {
  font-family: var(--serif);
  font-size: calc(var(--title-base) * 0.4);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  font-weight: 400;
  margin-bottom: 4px;
  display: block;
  text-align: right;
  padding-right: 1.4em;
}
.hero-title-A .hero-title-rule { display: none; }
.hero-title-A .hero-title-main {
  font-family: var(--serif);
  font-size: var(--title-base);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink-0);
  font-weight: 500;
  text-shadow: 0 0 60px rgba(212, 80, 46, 0.25);
  display: block;
  white-space: nowrap;
}

/* ===== Variant C: 세로 한자 + 가로 한글 ===== */
.hero-title-C {
  display: block;
}
.hero-title-c-wrap {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 28px;
  align-items: stretch;
  padding: 4px 0;
}
.hero-title-jp-vert {
  display: flex;
  flex-direction: column;
  font-family: "Noto Serif KR", "Noto Serif JP", serif;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: 0.05em;
  color: var(--ink-2);
  line-height: 1.4;
  font-weight: 300;
  padding-top: 8px;
}
.hero-title-jp-vert > span {
  display: block;
  text-align: center;
}
.hero-title-c-rule {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--fire) 30%, var(--fire) 70%, transparent);
  opacity: 0.55;
  align-self: stretch;
}
.hero-title-c-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.hero-title-c-line {
  font-family: var(--serif);
  font-size: clamp(70px, 8vw, 116px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink-0);
  font-weight: 500;
}
.hero-title-c-line2 {
  color: var(--fire);
  text-shadow: 0 0 40px rgba(212, 80, 46, 0.3);
}

@media (max-width: 880px) {
  .hero-title-A .hero-title-main { font-size: clamp(80px, 18vw, 140px); }
  .hero-title-c-line { font-size: clamp(56px, 12vw, 92px); }
}

/* ===== Variant V: 한·일 모두 세로쓰기 ===== */
.hero-variant-v .hero-meta { margin-bottom: 24px; }
.hero-v-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: stretch;
  min-height: 560px;
}
.hero-v-title {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.hero-v-stamp-col {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-v-cols {
  display: grid;
  grid-template-columns: auto 1px 1fr;
  gap: 22px;
  align-items: stretch;
  flex: 1;
  padding: 8px 0;
  min-height: 0;
}
.hero-v-col {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1;
  justify-content: space-between;
  min-height: 0;
}
.hero-v-col > span {
  display: block;
  text-align: center;
  font-feature-settings: "palt";
}
.hero-v-col-jp {
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: 0;
  color: var(--ink-2);
  font-weight: 300;
  padding-top: 0;
  justify-content: space-between;
}
.hero-v-rule {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--fire) 25%, var(--fire) 75%, transparent);
  opacity: 0.55;
  align-self: stretch;
}
.hero-v-col-kr {
  font-size: clamp(56px, 7.2vw, 92px);
  letter-spacing: -0.04em;
  color: var(--ink-0);
  text-shadow: 0 0 60px rgba(212, 80, 46, 0.18);
  justify-content: space-between;
}
.hero-v-col-kr > span { line-height: 1.05; }
.hero-v-col-kr .fire {
  color: var(--fire);
  text-shadow: 0 0 50px rgba(212, 80, 46, 0.45);
}
.hero-v-filenum {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  margin-top: 8px;
}

.hero-v-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 28px;
  padding-bottom: 8px;
}
.hero-v-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
}
.hero-v-eyebrow .dot { font-size: 8px; }
.hero-v-tagline {
  margin: 0;
  max-width: 44ch;
}
.hero-v-countdown {
  margin-top: 8px;
}

@media (max-width: 880px) {
  .hero-v-grid { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
  .hero-v-col-kr { font-size: clamp(48px, 13vw, 80px); }
  .hero-v-col-jp { font-size: clamp(16px, 3vw, 22px); }
}
.hero-tagline {
  font-size: 19px;
  color: var(--ink-1);
  max-width: 56ch;
  margin: 0 0 36px;
  line-height: 1.7;
}
.hero-tagline em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-0);
  font-size: 1.05em;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Countdown */
.countdown {
  padding: 18px 28px 20px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(212, 80, 46, 0.04), transparent);
  border-color: rgba(212, 80, 46, 0.25);
}
.countdown-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.countdown-grid {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--serif);
}
.cd-cell { display: flex; flex-direction: column; align-items: center; flex: 1; }
.cd-num {
  font-size: 42px;
  line-height: 1;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.cd-num-fire { color: var(--fire); text-shadow: 0 0 16px rgba(212, 80, 46, 0.4); }
.cd-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-1);
  margin-top: 5px;
}
.cd-sep {
  font-size: 28px;
  color: var(--ink-3);
  padding-bottom: 16px;
}
.countdown-foot {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cd-foot-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-1);
}
.cd-foot-row span:last-child { color: var(--ink-0); }
.countdown .eyebrow { color: var(--ink-1); }

/* Role prompt */
.role-prompt { padding: 22px 24px; }
.rp-head { margin-bottom: 14px; }
.rp-list { display: flex; flex-direction: column; gap: 6px; }
.rp-item {
  display: flex;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-1);
}
.rp-bullet { color: var(--ink-3); font-family: var(--mono); }
.rp-item-free { padding-top: 8px; margin-top: 6px; border-top: 1px dashed var(--line); color: var(--ink-0); font-style: italic; font-family: var(--serif); }

.hero-foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.hero-foot-line {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 14.5px;
  color: var(--ink-1);
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-foot { grid-template-columns: 1fr; }
  .cd-num { font-size: 36px; }
}

/* =========== SECTION HEAD =========== */
.section-head {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-num {
  font-family: var(--serif);
  font-size: 80px;
  color: var(--ink-3);
  line-height: 1;
  margin-top: 4px;
  font-weight: 300;
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .section-num { font-size: 56px; }
}

/* =========== WORLD =========== */
.world-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
.world-card { padding: 32px; }
.world-card-wide { grid-column: 1 / -1; }
.wc-header { margin-bottom: 20px; }
.wc-header h3 {
  font-size: 32px;
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.wc-read {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  font-weight: 400;
}
.world-card p {
  color: var(--ink-1);
  margin: 0 0 20px;
  line-height: 1.75;
  font-size: 16px;
}
.world-tags {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.world-tags li {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 11px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

/* Erebus floors */
.erebus-floors { display: flex; flex-direction: column; gap: 8px; }
.ef-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-2);
  border-left: 2px solid var(--line);
  font-size: 15px;
  color: var(--ink-1);
}
.ef-tag {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
}
.ef-row-fire { border-left-color: var(--fire); background: rgba(212, 80, 46, 0.06); }
.ef-tag-fire { color: var(--fire); }

/* Magic system grid */
.ms-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
}
.ms-cell {
  padding: 20px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.ms-cell-label {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink-0);
  margin-bottom: 4px;
}
.ms-cell-owner {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.ms-cell ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ms-cell ul li { font-size: 15px; color: var(--ink-1); display: flex; gap: 12px; }
.ms-key {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
  width: 70px;
  flex-shrink: 0;
}
.ms-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--ink-3);
  font-style: italic;
}
@media (max-width: 720px) {
  .world-grid { grid-template-columns: 1fr; }
  .ms-grid { grid-template-columns: 1fr; }
  .ms-divider { padding: 8px 0; }
}

/* World terms */
.world-terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.wt {
  background: var(--bg-1);
  padding: 20px 22px;
}
.wt-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.wt-term {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-0);
}
.wt-read {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.wt-body {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* =========== CHARACTERS =========== */
.faction-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin-bottom: 40px;
  background: var(--line);
  border: 1px solid var(--line);
}
.ft {
  background: var(--bg-1);
  border: 0;
  padding: 16px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s;
  font-family: inherit;
  color: var(--ink-1);
  position: relative;
}
.ft:hover { background: var(--bg-2); }
.ft.active { background: var(--bg-2); }
.ft.active::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--fire);
}
.ft-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
}
.ft-dot[data-fac="all"] { background: var(--ink-1); }
.ft-dot[data-fac="inmate"] { background: var(--f-inmate); }
.ft-dot[data-fac="free"] { background: var(--f-free); }
.ft-dot[data-fac="hunter"] { background: var(--f-hunter); }
.ft-dot[data-fac="admin"] { background: var(--f-admin); }
.ft-dot[data-fac="inquisitor"] { background: var(--f-inquisitor); }
.ft-label {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--ink-0);
}
.ft-count {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
}
.ft-sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
}
@media (max-width: 880px) {
  .faction-tabs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .faction-tabs { grid-template-columns: repeat(2, 1fr); }
}

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

.char-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-color: var(--line);
}
.char-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.char-card:hover .char-cta { color: var(--accent); }

.char-portrait {
  position: relative;
  aspect-ratio: 1 / 1.05;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.04), transparent 60%),
    var(--bg-2);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.char-silhouette { position: absolute; inset: 0; display: flex; align-items: end; justify-content: center; }
.char-silhouette svg { width: 80%; height: 95%; }
.char-portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  filter: contrast(1.05) saturate(0.95);
}
.char-portrait-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      transparent 40%,
      rgba(0,0,0,0.35) 85%,
      rgba(0,0,0,0.65) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.15) 0%,
      transparent 30%,
      transparent 70%,
      rgba(0,0,0,0.4) 100%
    );
  opacity: 1;
  transition: opacity 0.3s;
  pointer-events: none;
  mix-blend-mode: multiply;
}
.char-card:hover .char-portrait-overlay { opacity: 0.7; }

/* Zero portrait — glitched / redacted treatment */
.char-portrait[data-id="zero"] {
  background: #08090c;
}
.char-portrait[data-id="zero"] .char-portrait-img {
  filter: contrast(1.15) saturate(0.5) brightness(0.85) hue-rotate(-8deg);
  animation: zero-jitter 2s steps(1, end) infinite;
}
.char-portrait[data-id="zero"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.18) 2px,
      rgba(0, 0, 0, 0.18) 3px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(180, 60, 60, 0.05) 0px,
      rgba(180, 60, 60, 0.05) 1px,
      rgba(0, 0, 0, 0) 1px,
      rgba(0, 0, 0, 0) 4px
    );
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
  opacity: 0.85;
}
.char-portrait[data-id="zero"]::after {
  content: "■ CLASSIFIED ■ NO. 000 ■ ACCESS DENIED ■";
  position: absolute;
  left: -8%;
  right: -8%;
  top: 38%;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: #fff;
  background: #1a0a0a;
  border-top: 1px solid rgba(220, 60, 60, 0.4);
  border-bottom: 1px solid rgba(220, 60, 60, 0.4);
  padding: 6px 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  transform: rotate(-2deg);
  z-index: 3;
  pointer-events: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    -2px 0 0 rgba(220, 60, 60, 0.5),
    2px 0 0 rgba(60, 180, 200, 0.4);
  animation: zero-bar-flicker 2.6s steps(1, end) infinite;
}
@keyframes zero-jitter {
  0% {
    transform: translateX(-3px) scale(1.005);
    filter: contrast(1.4) saturate(0) brightness(1);
  }
  2% {
    transform: translateX(2px) scale(1);
    filter: contrast(1.15) saturate(0.5) brightness(0.85) hue-rotate(-8deg);
  }
  5% {
    transform: translateX(-1px) scale(1);
  }
  7% {
    transform: translateX(0) scale(1.01);
    filter: contrast(1.6) saturate(0.2) brightness(0.7);
  }
  10%, 100% {
    transform: translateX(0) scale(1);
    filter: contrast(1.15) saturate(0.5) brightness(0.85) hue-rotate(-8deg);
  }
}
@keyframes zero-bar-flicker {
  0% { opacity: 0.3; transform: rotate(-2deg) translateX(-4px); }
  2% { opacity: 0.95; transform: rotate(-2deg) translateX(2px); }
  4% { opacity: 0.6; transform: rotate(-2deg) translateX(0); }
  6%, 100% { opacity: 0.95; transform: rotate(-2deg) translateX(0); }
}
.char-portrait[data-id="zero"] .char-num-val { color: #d94747; }
.char-portrait[data-id="zero"] .char-faction-tag {
  border-color: rgba(220, 60, 60, 0.4);
  color: #f0a0a0;
}

.char-num {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--mono);
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 5px 9px 6px;
  background: rgba(8, 8, 7, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.char-num-prefix {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-1);
}
.char-num-val {
  font-size: 26px;
  color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.char-faction-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bg-0);
  background: var(--accent);
  padding: 4px 9px;
}
/* Faction tag: unified per-faction color (matches filter dots) */
.faction-inmate .char-faction-tag { background: var(--f-inmate); }
.faction-free .char-faction-tag { background: var(--f-free); }
.faction-hunter .char-faction-tag { background: var(--f-hunter); }
.faction-admin .char-faction-tag { background: var(--f-admin); }
.faction-inquisitor .char-faction-tag { background: var(--f-inquisitor); }

.char-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.char-name-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.char-name {
  font-family: var(--serif);
  font-size: 30px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink-0);
}
.char-name-en {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}
.char-age {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.char-role {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.char-summary {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-1);
  flex: 1;
}
.char-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.char-meta { display: flex; flex-direction: column; gap: 4px; }
.char-meta-lbl {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--ink-1);
  text-transform: uppercase;
}
.char-meta-val { font-size: 13.5px; color: var(--ink-0); }

.threat-bar { display: flex; gap: 2px; align-items: center; height: 14px; }
.tb-cell {
  width: 8px; height: 4px;
  background: var(--bg-3);
}
.tb-cell.active { background: var(--fire); }

.char-cta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  transition: color 0.18s;
}

/* =========== MODAL =========== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(960px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-1);
  border-color: var(--accent);
  position: relative;
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
/* Modal — character prev/next nav */
.modal-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 15, 18, 0.78);
  border: 1px solid var(--line-strong);
  color: var(--ink-0);
  cursor: pointer;
  padding: 14px 16px;
  min-height: 88px;
  max-width: 200px;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.18s;
  user-select: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 60;
}
.modal-nav-prev { left: 24px; }
.modal-nav-next { right: 24px; flex-direction: row-reverse; text-align: right; }
.modal-nav-arrow {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 0.75;
  font-weight: 300;
  flex-shrink: 0;
}
.modal-nav-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.modal-nav-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  transition: color 0.18s;
}
.modal-nav-name {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}
.modal-nav:hover {
  border-color: var(--fire);
  color: var(--fire);
  background: rgba(20, 10, 6, 0.85);
}
.modal-nav:hover .modal-nav-label { color: var(--fire); }
.modal-nav-prev:hover { transform: translateY(-50%) translateX(-3px); }
.modal-nav-next:hover { transform: translateY(-50%) translateX(3px); }

@media (max-width: 1100px) {
  .modal-nav { max-width: none; padding: 12px; min-height: 64px; }
  .modal-nav-meta { display: none; }
  .modal-nav-arrow { font-size: 36px; }
  .modal-nav-prev { left: 8px; }
  .modal-nav-next { right: 8px; }
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--bg-1);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  cursor: pointer;
  z-index: 2;
}
.modal-close:hover { color: var(--ink-0); }
.modal-close span:last-child { font-size: 16px; }
.modal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  padding: 0;
}
.modal-left {
  background: var(--bg-2);
  padding: 32px 28px;
  border-right: 1px solid var(--line);
}
.modal-portrait {
  position: relative;
  aspect-ratio: 1/1.2;
  background: var(--bg-3);
  margin-bottom: 24px;
  border: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: center;
  overflow: hidden;
}
.modal-portrait svg { width: 90%; height: 100%; }
.modal-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.35);
  transform-origin: center 22%;
  filter: contrast(1.05) saturate(0.95);
}
/* Per-character focus tweaks */
.modal-portrait-img[data-char="mika"] {
  object-position: 68% 18%;
  transform-origin: 68% 22%;
}
.modal-portrait-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      transparent 45%,
      rgba(0,0,0,0.3) 88%,
      rgba(0,0,0,0.55) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.12) 0%,
      transparent 25%,
      transparent 65%,
      rgba(0,0,0,0.5) 100%
    );
  pointer-events: none;
  mix-blend-mode: multiply;
}
.modal-portrait-stamp {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 9px;
  background: rgba(0,0,0,0.5);
}
.modal-id-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.mid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 12.5px;
}
.mid-row > span:first-child {
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.mid-row > span:last-child {
  color: var(--ink-0);
  text-align: right;
}
.mt-dot {
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 3px;
  background: var(--bg-4);
  border-radius: 50%;
}
.mt-dot.on { background: var(--fire); }

.modal-right { padding: 32px 36px 36px; }
.modal-eyebrow { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.modal-name {
  font-family: var(--serif);
  font-size: 64px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.modal-name-en {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}
.modal-role {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.modal-desc {
  font-size: 16.5px;
  line-height: 1.8;
  color: var(--ink-1);
  margin: 0 0 26px;
}
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line);
}
.modal-section { margin-bottom: 24px; }
.ms-label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.ms-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.like, .dislike {
  font-size: 15.5px;
  font-family: var(--serif);
  color: var(--ink-1);
}
.like { color: #b5d4b5; }
.dislike { color: #d4b5b5; }
.voice-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink-0);
  line-height: 1.55;
  padding: 18px 22px;
  background: var(--bg-2);
  border-left: 2px solid var(--accent);
}
.vq-mark { color: var(--ink-3); }
.vq-mark:first-child { margin-right: 6px; margin-left: -10px; }
.vq-mark:last-child { margin-left: 6px; margin-right: -10px; }
.voice-note {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* Gallery thumbnails inside modal */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gallery-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg-1);
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.18s, transform 0.18s;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.3s ease;
}
.gallery-thumb:hover {
  border-color: var(--accent);
}
.gallery-thumb:hover img {
  transform: scale(1.06);
}
.gallery-zoom {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 7, 0.7);
  color: var(--ink-0);
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.18s;
  pointer-events: none;
}
.gallery-thumb:hover .gallery-zoom { opacity: 1; }
.gallery-thumb-spoiler img {
  filter: blur(18px) saturate(0.6) brightness(0.7);
  transform: scale(1.1);
}
.gallery-spoiler-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--ink-0);
  pointer-events: none;
  letter-spacing: 0.04em;
}
.gallery-spoiler-overlay .gsp-icon {
  font-size: 22px;
  color: rgba(220, 100, 80, 0.95);
  margin-bottom: 2px;
}
.gallery-spoiler-overlay .gsp-label {
  font-size: 11px;
  letter-spacing: 0.32em;
  font-family: var(--font-mono, ui-monospace, monospace);
  color: rgba(220, 100, 80, 0.95);
  font-weight: 600;
}
.gallery-spoiler-overlay .gsp-hint {
  font-size: 10.5px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
.gallery-thumb-spoiler:hover img {
  filter: blur(14px) saturate(0.7) brightness(0.78);
}
.gallery-empty {
  cursor: default;
  border-style: dashed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 14px;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0 6px,
      rgba(255,255,255,0.02) 6px 7px
    );
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
  animation: fadeIn 0.18s ease;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--ink-2);
  color: var(--ink-0);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, color 0.18s;
}
.lightbox-close:hover {
  border-color: var(--fire);
  color: var(--fire);
}
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 84px;
  height: 110px;
  background: rgba(15, 15, 18, 0.78);
  border: 1px solid var(--line-strong);
  color: var(--ink-0);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.18s;
  user-select: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1001;
}
.lightbox-prev { left: 32px; }
.lightbox-next { right: 32px; }
.lightbox-nav-arrow {
  font-family: var(--serif);
  font-size: 56px;
  line-height: 0.75;
  font-weight: 300;
}
.lightbox-nav-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  transition: color 0.18s;
}
.lightbox-nav:hover {
  border-color: var(--fire);
  color: var(--fire);
  background: rgba(20, 10, 6, 0.85);
}
.lightbox-nav:hover .lightbox-nav-label { color: var(--fire); }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

/* Bottom thumbnail strip — discoverable navigation */
.lightbox-strip {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: rgba(15, 15, 18, 0.82);
  border: 1px solid var(--line-strong);
  padding: 10px 14px 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1001;
}
.lightbox-strip-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-2);
}
.lightbox-strip-count { color: var(--fire); font-weight: 600; }
.lightbox-strip-total { color: var(--ink-2); font-weight: 400; }
.lightbox-strip-items {
  display: flex;
  gap: 6px;
}
.lightbox-strip-item {
  position: relative;
  width: 60px;
  height: 60px;
  background: var(--bg-2);
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.5;
  transition: opacity 0.18s, border-color 0.18s, transform 0.18s;
}
.lightbox-strip-spoiler img {
  filter: blur(8px) brightness(0.55) saturate(0.6);
  transform: scale(1.1);
}
.lightbox-strip-spoiler-mark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--fire);
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}
.lightbox-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lightbox-strip-item:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}
.lightbox-strip-item.active {
  opacity: 1;
  border-color: var(--fire);
  box-shadow: 0 0 12px rgba(212, 80, 46, 0.5);
}

@media (max-width: 720px) {
  .lightbox-nav { width: 56px; height: 80px; }
  .lightbox-nav-arrow { font-size: 40px; }
  .lightbox-nav-label { font-size: 9px; letter-spacing: 0.16em; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-strip-item { width: 48px; height: 48px; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Coming Soon popup */
.coming-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.coming-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  max-width: 440px;
  width: 100%;
  padding: 36px 40px 32px;
  position: relative;
  text-align: left;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.coming-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--fire);
}
.coming-eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--ink-1);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}
.coming-title {
  font-family: var(--serif-kr);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink-0);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.coming-sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  margin-top: 6px;
}
.coming-divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0 20px;
}
.coming-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-1);
  margin-bottom: 26px;
}
.coming-close {
  width: 100%;
  background: transparent;
  border: 1px solid var(--ink-2);
  color: var(--ink-0);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  padding: 13px 18px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.coming-close:hover {
  border-color: var(--fire);
  color: var(--fire);
  background: rgba(255, 102, 51, 0.06);
}

@media (max-width: 720px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-left { border-right: 0; border-bottom: 1px solid var(--line); }
  .modal-name { font-size: 40px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========== TIMELINE =========== */
.timeline { list-style: none; padding: 0; margin: 0; }
.tl-item {
  display: grid;
  grid-template-columns: 100px 32px 1fr;
  gap: 24px;
  align-items: start;
  min-height: 80px;
}
.tl-day {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-align: right;
  padding-top: 4px;
}
.tl-day-tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line);
}
.tl-line { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; }
.tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--ink-3);
  margin-top: 6px;
  z-index: 2;
}
.tl-bar {
  width: 1px;
  flex: 1;
  background: var(--line);
  margin-top: 4px;
}
.tl-body {
  padding-bottom: 32px;
}
.tl-body h4 {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 8px;
}
.tl-body p {
  font-size: 15.5px;
  color: var(--ink-1);
  margin: 0;
  line-height: 1.7;
}
.tl-dday .tl-day-tag {
  background: var(--fire);
  color: var(--bg-0);
  border-color: var(--fire);
  font-weight: 600;
}
.tl-dday .tl-dot {
  background: var(--fire);
  border-color: var(--fire);
  box-shadow: 0 0 16px rgba(212, 80, 46, 0.5);
}
.tl-dday .tl-body h4 { color: var(--fire); }

/* =========== KEYWORDS =========== */
.kw-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.kw-item {
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s;
}
.kw-item:last-child { border-bottom: 0; }
.kw-item:hover { background: var(--bg-2); }
.kw-item.open { background: var(--bg-2); }
.kw-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
}
.kw-trigger {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--ink-0);
}
.kw-icon {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--ink-3);
}
.kw-item.open .kw-icon { color: var(--fire); }
.kw-body {
  padding: 0 24px 22px 24px;
  border-top: 1px dashed var(--line);
  margin-top: -1px;
  padding-top: 16px;
}
.kw-body p {
  margin: 0 0 6px;
  font-size: 15.5px;
  color: var(--ink-1);
  line-height: 1.75;
}

/* =========== CTA =========== */
.cta-section {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 80, 46, 0.12), transparent 60%),
    var(--bg-0);
}
.cta-block {
  text-align: center;
  padding: 32px 0 64px;
}
.cta-stamp { margin-bottom: 32px; }
.cta-title {
  font-family: var(--serif);
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink-0);
}
.cta-lede {
  max-width: 56ch;
  margin: 0 auto 40px;
  color: var(--ink-1);
  font-size: 18px;
  line-height: 1.75;
}
.cta-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}
.cta-role {
  padding: 7px 16px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--ink-1);
}
.cta-role-fire {
  border-style: dashed;
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

/* =========== FOOTER =========== */
.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12.5px;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-warn span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* Faction-specific subtle background tint on cards */
.faction-inmate { --accent: var(--f-inmate); }
.faction-free { --accent: var(--f-free); }
.faction-hunter { --accent: var(--f-hunter); }
.faction-admin { --accent: var(--f-admin); }
.faction-inquisitor { --accent: var(--f-inquisitor); }


/* === Magic (고유 마법) — character modal === */
.magic-section {
  border: 1px solid rgba(217, 119, 87, 0.28);
  background:
    linear-gradient(135deg, rgba(217, 119, 87, 0.06), rgba(217, 119, 87, 0) 60%),
    rgba(20, 18, 16, 0.4);
  padding: 14px 16px;
  border-radius: 2px;
  position: relative;
  margin-top: 18px;
}
.magic-section::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--fire, #d97757);
  opacity: 0.7;
}
.magic-section .ms-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fire, #d97757);
  margin-bottom: 8px;
}
.magic-section .magic-glyph {
  font-size: 12px;
  display: inline-block;
  transform: translateY(-1px);
}
.magic-body {
  font-family: "Noto Serif KR", serif;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(232, 227, 218, 0.92);
  letter-spacing: 0.01em;
}


/* =========== ROLE TEST (Section 05) =========== */
.roletest-section {
  background:
    radial-gradient(ellipse at 80% 10%, rgba(180, 60, 60, 0.06), transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(60, 90, 130, 0.05), transparent 55%),
    var(--bg-0);
}
.rt-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.18));
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 40px 44px 44px;
  margin-top: 8px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 30px 60px -30px rgba(0,0,0,0.6);
}
.rt-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 14px; height: 14px;
  border-top: 1px solid rgba(220, 80, 60, 0.5);
  border-left: 1px solid rgba(220, 80, 60, 0.5);
}
.rt-card::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 14px; height: 14px;
  border-bottom: 1px solid rgba(220, 80, 60, 0.5);
  border-right: 1px solid rgba(220, 80, 60, 0.5);
}

/* Progress */
.rt-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}
.rt-progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono, ui-monospace, monospace);
}
.rt-progress-label {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--ink-2);
}
.rt-progress-num {
  font-size: 24px;
  color: var(--ink-0);
  letter-spacing: 0.04em;
}
.rt-progress-total {
  color: var(--ink-2);
  font-size: 16px;
}
.rt-progress-bar {
  display: flex;
  gap: 4px;
}
.rt-progress-cell {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.06);
  transition: background 0.3s ease;
}
.rt-progress-cell.active {
  background: linear-gradient(90deg, #d4502e, #e87a3c);
}

/* Prompt */
.rt-prompt {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--ink-0);
  margin: 0 0 28px;
  padding: 4px 0 0;
  text-wrap: pretty;
  animation: rt-fade-in 0.35s ease;
}
@keyframes rt-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Options */
.rt-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rt-option {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-align: left;
  font: inherit;
  color: var(--ink-0);
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.rt-option:hover {
  border-color: rgba(220, 80, 60, 0.5);
  background: rgba(220, 80, 60, 0.04);
  transform: translateX(2px);
}
.rt-option:hover .rt-option-letter {
  color: #e87a3c;
  border-color: rgba(220, 80, 60, 0.5);
}
.rt-option:focus { outline: none; }
.rt-option:active {
  background: rgba(220, 80, 60, 0.08);
  border-color: rgba(220, 80, 60, 0.5);
}
.rt-option:active .rt-option-letter {
  color: #e87a3c;
  border-color: rgba(220, 80, 60, 0.5);
}
.rt-option:focus-visible {
  outline: 1px solid var(--fire);
  outline-offset: 2px;
}
.rt-option-letter {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 50%;
  margin-top: 1px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.rt-option-label {
  flex: 1;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-1);
}

/* Result */
.rt-result {
  animation: rt-fade-in 0.5s ease;
}
.rt-result-stamp {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: #e87a3c;
  padding-bottom: 14px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.rt-result-eyebrow {
  color: var(--ink-2);
}
.rt-result-tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 10px;
  letter-spacing: 0.005em;
}
.rt-result-role {
  font-family: var(--serif);
  font-size: clamp(36px, 5.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--ink-0);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.rt-result-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-1);
  margin: 0 0 28px;
  max-width: 60ch;
  text-wrap: pretty;
}
.rt-result-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(220, 80, 60, 0.6);
  margin-bottom: 28px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
}
.rt-result-meta-lbl {
  color: var(--ink-2);
  letter-spacing: 0.18em;
  font-size: 10.5px;
  text-transform: uppercase;
  flex: 0 0 auto;
}
.rt-result-meta-val {
  color: var(--ink-0);
  letter-spacing: 0.04em;
}
.rt-result-starter {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(220, 80, 60, 0.6);
  padding: 16px 18px;
  margin-bottom: 28px;
}
.rt-result-starter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.rt-result-starter-lbl {
  color: var(--ink-2);
  letter-spacing: 0.04em;
  font-size: 12px;
  font-weight: 600;
}
.rt-result-starter-copy {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-1);
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-mono, ui-monospace, monospace);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.rt-result-starter-copy:hover {
  border-color: rgba(220, 80, 60, 0.6);
  color: var(--ink-0);
  background: rgba(220, 80, 60, 0.08);
}
.rt-result-starter-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink-0);
  font-style: italic;
  text-wrap: pretty;
}
.rt-result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* All roles — label switcher */
.rt-all {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
  animation: rt-fade-in 0.35s ease;
}
.rt-all-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.rt-all-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fire);
}
.rt-all-sub {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-2);
}
.rt-all-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rt-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-1);
  font: inherit;
  font-size: 13px;
  padding: 8px 14px;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.rt-all-label:hover {
  border-color: rgba(220, 80, 60, 0.5);
  background: rgba(220, 80, 60, 0.04);
  color: var(--ink-0);
}
.rt-all-label:focus { outline: none; }
.rt-all-label:active {
  border-color: rgba(220, 80, 60, 0.5);
}
.rt-all-label:focus-visible {
  outline: 1px solid var(--fire);
  outline-offset: 2px;
}
.rt-all-label.is-active {
  border-color: var(--fire);
  background: rgba(220, 80, 60, 0.12);
  color: var(--ink-0);
  box-shadow: 0 0 12px rgba(212, 80, 46, 0.18);
}
.rt-all-label-badge {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fire);
  border: 1px solid var(--fire);
  padding: 1px 7px;
  border-radius: 2px;
  line-height: 1.4;
}
.rt-all-label.is-active .rt-all-label-badge {
  background: var(--fire);
  color: #1a0a06;
}
.rt-all-restore {
  margin-top: 14px;
  background: transparent;
  border: 0;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  padding: 4px 0;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.18s;
}
.rt-all-restore:hover { color: var(--fire); }
.rt-all-restore:focus-visible {
  outline: 1px solid var(--fire);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .rt-card { padding: 28px 22px; }
  .rt-prompt { font-size: 18px; }
  .rt-option { padding: 14px 14px; gap: 12px; }
  .rt-option-label { font-size: 14.5px; }
}


/* =========== CTA → Role test toggle =========== */
.cta-test-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 560px;
  margin: 36px auto 0;
  padding: 18px 22px;
  background: rgba(220, 80, 60, 0.06);
  border: 1px solid var(--fire);
  border-radius: 2px;
  color: var(--ink-0);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.005em;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.cta-test-toggle:focus { outline: none; }
.cta-test-toggle:active {
  border-color: var(--fire-glow);
  background: rgba(220, 80, 60, 0.12);
}
.cta-test-toggle:focus-visible {
  outline: 1px solid var(--fire);
  outline-offset: 2px;
}
.cta-test-toggle:hover {
  border-color: var(--fire-glow);
  background: rgba(220, 80, 60, 0.12);
  box-shadow: 0 0 24px rgba(212, 80, 46, 0.2);
}
.cta-test-toggle.open {
  border-color: var(--fire-glow);
  background: rgba(220, 80, 60, 0.1);
}
.cta-test-toggle-mark {
  flex: 0 0 auto;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 16px;
  color: #e87a3c;
  border: 1px solid rgba(220, 80, 60, 0.5);
  border-radius: 50%;
  line-height: 1;
}
.cta-test-toggle-label {
  flex: 1;
  text-align: left;
}
.cta-test-toggle-meta {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

.cta-test-wrap {
  margin-top: 28px;
  text-align: left;
  animation: rt-fade-in 0.35s ease;
}

@media (max-width: 720px) {
  .cta-test-toggle { padding: 14px 14px; font-size: 13.5px; gap: 10px; }
  .cta-test-toggle-meta { font-size: 11.5px; letter-spacing: 0.01em; white-space: nowrap; }
}
