* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: #03040c;
  color: #f4f1ea;
  font-family: "Palatino Linotype", Palatino, Georgia, serif;
}

body {
  display: flex;
  min-height: 100%;
  overflow: hidden;
}

.stage {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.5) 100%);
}

#sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #03040c;
}

.hud {
  position: absolute;
  top: 1.25rem;
  left: 1.4rem;
  z-index: 2;
  max-width: 18rem;
  padding: 0.95rem 1.15rem 1rem;
  border-radius: 18px;
  background: rgba(8, 12, 28, 0.42);
  border: 1px solid rgba(255, 244, 220, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.eyebrow {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f0c987;
}

h1 {
  margin-top: 0.2rem;
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hud p:last-child {
  margin-top: 0.25rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.86rem;
  color: #c9c4d8;
}

.sidebar {
  flex: none;
  width: 9.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 1rem;
  border-left: 1px solid rgba(255, 244, 220, 0.12);
  background: rgba(8, 12, 28, 0.72);
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  overflow: auto;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: #d9d4e6;
}

.legend button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0;
  padding: 0.38rem 0.45rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

.legend button:hover {
  background: rgba(255, 244, 220, 0.06);
}

.legend button.is-selected {
  color: #fff8ea;
  background: rgba(240, 201, 135, 0.16);
  box-shadow: inset 0 0 0 1px rgba(240, 201, 135, 0.45);
}

.legend button:focus-visible,
.info button:focus-visible {
  outline: 2px solid #f0c987;
  outline-offset: 2px;
}

.legend span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
  flex: none;
}

.info {
  position: absolute;
  left: 1.4rem;
  bottom: 1.25rem;
  z-index: 2;
  width: min(22rem, calc(100% - 2.8rem));
  max-height: calc(100% - 8.5rem);
  overflow: auto;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 18px;
  background: rgba(8, 12, 28, 0.72);
  border: 1px solid rgba(255, 244, 220, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.info.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.info h2 {
  margin-top: 0.15rem;
  font-size: 1.7rem;
  font-weight: 500;
}

#info-desc {
  margin-top: 0.45rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #d9d4e6;
}

.info dl {
  margin: 0.95rem 0 1rem;
}

.info dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(255, 244, 220, 0.12);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
}

.info dt {
  color: #c9c4d8;
}

.info dd {
  margin: 0;
  text-align: right;
}

.info button {
  border: 0;
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
  background: #f0c987;
  color: #1b140c;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.info button:hover {
  background: #f6d7a8;
}

@media (max-width: 720px) {
  .hud {
    top: 0.75rem;
    left: 0.75rem;
    max-width: calc(100% - 1.5rem);
    padding: 0.75rem 0.85rem;
  }

  h1 {
    font-size: 1.35rem;
  }

  .sidebar {
    width: 6.5rem;
    padding: 0.85rem 0.65rem;
    gap: 0.75rem;
  }

  .legend {
    gap: 0.55rem;
    font-size: 0.68rem;
  }

  .info {
    left: 0.75rem;
    bottom: 0.75rem;
    width: calc(100% - 1.5rem);
    max-height: 42vh;
  }

  .info h2 {
    font-size: 1.35rem;
  }
}
