.cosmopedia-page {
  --cosmo-bg: #020617;
  --cosmo-panel: rgba(5, 12, 28, 0.78);
  --cosmo-panel-strong: rgba(7, 20, 44, 0.92);
  --cosmo-line: rgba(116, 232, 255, 0.34);
  --cosmo-cyan: #77e7ff;
  --cosmo-mint: #7dffbf;
  --cosmo-amber: #ffd166;
  --cosmo-rose: #ff6fbd;
  --cosmo-violet: #a78bfa;
  --cosmo-text: #edf7ff;
  --cosmo-muted: rgba(226, 242, 255, 0.72);
  position: relative;
  min-height: 100svh;
  padding: clamp(7.5rem, 13vh, 9rem) clamp(1rem, 3vw, 2.5rem) 8.5rem;
  overflow: hidden;
  color: var(--cosmo-text);
  background: var(--cosmo-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  isolation: isolate;
}

.cosmopedia-page a {
  color: var(--cosmo-cyan);
  text-decoration: none;
}

.cosmopedia-page a:hover,
.cosmopedia-page a:focus-visible {
  color: var(--cosmo-amber);
}

.cosmo-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.9) 66%, rgba(2, 6, 23, 0.98)),
    radial-gradient(circle at 12% 18%, rgba(119, 231, 255, 0.2), transparent 18rem),
    radial-gradient(circle at 86% 28%, rgba(255, 111, 189, 0.16), transparent 20rem),
    url("/images/cosmopedia/space.jpg") center / cover;
  pointer-events: none;
}

.cosmo-bg::before,
.cosmo-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cosmo-bg::before {
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(119, 231, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 231, 255, 0.12) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 72%, transparent);
}

.cosmo-bg::after {
  opacity: 0.18;
  background:
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(255, 255, 255, 0.28) 6px, transparent 7px),
    radial-gradient(circle at center, transparent, rgba(0, 0, 0, 0.88));
  mix-blend-mode: screen;
}

.cosmo-kicker {
  margin: 0 0 0.85rem;
  color: var(--cosmo-mint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cosmo-hero,
.cosmo-terminal,
.cosmo-map-view {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.cosmo-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.72fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
  min-height: calc(100svh - 17rem);
}

.cosmo-hero__content,
.cosmo-terminal,
.cosmo-map-panel,
.cosmo-module {
  border: 1px solid var(--cosmo-line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(9, 26, 53, 0.82), rgba(2, 8, 23, 0.76));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
}

.cosmo-hero__content {
  padding: clamp(1.25rem, 4vw, 3rem);
}

.cosmo-hero h1,
.cosmo-terminal h1,
.cosmo-map-header h1 {
  margin: 0 0 1.1rem;
  color: #fff;
  font-size: clamp(2.2rem, 7vw, 5.7rem);
  font-weight: 900;
  line-height: 0.95;
  text-shadow: 0 0 28px rgba(119, 231, 255, 0.42), 0 0 50px rgba(255, 111, 189, 0.22);
}

.cosmopedia-page--index .cosmo-hero h1 {
  font-size: clamp(2.15rem, 5vw, 4.15rem);
}

.cosmo-copy {
  display: grid;
  gap: 0.75rem;
  color: var(--cosmo-muted);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  line-height: 1.6;
}

.cosmo-copy p,
.cosmo-terminal p {
  margin: 0;
}

.cosmo-secret {
  margin: 1.35rem 0 0;
  color: rgba(237, 247, 255, 0.5);
  font-size: 0.9rem;
}

.cosmo-home-grid {
  display: grid;
  gap: 0.85rem;
}

.cosmo-module {
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 1rem;
  color: var(--cosmo-text);
  background-size: cover;
  background-position: center;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cosmo-module--map {
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.92)), url("/images/cosmopedia/space.jpg");
}

.cosmo-module--journal {
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.94)), url("/images/cosmopedia/story.png");
}

.cosmo-module--piranha {
  background-image: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.92)), url("/images/cosmopedia/computer_ship.png");
}

.cosmo-module:hover,
.cosmo-module:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 209, 102, 0.68);
  box-shadow: 0 20px 70px rgba(119, 231, 255, 0.18);
}

.cosmo-module span {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.cosmo-module small {
  margin-top: 0.25rem;
  color: var(--cosmo-muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.cosmo-map-view {
  width: min(100%, 1280px);
}

.cosmo-map-header {
  max-width: 760px;
  margin-bottom: 0.95rem;
}

.cosmo-map-header h1 {
  font-size: clamp(2.25rem, 5vw, 4.6rem);
}

.cosmo-map-header p:last-child {
  margin: 0;
  color: var(--cosmo-muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.cosmo-map-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.42fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.cosmo-map-panel {
  padding: 1rem;
  align-self: start;
}

.cosmo-map-panel span {
  display: inline-flex;
  margin-bottom: 0.7rem;
  color: var(--cosmo-mint);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cosmo-map-panel h2 {
  margin: 0 0 0.8rem;
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
  font-weight: 900;
}

.cosmo-map-panel p {
  margin: 0 0 1rem;
  color: var(--cosmo-muted);
  line-height: 1.55;
}

.cosmo-map-panel ul {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.cosmo-map-panel li {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(119, 231, 255, 0.22);
  border-radius: 6px;
  color: rgba(237, 247, 255, 0.82);
  background: rgba(2, 8, 23, 0.42);
  font-size: 0.86rem;
}

.cosmo-map-panel small {
  color: rgba(255, 209, 102, 0.78);
}

.cosmo-planet-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.cosmo-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(119, 231, 255, 0.2);
  border-radius: 999px;
  color: rgba(237, 247, 255, 0.78);
  background: rgba(2, 8, 23, 0.56);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: crosshair;
}

.cosmo-picker span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--picker-color, var(--cosmo-cyan));
  box-shadow: 0 0 14px var(--picker-color, var(--cosmo-cyan));
}

.cosmo-picker--sun {
  --picker-color: var(--cosmo-amber);
}

.cosmo-picker--ocarnia,
.cosmo-picker--blue-egg {
  --picker-color: var(--cosmo-cyan);
}

.cosmo-picker--ekanra {
  --picker-color: var(--cosmo-violet);
}

.cosmo-picker--mathera {
  --picker-color: var(--cosmo-mint);
}

.cosmo-picker--finita {
  --picker-color: var(--cosmo-rose);
}

.cosmo-picker:hover,
.cosmo-picker:focus-visible,
.cosmo-picker.is-selected {
  border-color: rgba(255, 209, 102, 0.72);
  color: #fff;
  outline: none;
}

.cosmo-map-stage {
  position: relative;
  min-height: clamp(26rem, calc(100svh - 16rem), 46rem);
  border: 1px solid rgba(119, 231, 255, 0.26);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(119, 231, 255, 0.2), transparent 8rem),
    radial-gradient(circle at 45% 45%, rgba(255, 111, 189, 0.12), transparent 18rem),
    rgba(2, 8, 23, 0.58);
  box-shadow: inset 0 0 80px rgba(119, 231, 255, 0.08), 0 30px 90px rgba(0, 0, 0, 0.44);
}

.cosmo-grid {
  position: absolute;
  inset: -18%;
  pointer-events: none;
  opacity: 0.32;
  background:
    linear-gradient(rgba(119, 231, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 231, 255, 0.18) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(600px) rotateX(58deg);
  transform-origin: center;
}

.cosmo-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0 28%, rgba(2, 6, 23, 0.85) 72%);
}

.cosmo-sun,
.cosmo-orbit,
.cosmo-scanline {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.cosmo-sun,
.cosmo-planet {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: #06111f;
  font-weight: 900;
  cursor: crosshair;
}

.cosmo-sun {
  width: clamp(4.8rem, 10vw, 7.25rem);
  aspect-ratio: 1;
  z-index: 8;
  background:
    radial-gradient(circle at 34% 28%, #fff6c7, #ffd166 34%, #ff7a59 68%, #8d2036);
  box-shadow: 0 0 38px rgba(255, 209, 102, 0.86), 0 0 90px rgba(255, 111, 189, 0.34);
}

.cosmo-sun span {
  font-size: 1.15rem;
}

.cosmo-orbit {
  width: var(--orbit-size);
  aspect-ratio: 1;
  border: 1px solid rgba(119, 231, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(119, 231, 255, 0.08), inset 0 0 18px rgba(119, 231, 255, 0.05);
  animation: cosmo-orbit var(--orbit-speed) linear infinite;
  pointer-events: none;
}

.cosmo-orbit::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px dashed rgba(255, 255, 255, 0.11);
  pointer-events: none;
}

.cosmo-orbit--1 {
  --orbit-size: clamp(11rem, 24vw, 16rem);
  --orbit-speed: 18s;
}

.cosmo-orbit--2 {
  --orbit-size: clamp(15rem, 35vw, 24rem);
  --orbit-speed: 26s;
  animation-direction: reverse;
}

.cosmo-orbit--3 {
  --orbit-size: clamp(19rem, 46vw, 32rem);
  --orbit-speed: 34s;
}

.cosmo-orbit--4 {
  --orbit-size: clamp(23rem, 58vw, 40rem);
  --orbit-speed: 46s;
  animation-direction: reverse;
}

.cosmo-orbit--5 {
  --orbit-size: clamp(27rem, 68vw, 47rem);
  --orbit-speed: 58s;
}

.cosmo-planet {
  position: absolute;
  top: calc(var(--planet-size) / -2);
  left: 50%;
  width: var(--planet-size);
  aspect-ratio: 1;
  transform: translateX(-50%);
  animation: cosmo-counter var(--orbit-speed) linear infinite;
  box-shadow: 0 0 22px var(--planet-glow), 0 0 56px rgba(119, 231, 255, 0.12);
  pointer-events: auto;
}

.cosmo-planet::before {
  content: "";
  position: absolute;
  inset: -0.95rem;
  border-radius: inherit;
}

.cosmo-orbit:nth-of-type(even) .cosmo-planet {
  animation-direction: reverse;
}

.cosmo-planet--ocarnia {
  --planet-size: clamp(1.25rem, 3vw, 1.9rem);
  --planet-glow: rgba(119, 231, 255, 0.8);
  background: radial-gradient(circle at 30% 22%, #e9feff, #77e7ff 34%, #1246c7 100%);
}

.cosmo-planet--ekanra {
  --planet-size: clamp(1.15rem, 2.8vw, 1.75rem);
  --planet-glow: rgba(167, 139, 250, 0.78);
  background: radial-gradient(circle at 30% 22%, #f7f2ff, #a78bfa 38%, #38236e 100%);
}

.cosmo-planet--mathera {
  --planet-size: clamp(1.45rem, 3.3vw, 2.1rem);
  --planet-glow: rgba(125, 255, 191, 0.78);
  background: radial-gradient(circle at 30% 22%, #f0fff7, #7dffbf 38%, #116044 100%);
}

.cosmo-planet--finita {
  --planet-size: clamp(1.25rem, 3vw, 2rem);
  --planet-glow: rgba(255, 111, 189, 0.78);
  background: radial-gradient(circle at 30% 22%, #fff0fa, #ff6fbd 38%, #7d174c 100%);
}

.cosmo-planet--blue-egg {
  --planet-size: clamp(1rem, 2.4vw, 1.55rem);
  --planet-glow: rgba(98, 180, 255, 0.82);
  background: radial-gradient(circle at 30% 22%, #f5fbff, #62b4ff 38%, #102f83 100%);
}

.cosmo-sun:hover,
.cosmo-sun:focus-visible,
.cosmo-sun.is-selected,
.cosmo-planet:hover,
.cosmo-planet:focus-visible,
.cosmo-planet.is-selected {
  outline: 2px solid rgba(255, 209, 102, 0.86);
  outline-offset: 4px;
}

.cosmo-scanline {
  width: 120%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(125, 255, 191, 0.8), transparent);
  filter: drop-shadow(0 0 18px rgba(125, 255, 191, 0.8));
  animation: cosmo-scan 4.5s ease-in-out infinite;
  pointer-events: none;
}

.cosmo-terminal {
  max-width: 980px;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
}

.cosmo-terminal--ship {
  background-image:
    linear-gradient(135deg, rgba(9, 26, 53, 0.86), rgba(2, 8, 23, 0.84)),
    url("/images/cosmopedia/computer_ship.png");
  background-size: cover;
  background-position: center;
}

.cosmo-terminal h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.cosmo-terminal > p,
.cosmo-profile p,
.cosmo-log p {
  color: var(--cosmo-muted);
  line-height: 1.7;
}

.cosmo-profile {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid rgba(119, 231, 255, 0.2);
  border-radius: 8px;
  background: rgba(2, 8, 23, 0.4);
}

.cosmo-log {
  padding: 1rem 0 0;
  border-top: 1px solid rgba(119, 231, 255, 0.2);
}

.cosmo-log h3 {
  margin: 0 0 0.7rem;
  color: var(--cosmo-amber);
  font-size: 1.15rem;
  font-weight: 900;
}

.cosmo-log p + p {
  margin-top: 0.45rem;
}

.cosmo-back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cosmo-mint);
  font-size: 0.85rem;
}

.cosmo-back-link::before {
  content: "<";
}

.cosmo-user-list,
.cosmo-system-list {
  display: grid;
  gap: 0.7rem;
}

.cosmo-user-list a,
.cosmo-system-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(119, 231, 255, 0.22);
  border-radius: 8px;
  background: rgba(2, 8, 23, 0.42);
}

.cosmo-system-list a.is-quiet {
  opacity: 0.32;
}

.cosmo-system-list a:hover,
.cosmo-system-list a:focus-visible,
.cosmo-user-list a:hover,
.cosmo-user-list a:focus-visible {
  border-color: rgba(255, 209, 102, 0.7);
  background: rgba(255, 209, 102, 0.08);
}

.cosmo-faint {
  color: rgba(255, 255, 255, 0.16);
}

.cosmo-no-more {
  color: rgba(98, 180, 255, 0.36) !important;
}

.cosmo-status-green {
  color: var(--cosmo-mint);
}

.cosmo-status-blue {
  color: #62b4ff;
}

.cosmo-entry-image {
  width: min(100%, 760px);
  height: auto;
  border: 1px solid rgba(119, 231, 255, 0.22);
  border-radius: 8px;
}

.cosmo-hero--distress .cosmo-hero__content {
  max-width: 840px;
  background:
    linear-gradient(135deg, rgba(94, 12, 26, 0.86), rgba(2, 8, 23, 0.82)),
    url("/images/cosmopedia/help.png") center / cover;
}

.cosmo-hidden-line {
  opacity: 0;
  transition: opacity 220ms ease;
}

.cosmo-hero--distress:hover .cosmo-hidden-line,
.cosmo-hero--distress:focus-within .cosmo-hidden-line {
  opacity: 1;
}

.cosmo-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  min-height: 4.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem clamp(0.8rem, 3vw, 1.5rem);
  border-top: 1px solid rgba(119, 231, 255, 0.28);
  color: var(--cosmo-text);
  background: rgba(2, 8, 23, 0.9);
  box-shadow: 0 -16px 60px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
}

.cosmo-language {
  position: relative;
  z-index: 3;
}

.cosmo-language summary {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(119, 231, 255, 0.25);
  border-radius: 8px;
  color: var(--cosmo-text);
  cursor: pointer;
  list-style: none;
  background: rgba(255, 255, 255, 0.04);
}

.cosmo-language summary::-webkit-details-marker {
  display: none;
}

.cosmo-language summary span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: #06111f;
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cosmo-cyan), var(--cosmo-amber));
}

.cosmo-language div {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.7rem);
  z-index: 4;
  min-width: 12rem;
  display: grid;
  gap: 0.4rem;
  padding: 0.55rem;
  border: 1px solid rgba(119, 231, 255, 0.25);
  border-radius: 8px;
  background: rgba(2, 8, 23, 0.95);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
}

.cosmo-language a {
  padding: 0.65rem 0.7rem;
  border-radius: 6px;
  color: var(--cosmo-muted);
}

.cosmo-language a.is-active,
.cosmo-language a:hover,
.cosmo-language a:focus-visible {
  color: var(--cosmo-text);
  background: rgba(119, 231, 255, 0.12);
}

.cosmo-bottom__links {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translate(-50%, -50%);
}

.cosmo-bottom__links a {
  display: inline-flex;
  padding: 0.7rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--cosmo-muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cosmo-bottom__links a.is-active,
.cosmo-bottom__links a:hover,
.cosmo-bottom__links a:focus-visible {
  border-color: rgba(255, 209, 102, 0.55);
  color: var(--cosmo-text);
  background: rgba(255, 209, 102, 0.08);
}

.cosmo-bottom__toggle {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 1px solid rgba(119, 231, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.cosmo-bottom__toggle span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 3px auto;
  background: var(--cosmo-text);
  transition: transform 180ms ease, opacity 180ms ease;
}

.cosmo-bottom.is-open .cosmo-bottom__toggle span:first-child {
  transform: translateY(8px) rotate(45deg);
}

.cosmo-bottom.is-open .cosmo-bottom__toggle span:nth-child(2) {
  opacity: 0;
}

.cosmo-bottom.is-open .cosmo-bottom__toggle span:last-child {
  transform: translateY(-8px) rotate(-45deg);
}

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

@keyframes cosmo-counter {
  to {
    transform: translateX(-50%) rotate(-360deg);
  }
}

@keyframes cosmo-scan {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(18deg) translateY(-14rem);
    opacity: 0;
  }

  18%,
  70% {
    opacity: 1;
  }

  50% {
    transform: translate(-50%, -50%) rotate(18deg) translateY(14rem);
  }
}

@media (max-width: 980px) {
  .cosmo-hero,
  .cosmo-map-layout {
    grid-template-columns: 1fr;
  }

  .cosmo-map-panel {
    order: 2;
  }

  .cosmo-map-stage {
    order: 1;
  }
}

@media (max-width: 760px) {
  .cosmopedia-page {
    padding-top: 6.75rem;
    padding-bottom: 6.75rem;
  }

  .cosmo-hero {
    min-height: auto;
  }

  .cosmo-hero__content,
  .cosmo-terminal {
    padding: 1rem;
  }

  .cosmo-home-grid {
    grid-template-columns: 1fr;
  }

  .cosmo-map-stage {
    min-height: 28rem;
  }

  .cosmo-orbit--4,
  .cosmo-orbit--5 {
    opacity: 0.88;
  }

  .cosmo-bottom {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
  }

  .cosmo-language {
    min-width: 0;
  }

  .cosmo-language summary {
    max-width: 100%;
  }

  .cosmo-bottom__toggle {
    display: block;
  }

  .cosmo-bottom__links {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    top: auto;
    bottom: 5.15rem;
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid rgba(119, 231, 255, 0.25);
    border-radius: 8px;
    background: rgba(2, 8, 23, 0.96);
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
    transform: translateY(0.75rem);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 2;
  }

  .cosmo-bottom.is-open .cosmo-bottom__links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .cosmo-bottom__links a {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .cosmopedia-page {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .cosmo-map-stage {
    min-height: 24rem;
  }

  .cosmo-map-panel {
    padding: 0.85rem;
  }

  .cosmo-system-list a,
  .cosmo-user-list a {
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cosmo-orbit,
  .cosmo-planet,
  .cosmo-scanline {
    animation: none;
  }

  .cosmo-module {
    transition: none;
  }
}
