@font-face {
  font-family: "Heir of Light";
  src: url("./assets/fonts/heir-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Heir of Light";
  src: url("./assets/fonts/heir-bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #071019;
  --panel: #0b1621;
  --panel-soft: #101e2b;
  --line: rgba(184, 218, 230, 0.2);
  --line-strong: rgba(210, 237, 245, 0.55);
  --text: #ecf5f7;
  --muted: #91a7b2;
  --accent: #d8ff3e;
  --cyan: #5cd6e8;
  --danger: #ff6c58;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  background:
    radial-gradient(circle at 80% 0%, rgba(43, 105, 126, 0.22), transparent 34%),
    #050b11;
  color: var(--text);
  font-family: "Heir of Light", "Malgun Gothic", sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
.screen:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.site-frame {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  overflow: hidden;
}

.site-frame::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to right, transparent, black 24%, black);
}

.left-rail {
  position: relative;
  z-index: 4;
  min-height: 100svh;
  border-right: 1px solid var(--line);
  background: rgba(4, 11, 17, 0.92);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.brand-mark {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 22px auto 34px;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  clip-path: polygon(20% 0, 100% 0, 100% 80%, 80% 100%, 0 100%, 0 20%);
}

.brand-mark span {
  font: 700 38px/1 Arial, sans-serif;
  color: var(--accent);
}

.brand-mark i {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 7px;
  height: 7px;
  background: var(--cyan);
}

.primary-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.primary-nav button {
  position: relative;
  min-height: 88px;
  padding: 12px 8px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease;
}

.primary-nav button::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 10px;
  width: 11px;
  height: 1px;
  background: var(--line-strong);
}

.primary-nav button span {
  display: block;
  margin-bottom: 7px;
  color: #51646e;
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.primary-nav button b {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
}

.primary-nav button:hover,
.primary-nav button.active {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(216, 255, 62, 0.13), transparent);
}

.primary-nav button.active b {
  color: var(--text);
}

.primary-nav button.active span {
  color: var(--accent);
}

.rail-status {
  padding: 26px 0;
  color: #5f747f;
  font: 700 9px/1 Arial, sans-serif;
  letter-spacing: 0.16em;
  text-align: center;
}

.rail-status i,
.bottom-status i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(216, 255, 62, 0.65);
}

.workspace {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 76px minmax(0, 1fr) 34px;
  padding: 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.topbar p,
.topbar h2,
.topbar-status span,
.topbar-status b {
  margin: 0;
}

.topbar p {
  color: var(--cyan);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.22em;
}

.topbar h2 {
  margin-top: 7px;
  font-size: 19px;
  line-height: 1;
}

.topbar-status {
  display: grid;
  grid-template-columns: auto auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.11em;
}

.topbar-status b {
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--text);
}

.screen {
  position: relative;
  min-height: 0;
  margin: 18px 0 12px;
  overflow: auto;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.024), transparent 30%),
    rgba(7, 16, 25, 0.93);
  scrollbar-width: thin;
  scrollbar-color: #50636d transparent;
}

.screen-grid {
  position: fixed;
  inset: 95px 28px 46px 140px;
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(rgba(117, 157, 170, 0.24) 0.7px, transparent 0.7px);
  background-size: 14px 14px;
  mask-image: linear-gradient(135deg, black, transparent 65%);
}

.screen-corner {
  position: absolute;
  z-index: 5;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.screen-corner::before,
.screen-corner::after {
  content: "";
  position: absolute;
  background: var(--line-strong);
}

.screen-corner::before {
  width: 22px;
  height: 1px;
}

.screen-corner::after {
  width: 1px;
  height: 22px;
}

.top-left { top: 8px; left: 8px; }
.top-right { top: 8px; right: 8px; transform: rotate(90deg); }
.bottom-left { bottom: 8px; left: 8px; transform: rotate(-90deg); }
.bottom-right { right: 8px; bottom: 8px; transform: rotate(180deg); }

.screen-section {
  position: relative;
  z-index: 2;
  min-height: 100%;
  padding: clamp(26px, 4vw, 54px);
  animation: panel-in 320ms ease both;
}

.section-heading {
  min-height: 72px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.section-heading > span,
.section-heading > em {
  color: var(--cyan);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.16em;
  font-style: normal;
}

.section-heading > em {
  color: var(--muted);
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 48px);
  line-height: 0.95;
}

.section-heading.compact {
  min-height: auto;
  margin-top: 32px;
}

.section-heading.compact h2 {
  font-size: clamp(24px, 2.5vw, 36px);
}

.tower-section {
  padding-top: clamp(24px, 3vw, 42px);
}

.tower-hero {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 16, 25, 0.98) 0%, rgba(7, 16, 25, 0.8) 48%, rgba(8, 22, 31, 0.32) 100%),
    url("./assets/map/1.webp") center/cover;
}

#panel-content {
  min-height: 100%;
}

.tower-copy {
  align-self: center;
  padding: clamp(32px, 4vw, 64px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.18em;
}

.tower-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 66px);
  line-height: 1;
  font-weight: 400;
}

.tower-copy h1 strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 1.34em;
  font-weight: 700;
}

.mission-strip {
  max-width: 440px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
  padding-top: 14px;
}

.mission-strip span {
  color: var(--danger);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.15em;
}

.mission-strip b {
  font-size: 14px;
}

.tower-visual {
  position: relative;
  display: flex;
  min-height: 310px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: 26px 32px;
  border-left: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgba(5, 13, 18, 0.52));
}

.tower-spine {
  position: absolute;
  right: 80px;
  bottom: -30px;
  width: 80px;
  height: 300px;
  opacity: 0.58;
  background:
    linear-gradient(125deg, transparent 49%, var(--line-strong) 50%, transparent 51%),
    linear-gradient(55deg, transparent 49%, var(--line-strong) 50%, transparent 51%);
  background-size: 100% 38px;
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
}

.floor {
  position: relative;
  z-index: 2;
  color: rgba(236, 245, 247, 0.48);
  font: 700 11px/1 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.floor::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 42px;
  width: 70px;
  height: 1px;
  background: var(--line);
}

.floor.top {
  color: var(--accent);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.rule-item {
  min-height: 98px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-content: center;
  margin: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 23, 33, 0.62);
}

.rule-item span,
.card-index {
  color: var(--accent);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.1em;
}

.rule-item p {
  margin: 0;
  color: #c9d7dc;
  font-size: 13px;
  line-height: 1.45;
}

.world-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.world-card {
  position: relative;
  min-height: 210px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(17, 37, 50, 0.72), rgba(7, 16, 25, 0.48));
}

.world-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 4px;
  background: var(--cyan);
  opacity: 0.55;
}

.world-card h2 {
  margin: 24px 0 17px;
  font-size: 21px;
}

.world-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.world-card li {
  position: relative;
  padding-left: 12px;
  color: #a9bac2;
  font-size: 13px;
  line-height: 1.38;
}

.world-card li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 4px;
  height: 1px;
  background: var(--accent);
}

.world-footer {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: center;
  margin-top: 18px;
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  background: rgba(216, 255, 62, 0.08);
}

.world-footer span {
  color: var(--accent);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.16em;
}

.world-footer p {
  margin: 0;
  font-size: 14px;
}

.npc-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  min-height: 540px;
}

.npc-index {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.npc-index button {
  position: relative;
  min-height: 61px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 3px 8px;
  align-content: center;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: rgba(11, 24, 34, 0.62);
  cursor: pointer;
  text-align: left;
}

.npc-index button span {
  grid-row: 1 / 3;
  align-self: center;
  color: #50646d;
  font: 700 10px/1 Arial, sans-serif;
}

.npc-index button b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.npc-index button small {
  color: var(--muted);
  font-size: 10px;
}

.npc-index button.active {
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(92, 214, 232, 0.17), rgba(11, 24, 34, 0.68));
}

.npc-index button.active::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
}

.npc-index button.active span {
  color: var(--accent);
}

.npc-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
  border: 1px solid var(--line);
  background: rgba(8, 18, 27, 0.82);
}

.npc-portrait {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #101923;
}

.npc-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5, 12, 18, 0.95), transparent 48%),
    linear-gradient(90deg, transparent 70%, rgba(5, 12, 18, 0.45));
  pointer-events: none;
}

.npc-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform 500ms ease;
}

.npc-card:hover .npc-portrait img {
  transform: scale(1.018);
}

.portrait-scan {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  background: repeating-linear-gradient(0deg, transparent 0 5px, #9ee8f2 6px);
  mix-blend-mode: overlay;
}

.rank-flag {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  padding: 9px 12px;
  background: var(--accent);
  color: #071019;
  font-size: 12px;
  font-weight: 700;
}

.portrait-caption {
  position: absolute;
  z-index: 3;
  right: 28px;
  bottom: 28px;
  left: 28px;
}

.portrait-caption span {
  color: var(--cyan);
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: 0.16em;
}

.portrait-caption h2 {
  margin: 9px 0 0;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.65);
}

.npc-profile {
  min-width: 0;
  align-self: center;
  padding: clamp(24px, 3.2vw, 48px);
}

.stat-row {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 1.6fr;
  margin-bottom: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-row div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.stat-row div:last-child {
  border-right: 0;
}

.stat-row span {
  color: var(--muted);
  font: 700 9px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.stat-row b {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-list {
  display: grid;
  gap: 13px;
  margin: 0;
}

.profile-list div {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
}

.profile-list dt {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
  color: #b5c4ca;
  font-size: 12px;
  line-height: 1.45;
}

.npc-profile blockquote {
  margin: 26px 0 0;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  background: rgba(216, 255, 62, 0.07);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 20px;
}

.map-viewer {
  position: relative;
  min-height: 490px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #08111a;
}

.map-viewer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 14, 21, 0.36), transparent 35%),
    linear-gradient(to top, rgba(6, 14, 21, 0.38), transparent 35%);
}

.map-viewer img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.map-viewer figcaption {
  position: absolute;
  z-index: 3;
  top: 26px;
  right: 26px;
  width: 104px;
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--accent);
  padding-top: 10px;
  text-align: right;
}

.map-viewer figcaption span {
  color: var(--muted);
  font: 700 9px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.map-viewer figcaption strong {
  color: var(--accent);
  font: 700 44px/1 Arial, sans-serif;
}

.map-crosshair {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid rgba(216, 255, 62, 0.42);
}

.map-crosshair::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(216, 255, 62, 0.65);
}

.map-selector {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 5px;
}

.map-selector button {
  aspect-ratio: 1.35;
  border: 1px solid var(--line);
  background: rgba(12, 27, 38, 0.68);
  cursor: pointer;
}

.map-selector button span {
  color: var(--muted);
  font: 700 13px/1 Arial, sans-serif;
  letter-spacing: 0.1em;
}

.map-selector button:hover,
.map-selector button.active {
  border-color: var(--line-strong);
  background: var(--accent);
}

.map-selector button.active span,
.map-selector button:hover span {
  color: #071019;
}

.bottom-status {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #536872;
  font: 700 9px/1 Arial, sans-serif;
  letter-spacing: 0.12em;
}

.bottom-status div {
  color: #8aa0aa;
}

.bottom-status time {
  justify-self: end;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .site-frame {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .workspace {
    padding: 0 18px;
  }

  .screen-grid {
    right: 18px;
    left: 112px;
  }

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

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

  .npc-layout {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .npc-card {
    grid-template-columns: minmax(250px, 0.9fr) minmax(330px, 1.1fr);
  }

  .npc-profile {
    padding: 28px;
  }
}

@media (max-width: 820px) {
  .site-frame {
    display: block;
    min-height: 100svh;
    overflow: visible;
  }

  .left-rail {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 0;
    height: 72px;
    display: block;
    border-top: 1px solid var(--line-strong);
    border-right: 0;
    background: rgba(4, 11, 17, 0.96);
    backdrop-filter: blur(14px);
  }

  .brand-mark,
  .rail-status {
    display: none;
  }

  .primary-nav {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .primary-nav button {
    min-height: 72px;
    padding: 8px 4px;
    border-top: 3px solid transparent;
    border-left: 0;
  }

  .primary-nav button::after {
    display: none;
  }

  .primary-nav button:hover,
  .primary-nav button.active {
    border-top-color: var(--accent);
    border-left-color: transparent;
    background: linear-gradient(0deg, rgba(216, 255, 62, 0.13), transparent);
  }

  .primary-nav button span {
    margin-bottom: 5px;
  }

  .primary-nav button b {
    font-size: 12px;
  }

  .workspace {
    min-height: 100svh;
    grid-template-rows: 64px minmax(0, 1fr) 30px;
    padding: 0 12px 84px;
  }

  .screen {
    margin: 10px 0 8px;
    overflow: visible;
  }

  .screen-grid {
    display: none;
  }

  .topbar-status {
    display: none;
  }

.screen-section {
    padding: 24px 18px;
  }

  .section-heading {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }

  .section-heading > span {
    grid-column: 1 / -1;
  }

  .section-heading h1,
  .section-heading h2 {
    font-size: 30px;
  }

  .tower-hero {
    min-height: 460px;
    grid-template-columns: 1fr;
  }

  .tower-copy {
    position: relative;
    z-index: 2;
  }

  .tower-visual {
    position: absolute;
    inset: 0;
    min-height: 460px;
    border-left: 0;
    opacity: 0.58;
  }

  .world-grid {
    grid-template-columns: 1fr;
  }

  .world-card {
    min-height: auto;
  }

  .npc-layout {
    display: flex;
    min-height: 0;
    flex-direction: column;
  }

  .npc-index {
    order: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .npc-card {
    order: 1;
    grid-template-columns: 1fr;
  }

  .npc-portrait {
    min-height: 430px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .npc-profile {
    padding: 24px 20px;
  }

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

  .map-viewer {
    min-height: 48vw;
  }

  .map-selector {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .bottom-status {
    grid-template-columns: 1fr 1fr;
  }

  .bottom-status div {
    justify-self: end;
  }

  .bottom-status time {
    display: none;
  }
}

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

@media (max-width: 520px) {
  .topbar h2 {
    font-size: 16px;
  }

  .topbar p {
    font-size: 8px;
  }

  .rule-grid {
    grid-template-columns: 1fr;
  }

  .tower-copy h1 {
    font-size: 34px;
  }

  .tower-visual {
    padding: 24px 22px;
  }

  .section-heading.compact {
    grid-template-columns: 1fr auto;
  }

  .world-footer {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .npc-index {
    grid-template-columns: 1fr;
  }

  .npc-portrait {
    min-height: 320px;
  }

  .portrait-caption h2 {
    font-size: 36px;
  }

  .stat-row {
    grid-template-columns: 0.72fr 0.72fr 1.56fr;
  }

  .stat-row div {
    padding: 12px 9px;
  }

  .stat-row b {
    font-size: 12px;
  }

  .map-viewer {
    min-height: 62vw;
  }

  .map-selector {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

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