@import url("https://fonts.googleapis.com/css2?family=Literata:opsz,wght@7..72,400;7..72,500;7..72,600;7..72,700&family=Lora:wght@400;500;600;700&family=Noto+Serif:wght@400;500;600;700&family=PT+Serif:wght@400;700&display=swap");

:root {
  --bg: #08070c;
  --bg-2: #11101a;
  --ink: #f6f0ff;
  --text: #cbc4d6;
  --muted: #9188a4;
  --purple: #a76cff;
  --purple-hot: #d7b7ff;
  --violet: #6e36ff;
  --brass: #c69a5b;
  --glass: rgba(255, 255, 255, 0.065);
  --glass-strong: rgba(255, 255, 255, 0.105);
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  --radius-xl: 10px;
  --radius-lg: 8px;
  --radius-md: 6px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at 22% 10%, rgba(111, 54, 255, 0.32), transparent 30rem),
    radial-gradient(circle at 85% 0%, rgba(198, 154, 91, 0.15), transparent 24rem),
    linear-gradient(135deg, #08070c 0%, #0c0a13 48%, #14101c 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    radial-gradient(circle at 18% 12%, rgba(167, 108, 255, 0.22), transparent 28rem),
    radial-gradient(circle at 84% 4%, rgba(198, 154, 91, 0.1), transparent 24rem),
    linear-gradient(135deg, rgba(8, 7, 12, 0.98), rgba(11, 9, 17, 0.98));
  mask-image: linear-gradient(to bottom, black 0 68%, transparent 100%);
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.22;
  background-image: radial-gradient(rgba(255, 255, 255, 0.32) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
}

.plus-field {
  position: fixed;
  inset: -8vh -8vw;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.34;
}

.plus-mark {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%) rotate(0deg);
  animation: plus-to-cross 5.6s ease-in-out infinite;
  animation-delay: var(--delay);
}

.plus-mark::before,
.plus-mark::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.plus-mark::before {
  width: 25px;
  height: 2px;
}

.plus-mark::after {
  width: 2px;
  height: 25px;
}

@keyframes plus-to-cross {
  0%,
  22% {
    transform: translate(-50%, -50%) rotate(0deg) scale(0.92);
    opacity: 0.46;
  }

  50%,
  72% {
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
    opacity: 0.92;
  }

  100% {
    transform: translate(-50%, -50%) rotate(90deg) scale(0.92);
    opacity: 0.46;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plus-mark {
    animation: none;
    transform: translate(-50%, -50%) rotate(45deg);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  min-height: 58px;
  grid-template-columns: auto 1fr minmax(260px, 360px);
  gap: 22px;
  align-items: center;
  padding: 10px clamp(18px, 4vw, 46px);
  background: rgba(7, 6, 11, 0.78);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  display: block;
  width: 128px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(167, 108, 255, 0.36));
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.brand:hover .brand__mark {
  filter:
    drop-shadow(0 0 22px rgba(167, 108, 255, 0.52))
    drop-shadow(0 0 18px rgba(255, 171, 91, 0.12));
  transform: translateY(-1px) rotate(-2deg);
}

.kicker,
.article-card__meta {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.17em;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.main-nav a,
.language-toggle,
.reader-toolbar a,
.reader-toolbar button {
  padding: 10px 13px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.language-toggle:hover,
.reader-toolbar a:hover,
.reader-toolbar button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.main-nav .donate-link {
  position: relative;
  color: #ffd2a0;
  background: rgba(206, 109, 36, 0.12);
  box-shadow:
    0 0 14px rgba(255, 146, 64, 0.2),
    0 0 34px rgba(255, 122, 45, 0.12),
    inset 0 0 0 1px rgba(255, 181, 101, 0.16);
  text-shadow: 0 0 14px rgba(255, 190, 120, 0.45);
  animation: candle-glow 3.8s ease-in-out infinite;
}

.main-nav .donate-link::after {
  position: absolute;
  inset: -8px -10px;
  z-index: -1;
  content: "";
  background: radial-gradient(circle, rgba(255, 151, 66, 0.22), transparent 68%);
  border-radius: inherit;
  filter: blur(10px);
  opacity: 0.7;
  animation: candle-halo 3.8s ease-in-out infinite;
}

.main-nav .donate-link:hover {
  color: #ffe2bf;
  background: rgba(206, 109, 36, 0.18);
}

@keyframes candle-glow {
  0%,
  100% {
    box-shadow:
      0 0 12px rgba(255, 146, 64, 0.18),
      0 0 28px rgba(255, 122, 45, 0.1),
      inset 0 0 0 1px rgba(255, 181, 101, 0.14);
  }

  42% {
    box-shadow:
      0 0 18px rgba(255, 168, 82, 0.28),
      0 0 46px rgba(255, 124, 44, 0.17),
      inset 0 0 0 1px rgba(255, 206, 140, 0.2);
  }

  63% {
    box-shadow:
      0 0 10px rgba(255, 146, 64, 0.16),
      0 0 24px rgba(255, 122, 45, 0.09),
      inset 0 0 0 1px rgba(255, 181, 101, 0.13);
  }
}

@keyframes candle-halo {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.98);
  }

  45% {
    opacity: 0.82;
    transform: scale(1.04);
  }

  70% {
    opacity: 0.48;
    transform: scale(0.96);
  }
}

.topbar__tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.search {
  position: relative;
}

.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  border: 0;
  border-radius: 8px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.search input:focus {
  background: rgba(255, 255, 255, 0.105);
  box-shadow: 0 0 0 4px rgba(167, 108, 255, 0.16);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  z-index: 80;
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  background: rgba(15, 13, 22, 0.96);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.search-result {
  display: block;
  padding: 13px 14px;
  border-radius: 6px;
}

.search-result:hover,
.search-result.is-selected {
  background: rgba(167, 108, 255, 0.15);
}

.search-result strong {
  display: block;
  color: var(--ink);
}

.search-result span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 44px 0 96px;
}

.hero,
.page-hero,
.section,
.article-card,
.feature-card,
.profile-card,
.map-workbench,
.chapter-row,
.reader,
.cookie-banner {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    var(--shadow);
  backdrop-filter: blur(24px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: center;
  min-height: 620px;
  padding: clamp(28px, 6vw, 76px);
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.brand-watermark {
  position: absolute;
  top: 22px;
  right: clamp(20px, 4vw, 44px);
  z-index: 0;
  width: clamp(72px, 10vw, 128px);
  max-height: 128px;
  object-fit: contain;
  opacity: 0.075;
  filter:
    grayscale(0.25)
    drop-shadow(0 0 32px rgba(167, 108, 255, 0.38));
  pointer-events: none;
  user-select: none;
}

.brand-watermark--home {
  top: clamp(22px, 5vw, 52px);
  right: clamp(22px, 5vw, 60px);
  width: clamp(92px, 14vw, 180px);
  opacity: 0.1;
}

.home-banner {
  display: flex;
  min-height: min(620px, calc(100vh - 180px));
  align-items: end;
  justify-content: center;
  padding: clamp(18px, 4vw, 42px);
}

.banner-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(246, 240, 255, 0.48);
  font-size: clamp(1.2rem, 3vw, 2.8rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background:
    linear-gradient(145deg, rgba(167, 108, 255, 0.18), rgba(255, 255, 255, 0.035)),
    radial-gradient(circle at 50% 50%, rgba(167, 108, 255, 0.24), transparent 28rem);
}

.home-banner .hero__copy {
  width: 100%;
  display: flex;
  justify-content: center;
}

.home-banner .hero__actions {
  margin-top: 0;
}

.hero::after {
  position: absolute;
  inset: auto -18% -42% 46%;
  height: 72%;
  content: "";
  background: radial-gradient(circle, rgba(167, 108, 255, 0.28), transparent 68%);
  filter: blur(8px);
}

.hero__copy {
  position: relative;
  z-index: 2;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

h1 {
  max-width: 830px;
  font-size: clamp(3.2rem, 8vw, 7.8rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
}

h3 {
  font-size: 1.35rem;
}

p {
  color: var(--text);
  line-height: 1.7;
}

.hero__copy > p:not(.kicker),
.page-hero > p:not(.kicker) {
  max-width: 690px;
  font-size: 1.13rem;
}

.hero__actions,
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 900;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: 180ms ease;
}

.button--primary {
  color: #120d18;
  background: linear-gradient(135deg, #fff1ff, #b978ff 46%, #733cff);
  box-shadow: 0 20px 44px rgba(167, 108, 255, 0.32);
}

.button--secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.button:hover,
.feature-card:hover,
.chapter-row:hover {
  transform: translateY(-3px);
}

.hero-visual {
  position: relative;
  z-index: 2;
  min-height: 460px;
}

.reactor {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(340px, 74vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 5%, rgba(215, 183, 255, 0.85) 6% 11%, transparent 12%),
    conic-gradient(from 30deg, rgba(167, 108, 255, 0.05), rgba(167, 108, 255, 0.72), rgba(198, 154, 91, 0.38), rgba(167, 108, 255, 0.05));
  box-shadow: 0 0 80px rgba(167, 108, 255, 0.38);
  animation: spin 18s linear infinite;
}

.reactor::before,
.reactor::after {
  position: absolute;
  inset: 13%;
  content: "";
  border-radius: 50%;
  background: var(--bg);
}

.reactor::after {
  inset: 36%;
  background: radial-gradient(circle, #fff, var(--purple-hot) 28%, transparent 62%);
  filter: blur(2px);
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.orbital-card {
  position: absolute;
  z-index: 3;
  min-width: 170px;
  padding: 16px;
  background: rgba(8, 7, 12, 0.62);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 24px 50px rgba(0, 0, 0, 0.34);
}

.orbital-card span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.orbital-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
}

.orbital-card--one {
  top: 9%;
  right: 3%;
}

.orbital-card--two {
  bottom: 13%;
  left: 1%;
}

.section,
.page-hero {
  margin-top: 32px;
  padding: clamp(24px, 4vw, 46px);
  border-radius: var(--radius-xl);
}

.page-hero {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  font-size: clamp(2.1rem, 4vw, 4.1rem);
}

.page-hero .kicker {
  position: relative;
  z-index: 1;
}

.page-hero > p:not(.kicker) {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin-bottom: 0;
  font-size: 1rem;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: end;
}

.feature-grid,
.content-grid,
.character-board,
.chapter-shelf {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

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

.feature-card,
.article-card,
.profile-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-lg);
  transition: 180ms ease;
}

.feature-card::after,
.article-card::after,
.profile-card::after {
  position: absolute;
  inset: auto -20% -45% 30%;
  height: 72%;
  content: "";
  background: radial-gradient(circle, rgba(167, 108, 255, 0.22), transparent 65%);
  pointer-events: none;
}

.feature-card span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 48px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}

.editorial-strip {
  text-align: center;
}

.editorial-strip p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 4vw, 3.4rem);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

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

.content-grid--wide .article-card:first-child {
  grid-column: span 2;
}

.dossier {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 30px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline div {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 8px;
}

.timeline span {
  color: var(--purple-hot);
  font-weight: 900;
}

.timeline p {
  grid-column: 2;
  margin: -8px 0 0;
}

.character-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.profile-card__portrait {
  display: grid;
  width: 100%;
  height: 260px;
  place-items: center;
  margin-bottom: 26px;
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-size: 4rem;
  font-weight: 900;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    radial-gradient(circle at 35% 22%, #fff, #b978ff 30%, #34204f 100%);
  border-radius: 8px;
}

.profile-card {
  min-height: 460px;
}

.profile-card h2 {
  margin-top: 10px;
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
}

.map-workbench {
  position: relative;
  display: block;
  margin-top: 20px;
  padding: 18px;
  border-radius: var(--radius-xl);
}

.city-map {
  position: relative;
  min-height: min(720px, calc(100vh - 230px));
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 18%, rgba(167, 108, 255, 0.36), transparent 11rem),
    radial-gradient(circle at 76% 62%, rgba(198, 154, 91, 0.2), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.city-map:active {
  cursor: grabbing;
}

.map-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1400px;
  height: 900px;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center;
  will-change: transform;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.09) 49% 51%, transparent 52%),
    linear-gradient(transparent 48%, rgba(255, 255, 255, 0.08) 49% 51%, transparent 52%),
    radial-gradient(circle at 36% 30%, rgba(167, 108, 255, 0.26), transparent 18rem),
    radial-gradient(circle at 68% 64%, rgba(198, 154, 91, 0.16), transparent 20rem);
  background-size: 110px 110px, 110px 110px, auto, auto;
  border-radius: 8px;
}

.map-image-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(246, 240, 255, 0.45);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.map-demo-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--ink);
  font-weight: 900;
  background: linear-gradient(135deg, rgba(167, 108, 255, 0.95), rgba(83, 48, 180, 0.86));
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 20px 50px rgba(0, 0, 0, 0.35);
}

.map-demo-pin--one {
  top: 28%;
  left: 24%;
}

.map-demo-pin--two {
  top: 52%;
  left: 58%;
}

.map-demo-pin--three {
  top: 68%;
  left: 36%;
}

.map-controls {
  position: absolute;
  top: 34px;
  right: 34px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.map-controls button {
  min-width: 42px;
  height: 42px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(8, 7, 12, 0.72);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.chapter-shelf {
  gap: 14px;
}

.chapter-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border-radius: 8px;
  transition: 180ms ease;
}

.chapter-row > span {
  color: var(--purple-hot);
  font-size: 2rem;
  font-weight: 900;
}

.chapter-row p {
  margin: 8px 0 0;
}

.book-row {
  grid-template-columns: 96px 1fr auto;
  padding: 28px;
  background:
    radial-gradient(circle at 12% 20%, rgba(167, 108, 255, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(13, 12, 18, 0.86);
}

.book-row > span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: #120d18;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #fff1ff, #b978ff 46%, #733cff);
  border-radius: 8px;
}

.book-row--selected {
  pointer-events: none;
}

.library-back {
  width: fit-content;
  margin-bottom: 4px;
}

.reader-shell {
  width: min(1280px, calc(100% - 40px));
}

.reader-shell.is-wide {
  width: min(1280px, calc(100% - 40px));
}

.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.reader-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: end;
}

.reader-font-value {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.reader-font-picker {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}

.reader-font-picker__toggle {
  display: inline-flex;
  min-width: 142px;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 10px 0 12px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(10, 8, 15, 0.68);
  border: 0;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.reader-font-picker__toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(238, 230, 255, 0.7);
  border-bottom: 2px solid rgba(238, 230, 255, 0.7);
  transform: translateY(-2px) rotate(45deg);
  transition: 180ms ease;
}

.reader-font-picker.is-open .reader-font-picker__toggle::after {
  transform: translateY(2px) rotate(225deg);
}

.reader-font-picker__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 210px;
  padding: 8px;
  background:
    linear-gradient(145deg, rgba(38, 32, 52, 0.98), rgba(13, 11, 19, 0.98)),
    rgba(10, 8, 15, 0.98);
  border-radius: 8px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.reader-font-picker__menu[hidden] {
  display: none;
}

.reader-font-picker__menu button {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #eee7ff;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.reader-font-picker__menu button:hover,
.reader-font-picker__menu button:focus-visible {
  background: rgba(167, 108, 255, 0.16);
}

.reader-font-picker__menu button.is-selected {
  color: #ffffff;
  background: rgba(167, 108, 255, 0.22);
}

.reader-font-picker__menu button.is-selected::after {
  content: "Selected";
  color: var(--muted);
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reader-toolbar button {
  font-size: 0.78rem;
}

.reader-toolbar button:disabled,
.reader-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.reader {
  position: relative;
  --reader-font-size: 18px;
  padding: clamp(30px, 5vw, 62px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(13, 12, 18, 0.92);
  border-radius: var(--radius-xl);
}

.brand-watermark--reader {
  top: 24px;
  right: 24px;
  width: clamp(58px, 8vw, 92px);
  opacity: 0.055;
}

.reader-heading,
.reader-pages,
.reader-progress,
.reader-pagination {
  position: relative;
  z-index: 1;
}

.reader h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.reader p,
.reader-page p {
  max-width: 90ch;
  margin-right: auto;
  margin-left: auto;
  color: #c9c2d1;
  font-family: var(--reader-font-family, "Literata", Georgia, "Times New Roman", serif);
  font-size: var(--reader-font-size);
  font-weight: 400;
  line-height: 1.86;
}

.reader[data-reader-font="literata"] {
  --reader-font-family: "Literata", Georgia, "Times New Roman", serif;
}

.reader[data-reader-font="noto-serif"] {
  --reader-font-family: "Noto Serif", Georgia, "Times New Roman", serif;
}

.reader[data-reader-font="pt-serif"] {
  --reader-font-family: "PT Serif", Georgia, "Times New Roman", serif;
}

.reader[data-reader-font="lora"] {
  --reader-font-family: "Lora", Georgia, "Times New Roman", serif;
}

.reader[data-reader-font="system-serif"] {
  --reader-font-family: Georgia, "Times New Roman", serif;
}

[data-font-value="literata"],
[data-reader-font-family-option][value="literata"] {
  font-family: "Literata", Georgia, "Times New Roman", serif;
}

[data-font-value="noto-serif"],
[data-reader-font-family-option][value="noto-serif"] {
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
}

[data-font-value="pt-serif"],
[data-reader-font-family-option][value="pt-serif"] {
  font-family: "PT Serif", Georgia, "Times New Roman", serif;
}

[data-font-value="lora"],
[data-reader-font-family-option][value="lora"] {
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

[data-font-value="system-serif"],
[data-reader-font-family-option][value="system-serif"] {
  font-family: Georgia, "Times New Roman", serif;
}

.reader .kicker,
.reader h1,
.reader__lead {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
}

.reader__lead {
  color: #c9aef0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.08rem;
  line-height: 1.75;
}

.reader-mini-heading {
  width: min(1000px, 100%);
  margin: 0 auto 18px;
  color: rgba(203, 196, 214, 0.56);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.reader-mini-heading[hidden] {
  display: none;
}

.reader-progress {
  width: min(1000px, 100%);
  height: 5px;
  margin: 24px auto 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.reader-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--purple-hot), var(--violet));
  transition: width 180ms ease;
}

.reader-pages {
  min-height: 300px;
}

.reader-page {
  animation: reader-page-in 180ms ease;
}

.reader-page[hidden] {
  display: none;
}

.reader-missing {
  display: grid;
  min-height: 360px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.reader-missing h2 {
  max-width: 760px;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.reader-missing p {
  max-width: 680px;
  margin-bottom: 26px;
}

@keyframes reader-page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reader-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: min(1000px, 100%);
  margin: 38px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.reader-pagination button {
  width: 58px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.reader-pagination button:last-child {
  background: linear-gradient(135deg, #fff1ff, #b978ff 46%, #733cff);
  color: #120d18;
}

.reader-pagination span {
  color: var(--muted);
  font-weight: 900;
}

.reader-next-chapter {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #120d18;
  font-weight: 900;
  background: linear-gradient(135deg, #fff1ff, #b978ff 46%, #733cff);
  border-radius: 999px;
}

.reader-next-chapter[hidden] {
  display: none;
}

.not-found-shell {
  display: grid;
  min-height: calc(100vh - 250px);
  place-items: center;
}

.not-found-card {
  position: relative;
  width: min(980px, calc(100% - 40px));
  padding: clamp(34px, 6vw, 72px);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(167, 108, 255, 0.2), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(13, 12, 18, 0.92);
  border-radius: var(--radius-xl);
}

.not-found-card::before {
  position: absolute;
  inset: -30%;
  content: "";
  background:
    linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.08), transparent 58%),
    radial-gradient(circle, rgba(178, 111, 255, 0.12), transparent 55%);
  animation: not-found-scan 7s ease-in-out infinite;
  pointer-events: none;
}

.not-found-number {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 28px rgba(167, 108, 255, 0.28));
  animation: not-found-float 5.6s ease-in-out infinite;
}

.brand-watermark--404 {
  top: 24px;
  right: 28px;
  width: clamp(70px, 10vw, 118px);
  opacity: 0.09;
  transform: rotate(8deg);
}

.not-found-number svg {
  display: block;
  width: 100%;
  height: auto;
}

.not-found-number pattern text {
  fill: rgba(246, 240, 255, 0.92);
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.not-found-number__shadow,
.not-found-number__main {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  font-size: 260px;
  font-weight: 900;
}

.not-found-number__shadow {
  fill: rgba(167, 108, 255, 0.12);
  stroke: rgba(189, 139, 255, 0.78);
  stroke-width: 7px;
}

.not-found-number__main {
  fill: url(#tiny-404-pattern);
  stroke: rgba(255, 255, 255, 0.32);
  stroke-width: 2px;
}

.not-found-card .kicker,
.not-found-card h1,
.not-found-card p,
.not-found-card .button {
  position: relative;
  z-index: 1;
}

.not-found-card h1 {
  max-width: 760px;
  margin: 0 auto 14px;
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.not-found-card p:not(.kicker) {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.8;
}

@keyframes not-found-float {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }

  50% {
    transform: translateY(-10px) rotate(0.4deg);
  }
}

@keyframes not-found-scan {
  0%,
  100% {
    transform: translateX(-12%) rotate(0deg);
    opacity: 0.42;
  }

  50% {
    transform: translateX(12%) rotate(8deg);
    opacity: 0.82;
  }
}

.site-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: min(1180px, calc(100% - 40px));
  margin: 42px auto 28px;
  padding: 22px 0 0;
  color: rgba(203, 196, 214, 0.68);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.site-footer p {
  max-width: 780px;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.7;
}

.cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px;
  border-radius: 8px;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner h2,
.cookie-banner p {
  margin: 0;
}

.cookie-banner h2 {
  font-size: 1.25rem;
}

.cookie-banner p {
  color: var(--muted);
}

@media (max-width: 980px) {
  .topbar,
  .hero,
  .split-section,
  .dossier,
  .map-workbench {
    grid-template-columns: 1fr;
  }

  .main-nav {
    justify-content: start;
  }

  .feature-grid,
  .content-grid,
  .character-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid--wide .article-card:first-child {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  .topbar {
    position: static;
    gap: 16px;
  }

  .topbar__tools,
  .feature-grid,
  .content-grid,
  .character-board,
  .chapter-row,
  .cookie-banner {
    grid-template-columns: 1fr;
  }

  .main-nav {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main,
  .reader-shell,
  .reader-shell.is-wide {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .hero,
  .page-hero {
    min-height: auto;
  }

  .brand__mark {
    width: 102px;
    height: 36px;
  }

  .brand-watermark {
    width: 64px;
    opacity: 0.055;
  }

  .city-map {
    min-height: 520px;
  }

  .map-canvas {
    width: 980px;
    height: 680px;
  }

  .cookie-banner {
    width: auto;
  }
}
