:root {
  --bg: #04070d;
  --bg-soft: #09121b;
  --panel: rgba(7, 12, 20, 0.54);
  --panel-strong: rgba(8, 14, 24, 0.82);
  --line: rgba(170, 226, 255, 0.18);
  --text: #edf8ff;
  --muted: rgba(212, 235, 247, 0.72);
  --cyan: #8ef2ff;
  --mint: #c4ffc8;
  --gold: #f4d886;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 10%, rgba(66, 115, 148, 0.16), transparent 20%),
    radial-gradient(circle at 80% 18%, rgba(95, 150, 103, 0.12), transparent 24%),
    linear-gradient(180deg, #08121c 0%, #04070d 100%);
}

body {
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

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

.hub-body {
  overflow-x: hidden;
}

.hub-shell {
  min-height: 100vh;
  padding: 3rem 1.25rem 3.5rem;
  width: min(1200px, 100%);
  margin: 0 auto;
}

.hub-header {
  max-width: 42rem;
  margin-bottom: 2rem;
}

.hub-header h1 {
  margin: 0.3rem 0 0.75rem;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hub-copy {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.6;
}

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

.world-card {
  position: relative;
  min-height: 17rem;
  padding: 1.25rem;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.world-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.2));
}

.world-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.08), rgba(6, 10, 18, 0.78));
}

.world-card:hover,
.world-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(142, 242, 255, 0.24);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  outline: none;
}

.world-card__eyebrow,
.eyebrow,
.hint,
.status-label,
.back-link {
  margin: 0;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.world-card__eyebrow {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
}

.world-card h2 {
  margin: 0.6rem 0 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 0.95;
}

.world-card__mood {
  margin: 0.55rem 0 0;
  color: #fff0c8;
  font-size: 0.98rem;
}

.world-card__copy {
  margin: 0.7rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  max-width: 30rem;
}

.world-card-lincoln {
  background:
    radial-gradient(circle at 70% 20%, rgba(170, 198, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #0c1523 0%, #132034 40%, #08111a 100%);
}

.world-card-erie {
  background:
    linear-gradient(180deg, rgba(220, 239, 255, 0.88) 0%, rgba(161, 208, 235, 0.82) 45%, rgba(211, 194, 161, 0.9) 100%),
    linear-gradient(180deg, #d9edff 0%, #89c4e8 48%, #dbc6a3 100%);
}

.world-card-erie h2,
.world-card-erie .world-card__copy,
.world-card-erie .world-card__eyebrow {
  color: #11364b;
}

.world-card-erie .world-card__mood {
  color: #295f76;
}

.world-card-krakow {
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.9) 0%, rgba(237, 222, 198, 0.9) 50%, rgba(176, 134, 106, 0.82) 100%);
}

.world-card-krakow h2,
.world-card-krakow .world-card__copy,
.world-card-krakow .world-card__eyebrow {
  color: #4d3425;
}

.world-card-krakow .world-card__mood {
  color: #7b4a2e;
}

.world-card-colorado {
  background:
    linear-gradient(180deg, rgba(203, 224, 247, 0.82) 0%, rgba(202, 184, 141, 0.78) 45%, rgba(126, 93, 67, 0.9) 100%);
}

.world-card-colorado h2,
.world-card-colorado .world-card__copy,
.world-card-colorado .world-card__eyebrow {
  color: #2a241a;
}

.world-card-colorado .world-card__mood {
  color: #70542d;
}

.experience-body {
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.experience-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 100%, rgba(110, 164, 120, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(7, 12, 20, 0.24), rgba(7, 12, 20, 0.48));
}

.experience-root::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 120%, rgba(255, 244, 195, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 20%, transparent 80%, rgba(255, 255, 255, 0.03));
  z-index: 2;
}

.overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  pointer-events: none;
}

.overlay-top {
  top: 0;
  align-items: flex-start;
}

.overlay-bottom {
  bottom: 0;
  align-items: flex-end;
}

.title-stack,
.caption-block,
.status-chip,
.noscript-card,
.control-button {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.title-stack,
.caption-block {
  max-width: min(36rem, calc(100vw - 8rem));
  padding: 0.9rem 1rem;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(7, 12, 20, 0.5), rgba(7, 12, 20, 0.18));
}

.title-stack h1 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.subline {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.eyebrow {
  color: var(--cyan);
  font-size: 0.7rem;
}

.back-link {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.65rem;
  pointer-events: auto;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
  outline: none;
}

.caption-block p {
  margin: 0;
}

#moodValue {
  color: var(--text);
  font-size: 0.98rem;
}

.hint {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.67rem;
}

.status-cluster,
.control-cluster {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.status-chip {
  min-width: 7rem;
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
  text-align: right;
  background: linear-gradient(180deg, rgba(10, 18, 29, 0.76), rgba(10, 18, 29, 0.36));
}

.status-chip strong {
  display: block;
  font-size: 1.05rem;
  color: var(--gold);
}

.status-chip-soft strong {
  color: var(--mint);
}

.status-label {
  color: var(--muted);
  font-size: 0.6rem;
}

.control-cluster {
  pointer-events: auto;
}

.control-button {
  appearance: none;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10, 18, 29, 0.78), rgba(10, 18, 29, 0.38));
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    color 120ms ease;
}

.control-button:hover,
.control-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(142, 242, 255, 0.36);
  outline: none;
}

.control-button.is-active {
  color: var(--mint);
  border-color: rgba(196, 255, 200, 0.34);
}

.control-button-ghost {
  color: var(--cyan);
}

.noscript-card {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  padding: 0.8rem 1rem;
  border-radius: 1rem;
  background: var(--panel-strong);
  color: var(--text);
  z-index: 5;
}

@media (max-width: 860px) {
  .world-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hub-shell {
    padding-top: 2rem;
  }

  .overlay {
    padding: 0.75rem;
  }

  .overlay-top,
  .overlay-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .title-stack,
  .caption-block {
    max-width: none;
  }

  .status-cluster,
  .control-cluster {
    flex-wrap: wrap;
  }

  .status-chip,
  .control-button {
    width: fit-content;
    min-width: 0;
  }
}
