:root {
  color-scheme: dark;
  --ink: #101010;
  --paper: #f2f1ed;
  --muted: #b8b8b3;
  --accent: #ff5a3d;
  --accent-2: #d9ff2f;
  --accent-soft: rgba(255, 90, 61, 0.2);
  --stage-angle: -15deg;
  --pointer-x: 0px;
  --pointer-y: 0px;
  --font-unified: "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--font-unified);
  font-size: 16px;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

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

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.075;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.page-transition {
  position: fixed;
  z-index: 45;
  inset: 72px 0 0;
  pointer-events: none;
  background: #090909;
  opacity: 0;
  transition: opacity 0.38s ease;
}

.page-transition.active {
  opacity: 1;
}

#home,
#characters,
#illustrations,
#game-file {
  scroll-margin-top: 0;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 72px;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  background: rgba(13, 13, 13, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark {
  width: 58px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 91, 74, 0.18));
}

.brand-copy {
  display: grid;
  line-height: 0.92;
  letter-spacing: 0.12em;
}

.brand-copy strong {
  font-family: var(--font-unified);
  font-size: 18px;
  font-weight: 900;
}

.brand-copy small {
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: 0.42em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
}

.nav-item {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #a9a9a9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: 0.25s ease;
}

.nav-item:hover,
.nav-item:focus-visible,
.nav-item.active {
  color: var(--ink);
  background: var(--paper);
  outline: none;
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #a7a7a7;
  font-family: var(--font-unified);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.signal {
  position: relative;
  padding-left: 15px;
  color: var(--accent-2);
}

.signal::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  transform: translateY(-50%);
  animation: pulse 1.8s ease-in-out infinite;
}

.language-switcher {
  position: relative;
  z-index: 70;
}

.language-toggle {
  appearance: none;
  min-width: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.language-toggle:hover,
.language-toggle:focus-visible,
.language-toggle[aria-expanded="true"] {
  color: var(--ink);
  background: var(--accent-2);
  border-color: var(--accent-2);
  outline: none;
}

.language-label {
  color: #969696;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.language-toggle:hover .language-label,
.language-toggle:focus-visible .language-label,
.language-toggle[aria-expanded="true"] .language-label {
  color: rgba(16, 16, 16, 0.62);
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 154px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: #171717;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.language-menu button {
  appearance: none;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  color: #bdbdb8;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.language-menu button:hover,
.language-menu button:focus-visible,
.language-menu button.active {
  color: var(--ink);
  background: var(--accent-2);
  outline: none;
}

.home-hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  padding-top: 72px;
  isolation: isolate;
  overflow: hidden;
  color: var(--paper);
  background-color: #030303;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.1'/%3E%3C/svg%3E");
  background-size: 260px 260px;
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 72px 0 0;
  background: rgba(0, 0, 0, 0.38);
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 72px 0 0;
  pointer-events: none;
  background-image: url("./assets/home-frost-texture.png");
  background-repeat: repeat-x;
  background-position: center 38%;
  background-size: auto 128%;
  filter: grayscale(1) contrast(1.42) brightness(0.35);
  mix-blend-mode: normal;
  opacity: 0.075;
}

.home-axis {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  pointer-events: none;
}

.home-axis-horizontal {
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 8%,
    rgba(255, 255, 255, 0.07) 27%,
    rgba(255, 255, 255, 0.21) 49%,
    rgba(255, 255, 255, 0.09) 69%,
    rgba(255, 255, 255, 0.17) 92%,
    transparent 100%
  );
  transform: translate(-50%, -50%);
}

.home-axis-vertical {
  width: 1px;
  height: calc(100% - 72px);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 21%,
    rgba(255, 255, 255, 0.2) 49%,
    rgba(255, 255, 255, 0.07) 76%,
    rgba(255, 255, 255, 0.14) 100%
  );
  transform: translate(-50%, -50%);
}

.home-orbit {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: min(51vw, 852px);
  min-width: 620px;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.home-orbit::before,
.home-orbit::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.home-orbit::before {
  border: 1px solid rgba(255, 72, 65, 0.31);
  box-shadow:
    0 0 32px rgba(255, 70, 64, 0.02),
    inset 0 0 38px rgba(255, 70, 64, 0.016);
  -webkit-mask-image: conic-gradient(
    from -28deg,
    rgba(0, 0, 0, 0.24) 0%,
    #000 13%,
    rgba(0, 0, 0, 0.38) 31%,
    rgba(0, 0, 0, 0.88) 49%,
    rgba(0, 0, 0, 0.18) 67%,
    rgba(0, 0, 0, 0.72) 84%,
    rgba(0, 0, 0, 0.24) 100%
  );
  mask-image: conic-gradient(
    from -28deg,
    rgba(0, 0, 0, 0.24) 0%,
    #000 13%,
    rgba(0, 0, 0, 0.38) 31%,
    rgba(0, 0, 0, 0.88) 49%,
    rgba(0, 0, 0, 0.18) 67%,
    rgba(0, 0, 0, 0.72) 84%,
    rgba(0, 0, 0, 0.24) 100%
  );
}

.home-orbit::after {
  border: 1px solid rgba(255, 94, 86, 0.24);
  -webkit-mask-image: conic-gradient(
    from 18deg,
    transparent 0 14%,
    #000 20% 28%,
    transparent 36% 58%,
    rgba(0, 0, 0, 0.82) 66% 75%,
    transparent 84% 100%
  );
  mask-image: conic-gradient(
    from 18deg,
    transparent 0 14%,
    #000 20% 28%,
    transparent 36% 58%,
    rgba(0, 0, 0, 0.82) 66% 75%,
    transparent 84% 100%
  );
}

.orbit-ring {
  position: absolute;
  border-radius: 50%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.orbit-ring-outer {
  inset: 8.5%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-mask-image: conic-gradient(from -42deg, rgba(0, 0, 0, 0.15), #000 17%, rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0.76) 58%, rgba(0, 0, 0, 0.12) 78%, rgba(0, 0, 0, 0.54));
  mask-image: conic-gradient(from -42deg, rgba(0, 0, 0, 0.15), #000 17%, rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0.76) 58%, rgba(0, 0, 0, 0.12) 78%, rgba(0, 0, 0, 0.54));
}

.orbit-ring-guide {
  inset: 11.5%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  -webkit-mask-image: conic-gradient(from 34deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08) 21%, rgba(0, 0, 0, 0.74) 43%, rgba(0, 0, 0, 0.16) 66%, #000 84%, rgba(0, 0, 0, 0.58));
  mask-image: conic-gradient(from 34deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08) 21%, rgba(0, 0, 0, 0.74) 43%, rgba(0, 0, 0, 0.16) 66%, #000 84%, rgba(0, 0, 0, 0.58));
}

.orbit-ring-middle {
  inset: 17.5%;
  border: 1px dashed rgba(255, 126, 114, 0.48);
  -webkit-mask-image: conic-gradient(from -90deg, #000, rgba(0, 0, 0, 0.32) 32%, rgba(0, 0, 0, 0.08) 54%, rgba(0, 0, 0, 0.26) 72%, rgba(0, 0, 0, 0.92));
  mask-image: conic-gradient(from -90deg, #000, rgba(0, 0, 0, 0.32) 32%, rgba(0, 0, 0, 0.08) 54%, rgba(0, 0, 0, 0.26) 72%, rgba(0, 0, 0, 0.92));
}

.orbit-ring-inner {
  inset: 30%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  -webkit-mask-image: conic-gradient(from 12deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1) 24%, rgba(0, 0, 0, 0.48) 48%, #000 69%, rgba(0, 0, 0, 0.08) 89%, rgba(0, 0, 0, 0.72));
  mask-image: conic-gradient(from 12deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1) 24%, rgba(0, 0, 0, 0.48) 48%, #000 69%, rgba(0, 0, 0, 0.08) 89%, rgba(0, 0, 0, 0.72));
}

.orbit-ring-core {
  inset: 39%;
  border: 1px solid rgba(255, 255, 255, 0.095);
  -webkit-mask-image: conic-gradient(from -18deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.82) 18%, rgba(0, 0, 0, 0.18) 44%, rgba(0, 0, 0, 0.68) 71%, rgba(0, 0, 0, 0.08));
  mask-image: conic-gradient(from -18deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.82) 18%, rgba(0, 0, 0, 0.18) 44%, rgba(0, 0, 0, 0.68) 71%, rgba(0, 0, 0, 0.08));
}

.orbit-diagonal {
  position: absolute;
  left: -22%;
  top: 50%;
  width: 144%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 70, 63, 0.12) 8%,
    rgba(255, 70, 63, 0.38) 27%,
    rgba(255, 70, 63, 0.09) 49%,
    rgba(255, 70, 63, 0.3) 73%,
    rgba(255, 70, 63, 0.04) 94%,
    transparent 100%
  );
  transform-origin: center;
}

.orbit-diagonal-a { transform: rotate(47deg); }
.orbit-diagonal-b { transform: rotate(-47deg); }

.orbit-node {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 81, 73, 0.78);
  box-shadow: 0 0 10px rgba(255, 81, 73, 0.3);
  animation: compass-node-glow 5.4s ease-in-out infinite;
}

.orbit-node-right,
.orbit-node-left { animation-delay: -2.7s; }

.orbit-node-top { left: 50%; top: -3px; transform: translateX(-50%); }
.orbit-node-right { right: -3px; top: 50%; transform: translateY(-50%); }
.orbit-node-bottom { left: 50%; bottom: -3px; transform: translateX(-50%); }
.orbit-node-left { left: -3px; top: 50%; transform: translateY(-50%); }

.home-lockup {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: min(68vw, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -43%);
  transition: opacity 0.3s ease, transform 0.42s ease, filter 0.35s ease;
}

.home-hero.is-exiting .home-lockup {
  opacity: 0;
  filter: blur(8px);
  transform: translate(-50%, -58%) scale(0.97);
}

.home-title {
  width: min(55vw, 650px);
  max-width: 100%;
  margin: 0;
  display: block;
  line-height: 0;
  cursor: pointer;
  outline: none;
}

.home-title img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter:
    drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 4px rgba(255, 255, 255, 0.2));
  animation: wordmark-glow 3.8s ease-in-out infinite;
  transition: filter 0.25s ease, transform 0.35s ease;
}

.home-title:hover img,
.home-title:focus-visible img {
  animation: none;
  filter:
    drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 9px rgba(255, 255, 255, 0.48))
    drop-shadow(0 0 16px rgba(255, 75, 68, 0.2));
  transform: scale(1.012);
}

.home-slogan {
  margin: clamp(20px, 2vw, 30px) 0 0;
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.82rem, 1.08vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-align: center;
  white-space: nowrap;
}

.edge-star {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
}

.edge-star::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.edge-star::before {
  width: 100%;
  height: 100%;
  background: var(--paper);
  clip-path: polygon(50% 0, 57% 42%, 100% 50%, 57% 58%, 50% 100%, 43% 58%, 0 50%, 43% 42%);
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.48));
}

.edge-star-left { left: 6.5%; }
.edge-star-right { right: 6.5%; }

.character-stage {
  position: relative;
  min-height: 100svh;
  padding-top: 72px;
  display: grid;
  grid-template-columns: 168px minmax(380px, 0.92fr) minmax(440px, 1.08fr) 112px;
  grid-template-rows: minmax(0, 1fr) 128px;
  isolation: isolate;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

body:not(.ipad-edition) .character-stage {
  background: linear-gradient(180deg, #030303 0 72px, var(--paper) 72px 100%);
}

.character-stage::before {
  content: "";
  position: absolute;
  z-index: -3;
  inset: 72px 44% 0 -18%;
  background-color: #151515;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.075'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  background-blend-mode: soft-light;
  transform: skewX(var(--stage-angle));
  transform-origin: top;
}

.character-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: min(34vw, 520px);
  height: min(31vh, 300px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  background: var(--accent);
  transition: background-color 0.45s ease;
}

.stage-grid {
  position: absolute;
  z-index: -1;
  inset: 72px 0 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(16, 16, 16, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 16, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent 14%, #000 55%, #000);
}

.kinetic-word {
  position: absolute;
  z-index: -1;
  top: 14%;
  right: -2%;
  color: rgba(16, 16, 16, 0.045);
  font-family: var(--font-unified);
  font-size: clamp(7rem, 14vw, 15rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  writing-mode: vertical-rl;
  user-select: none;
}

.chapter-rail {
  grid-column: 1;
  grid-row: 1 / -1;
  position: relative;
  z-index: 6;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding: 40px 22px 24px 18px;
  color: var(--ink);
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
  transition: background-color 0.45s ease;
}

.rail-label {
  max-width: 88px;
  font-family: var(--font-unified);
  font-size: 21px;
  line-height: 0.9;
  text-transform: uppercase;
}

@media (min-width: 901px) {
  html[lang="ko"] .rail-label {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(17px, 1.05vw, 21px);
    letter-spacing: -0.05em;
  }
}

.rail-number {
  margin-top: 2px;
  font-family: var(--font-unified);
  font-size: 74px;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.rail-line {
  width: 72px;
  height: 6px;
  margin: 5px 0;
  background: var(--ink);
  transform: skewX(-20deg);
}

.rail-specimen {
  max-width: 86px;
  font-family: var(--font-unified);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  word-break: normal;
}

.portrait-zone {
  grid-column: 2;
  grid-row: 1 / -1;
  position: relative;
  z-index: 7;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.portrait-halo {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 46%;
  width: min(42vw, 610px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, 0.025),
    0 0 0 76px rgba(255, 255, 255, 0.018),
    inset 0 0 80px var(--accent-soft);
  transform: translate(-50%, -50%);
  transition: box-shadow 0.45s ease;
}

.portrait-halo::before,
.portrait-halo::after {
  content: "";
  position: absolute;
  inset: 10%;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  animation: spin 24s linear infinite;
}

.portrait-halo::after {
  inset: 28%;
  animation-direction: reverse;
  animation-duration: 14s;
}

.character-silhouette {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 46%;
  width: min(35vw, 510px);
  height: min(42vw, 610px);
  object-fit: contain;
  object-position: center;
  opacity: 0.15;
  filter: invert(1) contrast(1.08);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.character-silhouette[data-character="joan"] {
  transform: translate(-50%, -49%) rotate(-7deg);
}

.character-silhouette[data-character="moriy"] {
  width: min(40vw, 580px);
  transform: translate(-50%, -52%);
}

.portrait-shadow {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 66px;
  width: 58%;
  height: 8%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  filter: blur(16px);
  transform: translateX(-50%) skewX(-18deg);
}

.character-signature {
  --signature-image: url("./assets/joan-signature.png");
  position: absolute;
  z-index: 4;
  left: -16%;
  bottom: 20%;
  width: min(34vw, 510px);
  aspect-ratio: 2.82;
  pointer-events: none;
  opacity: 0.94;
  background-image: linear-gradient(
    106deg,
    #5d3a0a 0%,
    #a96e1c 12%,
    #f0cb6a 29%,
    #fff1b0 42%,
    #b77a25 55%,
    #f5d984 73%,
    #805110 88%,
    #d5a642 100%
  );
  background-size: 180% 100%;
  background-position: 42% 50%;
  -webkit-mask-image: var(--signature-image);
  mask-image: var(--signature-image);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  filter:
    drop-shadow(0 1px 0 rgba(255, 245, 190, 0.82))
    drop-shadow(0 3px 2px rgba(66, 36, 4, 0.78))
    drop-shadow(0 0 12px rgba(229, 181, 70, 0.18));
  transform: rotate(-3deg);
  transform-origin: center;
  transition: opacity 0.28s ease, transform 0.42s ease;
}

.character-signature[data-character="moriy"] {
  left: -12%;
  bottom: 19%;
  width: min(35vw, 530px);
  aspect-ratio: 3.77;
  transform: rotate(-2deg);
}

.character-art {
  position: relative;
  z-index: 3;
  width: min(43vw, 610px);
  max-width: none;
  height: calc(100svh - 88px);
  object-fit: contain;
  object-position: center bottom;
  background: transparent;
  filter: drop-shadow(22px 18px 0 rgba(0, 0, 0, 0.16));
  transform: translate3d(var(--pointer-x), var(--pointer-y), 0) scale(1.02);
  transform-origin: center bottom;
  transition: opacity 0.22s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.45s ease;
  will-change: transform;
}

.character-art.switching {
  opacity: 0;
  transform: translate3d(calc(var(--pointer-x) - 28px), calc(var(--pointer-y) + 4px), 0) scale(0.985);
}

.character-copy {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  z-index: 10;
  align-self: center;
  width: min(100%, 690px);
  padding: 42px 34px 24px 42px;
  transform: translateY(-1vh);
}

.eyebrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: clamp(52px, 4vw, 82px);
  font-family: var(--font-unified);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

html[lang="zh-CN"] .eyebrow-row,
html[lang="ko"] .eyebrow-row {
  gap: 14px;
  font-size: 15px;
  letter-spacing: 0.035em;
}

#character-archive-id {
  font-weight: 800;
}

.rank-stamp {
  padding: 6px 9px 5px;
  color: var(--paper);
  background: var(--ink);
  transform: skewX(-10deg);
}

.character-copy h1 {
  margin: 20px 0 0 clamp(52px, 4vw, 82px);
  font-family: var(--font-unified);
  font-size: clamp(5rem, 8vw, 8.5rem);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.character-title {
  width: max-content;
  max-width: 100%;
  margin: 15px 0 18px;
  padding: 7px 12px 6px;
  color: var(--ink);
  background: var(--accent);
  font-family: var(--font-unified);
  font-size: clamp(0.9rem, 1.35vw, 1.3rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.045em;
  transform: skewX(-8deg);
  transition: background-color 0.45s ease;
}

.data-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.data-chips span {
  padding: 6px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-unified);
  font-size: 11px;
  font-weight: 800;
}

.character-copy blockquote {
  position: relative;
  max-width: 100%;
  margin: 28px 0 22px;
  padding: 0 0 0 18px;
  border-left: 7px solid var(--ink);
  font-family: var(--font-unified);
  font-size: clamp(0.95rem, 1.15vw, 1.15rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.file-tabs {
  display: flex;
  gap: 4px;
  margin-top: 14px;
}

.file-tab {
  appearance: none;
  min-width: 76px;
  padding: 10px 14px 9px;
  border: 0;
  border-bottom: 3px solid var(--ink);
  color: rgba(16, 16, 16, 0.5);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s ease;
}

.file-tab:hover,
.file-tab:focus-visible,
.file-tab.active {
  color: var(--paper);
  background: var(--ink);
  outline: none;
}

.file-panel {
  height: 176px;
  min-height: 124px;
  max-width: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 18px 0 17px;
  border: 0;
  overflow: hidden;
  background: transparent;
}

.file-panel.has-media {
  min-height: 176px;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 38%);
  gap: 16px;
}

.file-panel.weapon-view {
  min-height: 176px;
  grid-template-columns: minmax(0, 0.88fr) minmax(270px, 1.12fr);
  align-items: center;
  gap: 16px;
}

.panel-text {
  min-width: 0;
}

.panel-kicker {
  margin-bottom: 7px;
  color: #72726f;
  font-family: var(--font-unified);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.panel-title {
  margin: 0 0 7px;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-unified);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.panel-title[hidden] {
  display: none;
}

.file-panel p {
  margin: 0;
  max-width: 64ch;
  color: #353533;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.48;
}

.panel-media {
  position: relative;
  min-height: 136px;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

.panel-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
}

.panel-media img[hidden] {
  display: none;
}

.panel-media.weapon-sheet {
  height: 140px;
  min-height: 140px;
  background: transparent;
}

.faction-stack {
  grid-column: 4;
  grid-row: 1 / -1;
  position: relative;
  z-index: 12;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 18px 11px;
  background: #0d0d0d;
}

.faction-card {
  appearance: none;
  min-height: 142px;
  padding: 10px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #8c8c8c;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 56%),
    #202020;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  cursor: pointer;
  transition: 0.25s ease;
}

.faction-card:hover,
.faction-card:focus-visible,
.faction-card.active {
  color: var(--paper);
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), #202020 58%);
  outline: none;
}

.faction-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
}

.faction-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(1) opacity(0.62);
  transition: filter 0.25s ease, transform 0.25s ease;
}

.faction-card:hover .faction-icon img,
.faction-card:focus-visible .faction-icon img,
.faction-card.active .faction-icon img {
  filter: none;
  transform: scale(1.04);
}

.faction-card > span:last-child {
  display: block;
  font-family: var(--font-unified);
  font-size: 10px;
  line-height: 1.05;
  text-align: center;
}

.character-switcher {
  grid-column: 3;
  grid-row: 2;
  position: relative;
  z-index: 16;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 34px 18px 42px;
}

.character-thumb {
  --face-offset-y: -8%;
  appearance: none;
  position: relative;
  width: 142px;
  height: 56px;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 3px solid var(--ink);
  color: var(--ink);
  background: #292929;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  cursor: pointer;
  transition: 0.25s ease;
}

.character-thumb[data-character="moriy"] {
  --face-offset-y: -12%;
}

.character-thumb img {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: 300%;
  max-width: none;
  height: auto;
  filter: grayscale(1) contrast(1.08) brightness(0.54);
  opacity: 0.8;
  transform: translate(-50%, var(--face-offset-y));
  transform-origin: center center;
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.35s ease;
}

.character-thumb:hover,
.character-thumb:focus-visible,
.character-thumb.active {
  border-color: var(--accent);
  background: var(--accent);
  transform: translateY(-4px);
  outline: none;
}

.character-thumb:hover img,
.character-thumb:focus-visible img,
.character-thumb.active img {
  filter: contrast(1.04) brightness(1);
  opacity: 1;
  transform: translate(-50%, var(--face-offset-y)) scale(1.06);
}

.next-file {
  appearance: none;
  width: 54px;
  height: 54px;
  border: 0;
  color: var(--paper);
  background: var(--ink);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  transform: skewX(-10deg);
  cursor: pointer;
  transition: 0.2s ease;
}

.next-file:hover,
.next-file:focus-visible {
  color: var(--ink);
  background: var(--accent-2);
  outline: none;
  transform: skewX(-10deg) translateX(4px);
}

.illustrations {
  position: relative;
  height: 100svh;
  min-height: 680px;
  padding: calc(72px + clamp(22px, 2.4vw, 38px)) clamp(28px, 4vw, 72px) clamp(22px, 2vw, 34px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: var(--paper);
  background: #090909;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.illustrations::before {
  content: "";
  position: absolute;
  inset: 72px 0 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0 28%, transparent 76%);
}

.illustrations-heading {
  position: relative;
  z-index: 3;
  justify-self: center;
  text-align: center;
}

.illustrations-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.illustrations-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(2.35rem, 4.15vw, 4.9rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.illustration-carousel-shell {
  position: relative;
  z-index: 2;
  min-height: 0;
  width: min(100%, 1500px);
  height: 100%;
  justify-self: center;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  perspective: 1450px;
}

.illustration-carousel {
  position: relative;
  min-width: 0;
  width: 100%;
  height: min(54vh, 540px);
  min-height: 350px;
  display: grid;
  place-items: center;
  outline: none;
  perspective: 1350px;
  transform-style: preserve-3d;
  touch-action: pan-y;
}

.illustration-carousel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2.5%;
  width: min(66vw, 880px);
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.74);
  filter: blur(24px);
  transform: translateX(-50%) rotateX(68deg);
  pointer-events: none;
}

.illustration-card {
  position: absolute;
  z-index: var(--card-z, 1);
  left: 50%;
  top: 50%;
  width: clamp(230px, 20vw, 350px);
  aspect-ratio: 0.76;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.58);
  cursor: zoom-in;
  opacity: var(--card-opacity, 0);
  pointer-events: var(--card-events, none);
  transform: translate3d(calc(-50% + var(--card-x, 0px)), calc(-50% + var(--card-y, 0px)), var(--card-depth, 0px)) rotateY(var(--card-rotate, 0deg)) scale(var(--card-scale, 1));
  transform-style: preserve-3d;
  transition:
    transform 0.68s cubic-bezier(0.2, 0.75, 0.2, 1),
    opacity 0.48s ease,
    border-color 0.3s ease,
    box-shadow 0.36s ease,
    filter 0.48s ease;
  will-change: transform, opacity;
}

.illustration-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.16) 46%, transparent 62%);
  opacity: 0;
  transform: translateX(-64%);
  transition: opacity 0.28s ease, transform 0.7s ease;
  pointer-events: none;
}

.illustration-card:hover,
.illustration-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 34px 84px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 86, 67, 0.2);
  outline: none;
}

.illustration-card:hover::after,
.illustration-card:focus-visible::after {
  opacity: 0.9;
  transform: translateX(68%);
}

.illustration-card[data-active="true"]:hover,
.illustration-card[data-active="true"]:focus-visible {
  transform: translate3d(calc(-50% + var(--card-x, 0px)), calc(-50% + var(--card-y, 0px) - 9px), var(--card-depth, 0px)) rotateY(var(--card-rotate, 0deg)) scale(calc(var(--card-scale, 1) * 1.025));
}

.illustration-frame {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #f4f3ef;
}

.illustration-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.illustration-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.75, 0.2, 1), filter 0.4s ease;
}

.illustration-card[data-index="2"] img,
.illustration-card[data-index="5"] img {
  object-position: 70% 50%;
}

.illustration-card[data-index="3"] img,
.illustration-card[data-index="4"] img {
  object-position: 28% 50%;
}

.illustration-card-poster .illustration-frame {
  background: #0c0c0c;
}

.illustration-card-poster img {
  object-fit: contain;
}

.illustration-card:hover img,
.illustration-card:focus-visible img {
  transform: scale(1.045);
  filter: saturate(1.06) contrast(1.02);
}

.illustration-card-meta {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 50px 19px 17px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.74);
}

.illustration-card-meta span {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
}

.illustration-card-meta strong {
  font-size: 14px;
  font-weight: 800;
}

.carousel-control,
.lightbox-nav,
.lightbox-close {
  position: relative;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 12, 12, 0.62);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.carousel-control {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.carousel-control:hover,
.carousel-control:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible,
.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: #0a0a0a;
  background: #fff;
  border-color: #fff;
  outline: none;
  transform: scale(1.06);
}

.carousel-status {
  position: relative;
  z-index: 3;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

#carousel-current {
  color: #fff;
}

.carousel-status-line {
  width: 58px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0.24));
}

.illustration-lightbox[hidden] {
  display: none;
}

.illustration-lightbox {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
  gap: 20px;
  padding: 42px 40px 30px;
  background: rgba(2, 2, 2, 0.94);
  backdrop-filter: blur(18px);
  animation: lightbox-in 0.3s ease both;
}

.lightbox-figure {
  min-width: 0;
  min-height: 0;
  height: calc(100vh - 72px);
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  gap: 12px;
}

.lightbox-figure img {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.58);
}

.lightbox-figure figcaption {
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lightbox-nav {
  width: 54px;
  height: 54px;
  justify-self: center;
  font-size: 22px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 42px;
  height: 42px;
  font-size: 28px;
  font-weight: 300;
}

body.lightbox-open {
  overflow: hidden;
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.game-file {
  height: 100svh;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
  padding: calc(72px + clamp(40px, 5vw, 76px)) clamp(28px, 7vw, 120px) clamp(46px, 6vw, 90px);
  color: var(--paper);
  background:
    linear-gradient(115deg, transparent 0 60%, rgba(255, 255, 255, 0.035) 60% 63%, transparent 63%),
    radial-gradient(circle at 20% 70%, var(--accent-soft), transparent 30%),
    #111;
  border-top: 12px solid var(--accent);
  transition: border-color 0.45s ease;
}

.game-file-heading {
  min-width: 0;
}

.game-file-heading > span {
  font-family: var(--font-unified);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.game-file h2 {
  margin: 22px 0 0;
  font-family: var(--font-unified);
  font-size: clamp(4rem, 6.3vw, 8rem);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.04em;
}

.game-file-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 700px;
}

.game-file-copy p {
  color: #bdbdb8;
  font-size: 17px;
  line-height: 1.65;
}

.game-file-copy .lead {
  margin-top: 0;
  color: var(--paper);
  font-family: var(--font-unified);
  font-size: clamp(1.45rem, 2.25vw, 2.35rem);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.game-tags span {
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-unified);
  font-size: 12px;
  font-weight: 700;
}

.back-to-files {
  grid-column: 2;
  width: max-content;
  padding-bottom: 7px;
  border-bottom: 3px solid var(--accent);
  font-family: var(--font-unified);
  font-size: 13px;
  transition: 0.2s ease;
}

.back-to-files:hover,
.back-to-files:focus-visible {
  color: var(--accent-2);
  outline: none;
  transform: translateY(-2px);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes compass-node-glow {
  0%, 100% {
    opacity: 0.55;
    box-shadow: 0 0 5px rgba(255, 81, 73, 0.16);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(255, 81, 73, 0.38);
  }
}

@keyframes wordmark-glow {
  0%, 100% {
    filter:
      drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5))
      drop-shadow(0 0 3px rgba(255, 255, 255, 0.16));
  }
  50% {
    filter:
      drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5))
      drop-shadow(0 0 7px rgba(255, 255, 255, 0.38))
      drop-shadow(0 0 13px rgba(255, 78, 70, 0.12));
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 210px 1fr auto;
    gap: 14px;
  }

  .top-meta {
    display: none;
  }

  .character-stage {
    grid-template-columns: 128px minmax(330px, 0.9fr) minmax(390px, 1.1fr) 90px;
  }

  .character-copy {
    padding-left: 20px;
    padding-right: 18px;
  }

  .character-switcher {
    padding-left: 20px;
    padding-right: 16px;
  }

  .character-thumb {
    width: 132px;
  }
}

@media (max-width: 900px) {
  .topbar {
    height: 64px;
    grid-template-columns: auto 1fr auto;
    padding: 0 18px;
  }

  .primary-nav {
    justify-self: end;
  }

  .nav-item {
    padding: 8px 11px;
    font-size: 12px;
  }

  .brand-copy {
    display: none;
  }

  .brand-mark {
    width: 50px;
    height: 38px;
  }

  .home-hero {
    padding-top: 64px;
  }

  .page-transition {
    inset: 64px 0 0;
  }

  .home-hero::before {
    inset: 64px 0 0;
  }

  .home-hero::after {
    inset: 64px 0 0;
  }

  .home-axis {
    top: 50%;
  }

  .home-orbit {
    top: 50%;
    width: min(118vw, 760px);
    min-width: 540px;
  }

  .home-lockup {
    width: min(86vw, 720px);
  }

  .home-title {
    width: min(78vw, 660px);
  }

  .edge-star {
    top: 50%;
  }

  .character-stage {
    min-height: 100svh;
    padding-top: 64px;
    grid-template-columns: 86px minmax(0, 1fr);
    grid-template-rows: minmax(430px, 58svh) auto 104px;
  }

  body:not(.ipad-edition) .character-stage {
    background: linear-gradient(180deg, #030303 0 64px, var(--paper) 64px 100%);
  }

  .character-stage::before {
    inset: 64px 18% 36% -30%;
  }

  .character-stage::after {
    right: 0;
    bottom: 0;
    width: 48vw;
    height: 150px;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
  }

  .chapter-rail {
    grid-column: 1;
    grid-row: 1;
    padding: 26px 10px;
  }

  .rail-label {
    font-size: 16px;
  }

  .rail-number {
    font-size: 52px;
  }

  .rail-specimen {
    font-size: 10px;
  }

  .portrait-zone {
    grid-column: 2;
    grid-row: 1;
  }

  .character-signature {
    left: -8%;
    bottom: 17%;
    width: min(66vw, 500px);
  }

  .character-signature[data-character="moriy"] {
    left: -4%;
    bottom: 16%;
    width: min(68vw, 520px);
  }

  .character-art {
    width: min(86vw, 560px);
    height: calc(58svh - 18px);
  }

  .portrait-halo {
    width: 68vw;
  }

  .character-silhouette {
    width: min(62vw, 460px);
    height: min(70vw, 520px);
  }

  .character-silhouette[data-character="moriy"] {
    width: min(68vw, 510px);
  }

  .character-copy {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 32px 24px 14px;
    transform: none;
    background: linear-gradient(180deg, rgba(242, 241, 237, 0.93), var(--paper) 24%);
  }

  .character-copy h1 {
    margin-left: 0;
    font-size: clamp(4.5rem, 20vw, 8rem);
  }

  .eyebrow-row {
    margin-left: 0;
  }

  .faction-stack {
    display: none;
  }

  .character-switcher {
    grid-column: 1 / -1;
    grid-row: 3;
    padding: 10px 20px 20px;
    background: var(--paper);
  }

  .character-thumb {
    width: min(32vw, 138px);
  }

  .file-panel.has-media {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 34%);
  }

  .illustrations {
    height: 100svh;
    min-height: 620px;
    padding: 86px 18px 24px;
  }

  .illustrations::before {
    inset: 64px 0 0;
  }

  .illustrations-heading h2 {
    font-size: clamp(2.25rem, 8vw, 4.4rem);
  }

  .illustration-carousel-shell {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .illustration-carousel {
    height: min(52vh, 500px);
    min-height: 330px;
  }

  .illustration-card {
    width: clamp(210px, 38vw, 310px);
  }

  .carousel-control {
    width: 38px;
    height: 38px;
  }

  .illustration-lightbox {
    grid-template-columns: 50px minmax(0, 1fr) 50px;
    gap: 10px;
    padding-inline: 16px;
  }

  .game-file {
    height: auto;
    min-height: 100svh;
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 104px 26px 58px;
  }

  .back-to-files {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 12px;
  }

  .primary-nav .nav-item:last-child {
    display: none;
  }

  .primary-nav {
    gap: 2px;
  }

  .nav-item {
    padding-inline: 8px;
  }

  .home-lockup {
    left: 50%;
    top: 50%;
    width: 91vw;
    transform: translate(-50%, -42%);
  }

  .home-title {
    width: 86vw;
  }

  .home-slogan {
    max-width: 92vw;
    padding: 0;
    font-size: clamp(0.67rem, 3vw, 0.82rem);
    letter-spacing: 0.09em;
  }

  .edge-star {
    display: none;
  }

  .illustrations {
    padding-inline: 10px;
  }

  .illustrations-heading h2 {
    font-size: clamp(2rem, 11vw, 3.25rem);
  }

  .illustration-carousel-shell {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
  }

  .illustration-carousel {
    min-height: 310px;
  }

  .illustration-card {
    width: min(58vw, 260px);
    border-radius: 14px;
  }

  .carousel-control {
    width: 34px;
    height: 34px;
  }

  .illustration-lightbox {
    grid-template-columns: 1fr;
    padding: 58px 14px 18px;
  }

  .lightbox-nav {
    position: absolute;
    bottom: 18px;
    width: 44px;
    height: 44px;
  }

  .lightbox-prev {
    left: 18px;
  }

  .lightbox-next {
    right: 18px;
  }

  .lightbox-figure {
    height: calc(100vh - 90px);
  }

  .language-label {
    display: none;
  }

  .language-toggle {
    min-width: 64px;
    padding-inline: 8px;
  }

  .language-menu {
    width: 142px;
  }

  .character-stage {
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: minmax(400px, 55svh) auto 90px;
  }

  .rail-label {
    font-size: 14px;
  }

  .rail-number {
    font-size: 43px;
  }

  .rail-line {
    width: 38px;
    height: 4px;
  }

  .character-art {
    width: 94vw;
    height: 54svh;
    transform: translate3d(calc(var(--pointer-x) - 2vw), var(--pointer-y), 0) scale(1.03);
  }

  .character-signature {
    left: -10%;
    bottom: 18%;
    width: 78vw;
  }

  .character-signature[data-character="moriy"] {
    left: -6%;
    bottom: 17%;
    width: 80vw;
  }

  .character-copy {
    padding: 26px 17px 12px;
  }

  .character-copy h1 {
    margin-top: 18px;
    font-size: clamp(4rem, 21vw, 6.4rem);
  }

  .character-copy blockquote {
    font-size: 1rem;
  }

  .file-tab {
    flex: 1;
    min-width: 0;
    padding-inline: 7px;
  }

  .file-panel {
    height: 360px;
    min-height: 360px;
    padding-inline: 14px;
  }

  .file-panel.has-media {
    grid-template-columns: 1fr;
  }

  .file-panel.weapon-view {
    min-height: 360px;
  }

  .panel-media {
    min-height: 168px;
  }

  .panel-media.weapon-sheet {
    min-height: 220px;
  }

  .character-switcher {
    gap: 7px;
    padding: 8px 12px 16px;
  }

  .character-thumb {
    width: min(31vw, 124px);
    height: 50px;
    border-width: 2px;
  }

  .next-file {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .character-art { transform: none; }
}
