@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f6f7ff;
  --muted: #a9b2cc;
  --deep: #050611;
  --panel: rgba(10, 13, 31, 0.88);
  --cyan: #65e6ff;
  --blue: #5887ff;
  --coral: #ff725e;
  --violet: #b073ff;
  --gold: #ffce68;
  --line: rgba(133, 213, 255, 0.22);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--deep);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  overflow-x: hidden;
}

body.explorer-running { overflow: hidden; }

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: -6rem;
  border-radius: 0.5rem;
  background: #fff;
  color: #111;
  padding: 0.75rem 1rem;
}
.skip-link:focus { top: 1rem; }

.experience {
  height: 100svh;
  min-height: 38rem;
  position: relative;
  overflow: hidden;
  background: #03040c;
}

.topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  min-height: calc(4.75rem + var(--safe-top));
  padding: calc(0.8rem + var(--safe-top)) calc(1.2rem + var(--safe-right)) 0.8rem calc(1.2rem + var(--safe-left));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(3, 4, 12, 0.92), rgba(3, 4, 12, 0));
  pointer-events: none;
}

.topbar > * { pointer-events: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand img { width: 4.8rem; height: auto; }
.brand strong { color: var(--cyan); }

.mission-progress {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 1rem;
  row-gap: 0.18rem;
  min-width: 18rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(7, 9, 23, 0.65);
  backdrop-filter: blur(14px);
}
.mission-label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
#progress-text { font-size: 0.7rem; justify-self: end; }
.progress-dots { grid-column: 1 / -1; display: flex; gap: 0.35rem; }
.progress-dots i {
  display: block;
  flex: 1;
  height: 0.18rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.13);
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.progress-dots i.is-active { background: var(--cyan); box-shadow: 0 0 0.6rem rgba(101, 230, 255, 0.7); }

.topbar-actions { justify-self: end; display: flex; align-items: center; gap: 0.55rem; }
.icon-button,
.exit-link {
  min-width: 2.6rem;
  min-height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: rgba(7, 9, 23, 0.7);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(14px);
}
.icon-button { display: grid; place-items: center; font-weight: 800; }
.icon-button:hover, .icon-button:focus-visible, .exit-link:hover, .exit-link:focus-visible { border-color: var(--cyan); outline: none; }
.sound-off { display: none; }
.is-muted .sound-on { display: none; }
.is-muted .sound-off { display: inline; }
.exit-link { display: grid; place-items: center; padding: 0 0.9rem; text-decoration: none; font-size: 0.7rem; }

.game-stage { height: 100%; position: relative; isolation: isolate; }
#game-container, #game-container canvas { width: 100%; height: 100%; display: block; }
#game-container canvas { touch-action: none; }

.loading-screen,
.start-screen {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}
.loading-screen {
  background: #050611;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-screen.is-ready { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-screen p { margin-top: 5.5rem; color: var(--muted); letter-spacing: 0.08em; font-size: 0.78rem; }
.loading-track { position: absolute; top: calc(50% + 4rem); width: min(16rem, 65vw); height: 0.2rem; background: #1c2032; overflow: hidden; }
.loading-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--violet), var(--cyan)); transition: width 0.2s linear; }
.loader-orbit { position: absolute; width: 4rem; height: 4rem; border: 1px solid rgba(101,230,255,.25); border-radius: 50%; animation: spin 2s linear infinite; }
.loader-orbit::before { content: ""; position: absolute; inset: .55rem; border: 1px solid rgba(176,115,255,.3); border-radius: 50%; }
.loader-orbit span { position: absolute; width: .65rem; height: .65rem; top: -.32rem; left: calc(50% - .32rem); background: var(--cyan); border-radius: 50%; box-shadow: 0 0 1rem var(--cyan); }

.start-screen {
  overflow: hidden;
  padding: 6rem 1.2rem 3rem;
  background:
    radial-gradient(ellipse at 74% 38%, rgba(64, 100, 214, 0.3), transparent 22%),
    radial-gradient(ellipse at 24% 68%, rgba(191, 61, 137, 0.18), transparent 28%),
    radial-gradient(ellipse at 50% 120%, rgba(43, 170, 196, 0.14), transparent 34%),
    linear-gradient(135deg, #02030b, #080a1d 55%, #050711);
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
}
.start-screen.is-hidden { opacity: 0; visibility: hidden; transform: scale(1.025); pointer-events: none; }
.start-stars, .start-stars::before, .start-stars::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.5px);
  background-size: 83px 83px;
  animation: drift 18s linear infinite;
  opacity: .45;
}
.start-stars::before { background-size: 131px 131px; transform: translate(17px, 31px); animation-duration: 28s; }
.start-stars::after { background-size: 199px 199px; transform: translate(51px, 80px); animation-duration: 40s; }

.start-card {
  position: relative;
  width: min(47rem, 100%);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(132, 215, 255, 0.23);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, rgba(8, 10, 28, .92), rgba(8, 10, 26, .68));
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, .5), inset 0 1px rgba(255,255,255,.05);
  backdrop-filter: blur(22px);
}
.start-card::before { content: ""; position: absolute; top: -1px; left: 3rem; width: 7rem; height: 1px; background: var(--cyan); box-shadow: 0 0 1rem var(--cyan); }
.eyebrow { margin: 0 0 .8rem; color: var(--cyan); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.start-card h1 { margin: 0; font: 600 clamp(2.5rem, 7vw, 5rem)/.94 "Space Grotesk", sans-serif; letter-spacing: -.055em; }
.start-card h1 span { color: transparent; background: linear-gradient(90deg, var(--cyan), #9aafff 52%, #ff9e89); background-clip: text; -webkit-background-clip: text; }
.start-lead { max-width: 37rem; margin: 1.5rem 0 2rem; color: #cbd2e7; line-height: 1.7; }
.start-actions { display: flex; align-items: center; gap: .75rem 1.3rem; flex-wrap: wrap; }
.start-actions .start-site-button { min-height: 3.3rem; padding-inline: 1.25rem; background: rgba(255,255,255,.045); }
.primary-button,
.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}
.primary-button {
  min-height: 3.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  border-radius: .75rem;
  padding: .8rem 1.2rem .8rem 1.4rem;
  background: linear-gradient(100deg, #5d74ff, #7965e9 50%, #d95e83);
  box-shadow: 0 .8rem 2.5rem rgba(99, 102, 241, .28);
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease;
}
.primary-button:hover, .primary-button:focus-visible { transform: translateY(-2px); box-shadow: 0 1rem 3rem rgba(99,102,241,.42); outline: 2px solid #fff; outline-offset: 3px; }
.primary-button i { font-style: normal; font-size: 1.3rem; }
.text-button { padding: .8rem; background: transparent; color: var(--muted); }
.text-button:hover, .text-button:focus-visible { color: var(--cyan); outline: none; text-decoration: underline; }
.controls-hint { margin: 2rem 0 0; color: #8e98b6; font-size: .72rem; }
kbd { border: 1px solid rgba(255,255,255,.24); border-bottom-width: 2px; border-radius: .3rem; padding: .12rem .35rem; background: rgba(255,255,255,.08); color: #fff; font: inherit; }
.touch-hint { display: none; }
.start-credit { position: absolute; bottom: calc(1.1rem + var(--safe-bottom)); color: rgba(255,255,255,.45); font-size: .65rem; text-align: center; }

.objective-card {
  position: absolute;
  z-index: 20;
  top: calc(6rem + var(--safe-top));
  left: calc(1.2rem + var(--safe-left));
  width: min(19rem, calc(100vw - 2.4rem));
  display: grid;
  gap: .18rem;
  border-left: 2px solid var(--cyan);
  padding: .7rem 1rem;
  background: linear-gradient(90deg, rgba(4,7,20,.85), transparent);
  text-shadow: 0 2px 10px #000;
  opacity: 0;
  transform: translateX(-1rem);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.experience.is-running .objective-card { opacity: 1; transform: none; }
.objective-kicker { color: var(--cyan); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; }
.objective-card strong { font: 600 1rem "Space Grotesk", sans-serif; }
.objective-card > span:last-child { color: var(--muted); font-size: .7rem; line-height: 1.4; }

.interaction-prompt {
  position: absolute;
  z-index: 22;
  left: 50%;
  bottom: calc(2rem + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: rgba(5,7,20,.85);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translate(-50%, 1rem);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  font-size: .76rem;
}
.interaction-prompt.is-visible { opacity: 1; transform: translate(-50%, 0); }
.interaction-key { min-width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: .4rem; background: rgba(255,255,255,.09); font-weight: 800; }

.touch-controls { display: none; }
.help-card {
  position: absolute;
  z-index: 32;
  right: calc(1.2rem + var(--safe-right));
  top: calc(5.2rem + var(--safe-top));
  width: min(22rem, calc(100vw - 2.4rem));
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(8, 11, 28, .96);
  box-shadow: 0 1.5rem 5rem rgba(0,0,0,.45);
}
.help-card h2 { margin: 0 2rem .8rem 0; font: 600 1.2rem "Space Grotesk", sans-serif; }
.help-card p { color: var(--muted); font-size: .76rem; line-height: 1.6; }
.close-mini { position: absolute; right: .7rem; top: .7rem; width: 2rem; height: 2rem; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.08); cursor: pointer; }

.toast {
  position: absolute;
  z-index: 34;
  top: calc(6rem + var(--safe-top));
  left: 50%;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: .75rem 1rem;
  border: 1px solid rgba(101,230,255,.35);
  border-radius: .7rem;
  background: rgba(7,11,27,.9);
  color: #dffaff;
  text-align: center;
  font-size: .76rem;
  opacity: 0;
  transform: translate(-50%, -1rem);
  transition: .3s ease;
  pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.target-card,
.flight-card {
  position: absolute;
  z-index: 20;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: linear-gradient(145deg, rgba(7, 10, 27, .88), rgba(7, 10, 24, .62));
  backdrop-filter: blur(14px);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .2);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}

.experience.is-running .target-card,
.experience.is-running .flight-card { opacity: 1; }

.target-card {
  top: calc(6rem + var(--safe-top));
  right: calc(1.2rem + var(--safe-right));
  width: min(20rem, calc(100vw - 2.4rem));
  padding: .9rem;
}

.target-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.target-heading > span:first-child { color: #fff; font: 700 .82rem/1.3 "Space Grotesk", sans-serif; letter-spacing: .04em; }
.target-heading > span:last-child { flex: 0 0 auto; color: var(--cyan); font-size: .52rem; letter-spacing: .12em; }
.target-row { display: flex; justify-content: space-between; gap: 1rem; padding: .32rem 0; border-top: 1px solid rgba(255,255,255,.06); color: var(--muted); font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.target-row strong { color: #eaf6ff; font-weight: 600; text-align: right; }
.scan-track { position: relative; height: 1.55rem; margin-top: .6rem; overflow: hidden; border: 1px solid rgba(101,230,255,.16); border-radius: .3rem; background: rgba(101,230,255,.04); opacity: 0; transition: opacity .2s ease; }
.scan-track.is-visible { opacity: 1; }
.scan-track span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(78,135,255,.4), rgba(101,230,255,.48)); transition: width .12s linear; }
.scan-track em { position: relative; z-index: 1; display: grid; place-items: center; height: 100%; color: #dcfbff; font-size: .52rem; font-style: normal; letter-spacing: .12em; }
.map-button { width: 100%; margin-top: .6rem; min-height: 2.25rem; border: 1px solid rgba(255,255,255,.1); border-radius: .45rem; background: rgba(255,255,255,.04); color: #cbd5e9; cursor: pointer; pointer-events: auto; font-size: .65rem; }
.map-button:hover, .map-button:focus-visible { border-color: var(--cyan); color: white; outline: none; }

.flight-card {
  left: calc(1.2rem + var(--safe-left));
  bottom: calc(1.2rem + var(--safe-bottom));
  width: 12rem;
  padding: .8rem;
}
.flight-card > div:first-child { display: flex; align-items: baseline; gap: .45rem; }
.flight-card > div strong { font: 600 2rem "Space Grotesk", sans-serif; }
.flight-card > div span { color: var(--muted); font-size: .62rem; }
.throttle-track { height: .22rem; margin: .45rem 0 .55rem; background: rgba(255,255,255,.1); }
.throttle-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); box-shadow: 0 0 .7rem rgba(101,230,255,.5); transition: width .12s linear; }
.flight-card p { display: flex; justify-content: space-between; margin: 0; color: var(--cyan); font-size: .53rem; letter-spacing: .12em; }

.flight-crosshair {
  position: absolute;
  z-index: 13;
  left: 50%;
  top: 50%;
  width: 1.6rem;
  height: 1.6rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(162,234,255,.28);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.experience.is-running .flight-crosshair { opacity: 1; }
.flight-crosshair::before, .flight-crosshair::after { content: ""; position: absolute; background: rgba(162,234,255,.52); }
.flight-crosshair::before { width: 2.6rem; height: 1px; left: -.55rem; top: 50%; }
.flight-crosshair::after { width: 1px; height: 2.6rem; top: -.55rem; left: 50%; }
.flight-crosshair i { position: absolute; width: .22rem; height: .22rem; left: calc(50% - .11rem); top: calc(50% - .11rem); border-radius: 50%; background: var(--cyan); box-shadow: 0 0 .6rem var(--cyan); }
.steer-indicator { position: absolute; z-index: 13; left: 50%; top: 50%; width: .5rem; height: .5rem; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; transform: translate(-50%,-50%); pointer-events: none; opacity: .55; }

.world-labels { position: absolute; z-index: 12; inset: 0; pointer-events: none; overflow: hidden; }
.world-label { position: absolute; left: 0; top: 0; min-width: 8rem; padding: .4rem .55rem; border: 0; border-left: 1px solid rgba(141,227,255,.52); background: linear-gradient(90deg, rgba(3,7,20,.78), transparent); color: white; text-align: left; pointer-events: auto; cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.world-label span { display: block; font: 600 .66rem "Space Grotesk", sans-serif; letter-spacing: .08em; }
.world-label em { display: block; margin-top: .12rem; color: #8e9bb9; font-size: .48rem; font-style: normal; letter-spacing: .08em; }
.world-label.is-target { border-left-width: 2px; border-color: var(--cyan); color: var(--cyan); }
.world-label.is-target::before { content: "ROTA"; position: absolute; right: 100%; top: 0; margin-right: .35rem; color: var(--cyan); font-size: .42rem; letter-spacing: .1em; }

.starmap {
  position: absolute;
  z-index: 38;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(5rem + var(--safe-top)) calc(1rem + var(--safe-right)) calc(1rem + var(--safe-bottom)) calc(1rem + var(--safe-left));
  background: rgba(1,2,8,.86);
  backdrop-filter: blur(12px);
}
.starmap[hidden] { display: none; }
.starmap-shell { width: min(72rem, 100%); max-height: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 1rem; padding: 1.2rem; background: rgba(7,10,27,.96); box-shadow: 0 2rem 7rem #000; }
.starmap-shell > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.starmap-shell h2 { margin: 0; font: 600 2rem "Space Grotesk", sans-serif; }
.starmap-shell > header button { width: 2.6rem; height: 2.6rem; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.06); color: white; font-size: 1.4rem; cursor: pointer; }
.starmap-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(18rem, .8fr); gap: 1rem; margin-top: 1rem; }
#map-canvas { display: block; width: 100%; height: min(55vh, 32rem); border: 1px solid rgba(255,255,255,.08); border-radius: .7rem; }
.map-list { display: grid; align-content: start; gap: .35rem; max-height: min(55vh, 32rem); overflow: auto; }
.map-list button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .65rem; min-height: 3.6rem; padding: .45rem .6rem; border: 1px solid rgba(255,255,255,.08); border-radius: .55rem; background: rgba(255,255,255,.025); color: white; text-align: left; cursor: pointer; }
.map-list button:hover, .map-list button:focus-visible, .map-list button.is-selected { border-color: var(--cyan); outline: none; background: rgba(101,230,255,.07); }
.map-list i { width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border: 1px solid var(--hub-color); border-radius: 50%; color: var(--hub-color); font-size: .55rem; font-style: normal; box-shadow: 0 0 .7rem color-mix(in srgb, var(--hub-color), transparent 60%); }
.map-list strong, .map-list em { display: block; }
.map-list strong { font: 600 .65rem "Space Grotesk", sans-serif; }
.map-list em { margin-top: .12rem; color: var(--muted); font-size: .48rem; font-style: normal; }
.map-list b { color: #7b87a5; font-size: .43rem; letter-spacing: .08em; }
.starmap-shell > p { margin: .8rem 0 0; color: var(--muted); font-size: .58rem; text-align: center; }

.hub-dialog-hero { display: grid; grid-template-columns: 8rem 1fr; align-items: center; gap: 1.2rem; padding: 1.2rem; border: 1px solid rgba(255,255,255,.08); border-radius: 1rem; background: radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--hub-a), transparent 62%), transparent 32%), linear-gradient(135deg, rgba(255,255,255,.04), transparent); }
.hub-dialog-hero p { margin: 0 0 .45rem; color: var(--hub-b); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.hub-dialog-hero strong { color: #d6dced; font-size: .9rem; line-height: 1.7; }
.hub-orb { width: 7rem; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 28%, white, var(--hub-b) 8%, var(--hub-a) 42%, #080b1d 78%); box-shadow: inset -1rem -1rem 1.8rem rgba(0,0,0,.5), 0 0 2.2rem color-mix(in srgb, var(--hub-a), transparent 30%); }
.hub-topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; margin-top: 1rem; }
.hub-topic-grid article { min-height: 6rem; padding: .75rem; border: 1px solid rgba(255,255,255,.08); border-radius: .65rem; background: rgba(255,255,255,.03); }
.hub-topic-grid span { display: block; margin-bottom: .7rem; color: var(--cyan); font-size: .55rem; }
.hub-topic-grid strong { font: 600 .78rem/1.4 "Space Grotesk", sans-serif; }

.hub-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: 1rem; }
.hub-path-card { position: relative; min-height: 7rem; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: .8rem; padding: 1rem; background: rgba(255,255,255,.03); color: white; text-align: left; text-decoration: none; cursor: pointer; }
.hub-path-card::after { content: "→"; position: absolute; right: 1rem; top: .9rem; color: var(--cyan); font-size: 1.3rem; }
.hub-path-card.is-game { background: radial-gradient(circle at 15% 120%, rgba(70,138,221,.3), transparent 55%), rgba(255,255,255,.025); }
.hub-path-card.is-site { background: radial-gradient(circle at 15% 120%, rgba(184,86,162,.25), transparent 55%), rgba(255,255,255,.025); }
.hub-path-card:hover, .hub-path-card:focus-visible { border-color: var(--cyan); outline: none; transform: translateY(-2px); }
.hub-path-card span { margin-bottom: .35rem; color: var(--cyan); font-size: .52rem; letter-spacing: .14em; }
.hub-path-card strong { font: 600 1rem "Space Grotesk", sans-serif; }
.hub-path-card em { margin-top: .25rem; color: var(--muted); font-size: .65rem; font-style: normal; }

.hub-source-heading { margin-top: 2rem; padding: 0 0 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.hub-source-heading p { margin: 0 0 .35rem; color: var(--cyan); font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; }
.hub-source-heading h3 { margin: 0; font: 600 clamp(1.35rem, 3vw, 2rem) "Space Grotesk", sans-serif; }
.hub-source-heading span { display: block; margin-top: .45rem; color: var(--muted); font-size: .72rem; }
.hub-source-target { min-height: 7rem; }
.hub-source-loading { min-height: 7rem; display: flex; align-items: center; justify-content: center; gap: .8rem; color: var(--muted); font-size: .72rem; }
.hub-source-loading i { width: 1.3rem; height: 1.3rem; border: 1px solid rgba(101,230,255,.22); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
.hub-source-error { margin-top: 1rem; padding: 1rem; border: 1px solid rgba(255,114,94,.3); border-radius: .7rem; background: rgba(255,114,94,.06); }
.hub-source-error p { color: var(--muted); font-size: .75rem; }
.hub-source-error a { color: var(--cyan); font-size: .75rem; }

.hub-site-content { margin-top: 1rem; color: #dce3f2; }
.hub-site-content .container { width: 100%; }
.hub-site-content .hub-source-intro { padding: 1rem; border: 1px solid rgba(255,255,255,.08); border-radius: .85rem; background: linear-gradient(135deg, rgba(35,65,91,.25), rgba(255,255,255,.02)); }
.hub-site-content .hero-inner { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(12rem, .55fr); align-items: center; gap: 1.2rem; }
.hub-site-content .hero-text .eyebrow { color: var(--cyan); }
.hub-site-content h1 { margin: 0 0 1rem; font: 600 clamp(1.4rem, 3.5vw, 2.3rem)/1.08 "Space Grotesk", sans-serif; letter-spacing: -.025em; }
.hub-site-content h2 { margin: 0; font: 600 1.35rem "Space Grotesk", sans-serif; }
.hub-site-content h3 { margin: 0 0 .45rem; font: 600 .9rem "Space Grotesk", sans-serif; }
.hub-site-content p, .hub-site-content li, .hub-site-content .tab-panel > div { color: #b7c0d5; font-size: .75rem; line-height: 1.65; }
.hub-site-content .hero-media img { display: block; width: 100%; max-height: 14rem; object-fit: contain; border-radius: .7rem; }
.hub-site-content a { color: #81e9ff; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.hub-site-content a:hover, .hub-site-content a:focus-visible { color: white; outline: none; }

.hub-source-disclosure { margin-top: .55rem; border: 1px solid rgba(255,255,255,.09); border-radius: .75rem; background: rgba(255,255,255,.018); }
.hub-source-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; color: #eff4ff; cursor: pointer; list-style: none; font: 600 .8rem "Space Grotesk", sans-serif; letter-spacing: .025em; }
.hub-source-disclosure > summary::-webkit-details-marker { display: none; }
.hub-source-disclosure > summary:hover, .hub-source-disclosure > summary:focus-visible { color: var(--cyan); outline: none; }
.hub-source-disclosure > summary i { color: var(--cyan); font-size: 1.15rem; font-style: normal; transition: transform .2s ease; }
.hub-source-disclosure[open] > summary i { transform: rotate(45deg); }
.hub-source-disclosure > section { padding: 0 1rem 1rem; }
.hub-source-disclosure > section > .container { padding-top: .35rem; border-top: 1px solid rgba(255,255,255,.07); }

.hub-site-content .grid, .hub-site-content .video-grid, .hub-site-content .principal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.hub-site-content .card, .hub-site-content .cocriacoes-card { width: auto; min-height: 0; display: block; padding: .85rem; border: 1px solid rgba(255,255,255,.08); border-radius: .65rem; background: rgba(255,255,255,.025); color: inherit; text-align: left; box-shadow: none; }
.hub-site-content .card img, .hub-site-content .principal img { width: 3.8rem; height: 3.8rem; float: left; margin: 0 .8rem .45rem 0; object-fit: cover; border: 1px solid rgba(101,230,255,.32); border-radius: 50%; }
.hub-site-content .card::after { content: ""; display: block; clear: both; }
.hub-site-content .video-embed { min-height: 8.5rem; }
.hub-video-link { min-height: 8.5rem; display: flex; flex-direction: column; justify-content: flex-end; gap: .7rem; padding: .9rem; border: 1px solid rgba(101,230,255,.15); border-radius: .7rem; background: radial-gradient(circle at 75% 25%, rgba(93,116,255,.38), transparent 30%), linear-gradient(145deg, #161b43, #0c1025 65%, #30162f); color: white !important; text-decoration: none; }
.hub-video-link i { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; font-style: normal; }
.hub-video-link span { font: 600 .72rem/1.4 "Space Grotesk", sans-serif; }

.hub-site-content .tabs-nav { display: flex; gap: .35rem; overflow-x: auto; padding: .65rem 0; scrollbar-width: thin; }
.hub-site-content .tab-button { min-width: 3.4rem; min-height: 2.1rem; border: 1px solid rgba(255,255,255,.1); border-radius: .4rem; background: rgba(255,255,255,.035); color: var(--muted); cursor: pointer; font-size: .62rem; }
.hub-site-content .tab-button:hover, .hub-site-content .tab-button:focus-visible, .hub-site-content .tab-button.is-active { border-color: var(--cyan); background: rgba(101,230,255,.09); color: white; outline: none; }
.hub-site-content .tab-panel { max-height: 22rem; overflow: auto; padding: .85rem; border: 1px solid rgba(255,255,255,.07); border-radius: .55rem; background: rgba(0,0,0,.12); overscroll-behavior: contain; }
.hub-site-content .tab-panel[hidden] { display: none; }
.hub-site-content .hub-banner, .hub-site-content .galaxy-card { display: grid; grid-template-columns: minmax(10rem, .55fr) minmax(0, 1.45fr); align-items: center; gap: 1rem; padding: 1rem; border: 1px solid rgba(255,255,255,.08); border-radius: .75rem; background: rgba(255,255,255,.025); }
.hub-site-content .hub-banner-media img, .hub-site-content .galaxy-media img { display: block; width: 100%; max-height: 13rem; object-fit: contain; border-radius: .6rem; }
.hub-site-content .hub-banner-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.hub-site-content .hub-banner-actions a { padding: .5rem .7rem; border: 1px solid rgba(101,230,255,.25); border-radius: .45rem; text-decoration: none; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(1, 2, 9, .82); backdrop-filter: blur(9px); }
.station-dialog {
  width: min(78rem, calc(100vw - 2rem));
  max-height: min(48rem, calc(100svh - 2rem));
  border: 1px solid rgba(116, 208, 255, .26);
  border-radius: 1.25rem;
  padding: 0;
  background: #0a0d1e;
  box-shadow: 0 2rem 8rem rgba(0,0,0,.72);
}
.station-dialog[open] { animation: dialog-in .35s ease both; }
.dialog-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: inherit; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.35rem 1.5rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.dialog-header h2 { margin: 0; font: 600 clamp(1.5rem, 4vw, 2.3rem) "Space Grotesk", sans-serif; letter-spacing: -.025em; }
.dialog-close { width: 2.7rem; height: 2.7rem; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.05); color: #fff; font-size: 1.4rem; cursor: pointer; }
.dialog-close:hover, .dialog-close:focus-visible { background: rgba(255,255,255,.13); outline: 2px solid var(--cyan); }
.dialog-content { overflow: auto; padding: 1.5rem; overscroll-behavior: contain; }
.dialog-content > p:first-child { max-width: 53rem; margin-top: 0; color: #c5cde3; line-height: 1.7; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-top: 1px solid rgba(255,255,255,.08); color: var(--muted); font-size: .72rem; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .65rem 1rem; border: 1px solid var(--line); border-radius: .65rem; background: rgba(255,255,255,.04); font-weight: 700; }
.secondary-button:hover, .secondary-button:focus-visible { border-color: var(--cyan); outline: none; }

.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.info-card { padding: 1rem; border: 1px solid rgba(255,255,255,.09); border-radius: .8rem; background: rgba(255,255,255,.035); }
.info-card h3 { margin: 0 0 .45rem; color: #e9edff; font: 600 1rem "Space Grotesk", sans-serif; }
.info-card p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.58; }
.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.video-card { position: relative; min-height: 12rem; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: .85rem; padding: 1rem; background: radial-gradient(circle at 70% 25%, rgba(100,147,255,.45), transparent 24%), linear-gradient(145deg, #171c45, #0b0e22 65%, #311731); color: white; text-align: left; cursor: pointer; }
.video-card::before { content: "▶"; position: absolute; top: 1rem; left: 1rem; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(0,0,0,.25); }
.video-card:hover, .video-card:focus-visible { border-color: var(--cyan); outline: none; transform: translateY(-2px); }
.video-card strong { position: relative; line-height: 1.35; }
.video-frame { aspect-ratio: 16/9; width: 100%; border: 0; border-radius: .85rem; background: #000; }
.video-back { margin: 0 0 .8rem; }
.publication-list { display: grid; gap: .65rem; padding: 0; list-style: none; }
.publication-list li { padding: .85rem 1rem; border-left: 2px solid var(--violet); background: rgba(255,255,255,.035); color: #c9d0e3; font-size: .78rem; line-height: 1.55; }
.publication-list strong { color: #fff; }
.people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.person-card { display: flex; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid rgba(255,255,255,.09); border-radius: .8rem; background: rgba(255,255,255,.035); }
.person-card img { width: 3.3rem; height: 3.3rem; flex: 0 0 auto; object-fit: cover; border-radius: 50%; border: 1px solid rgba(101,230,255,.4); }
.person-card strong { display: block; font: 600 .86rem "Space Grotesk", sans-serif; }
.person-card span { color: var(--muted); font-size: .68rem; }
.full-page-link { display: inline-flex; margin-top: 1.2rem; color: var(--cyan); font-size: .8rem; }

.completion-dialog { width: min(34rem, calc(100vw - 2rem)); border: 1px solid rgba(255,206,104,.38); border-radius: 1.2rem; padding: 0; background: radial-gradient(circle at 50% 0, rgba(98,94,209,.32), transparent 45%), #0b0e23; text-align: center; }
.completion-dialog[open] { animation: dialog-in .45s ease both; }
.completion-card { padding: 2.3rem; }
.completion-emblem { width: 5rem; height: 5rem; display: grid; place-items: center; margin: 0 auto 1.2rem; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold); font-size: 2.4rem; box-shadow: 0 0 2rem rgba(255,206,104,.2), inset 0 0 1.3rem rgba(255,206,104,.12); animation: emblem-pulse 2.4s ease-in-out infinite; }
.completion-card h2 { margin: 0; font: 600 2rem "Space Grotesk", sans-serif; }
.completion-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.completion-actions { display: flex; justify-content: center; gap: .7rem; flex-wrap: wrap; margin-top: 1.5rem; }

.accessible-content { background: #f2f3f8; color: #141727; padding: 5rem 1.2rem; }
.accessible-inner { width: min(70rem, 100%); margin: auto; }
.accessible-content .eyebrow { color: #4c4bc9; }
.accessible-content h2 { max-width: 50rem; margin: 0; font: 600 clamp(2rem, 5vw, 3.5rem)/1.05 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.accessible-content p { max-width: 48rem; color: #565d72; line-height: 1.7; }
.accessible-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 2rem; }
.accessible-grid button { min-height: 9rem; padding: 1rem; border: 1px solid #d6d8e3; border-radius: .8rem; background: #fff; color: #171a2c; text-align: left; cursor: pointer; }
.accessible-grid button:hover, .accessible-grid button:focus-visible { border-color: #4d59cf; outline: 2px solid #4d59cf; outline-offset: 2px; }
.accessible-grid strong { display: block; margin-bottom: .45rem; font: 600 1rem "Space Grotesk", sans-serif; }
.accessible-grid span { color: #656c80; font-size: .75rem; line-height: 1.5; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { transform: translate3d(-83px, 83px, 0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(1rem) scale(.98); } }
@keyframes emblem-pulse { 50% { transform: scale(1.06); box-shadow: 0 0 3rem rgba(255,206,104,.36), inset 0 0 1.5rem rgba(255,206,104,.18); } }

@media (max-width: 850px) {
  .topbar { grid-template-columns: 1fr auto; }
  .mission-progress { position: absolute; top: calc(4.7rem + var(--safe-top)); left: calc(1rem + var(--safe-left)); min-width: 0; width: calc(100% - 2rem - var(--safe-left) - var(--safe-right)); }
  .mission-label { display: none; }
  #progress-text { grid-column: 1 / -1; justify-self: start; }
  .objective-card { top: calc(8.4rem + var(--safe-top)); }
  .target-card { top: calc(8rem + var(--safe-top)); right: calc(.8rem + var(--safe-right)); width: 13.5rem; }
  .target-card .map-button { min-height: 2rem; }
  .objective-card { width: min(14rem, calc(100vw - 15rem)); }
  .exit-link { display: none; }
  .media-grid, .people-grid { grid-template-columns: repeat(2, 1fr); }
  .accessible-grid { grid-template-columns: repeat(2, 1fr); }
  .starmap-layout { grid-template-columns: 1fr; }
  #map-canvas { height: 38vh; }
  .map-list { grid-template-columns: repeat(2, 1fr); max-height: 28vh; }
}

@media (hover: none), (pointer: coarse) {
  .desktop-hint { display: none; }
  .touch-hint { display: inline; }
  .experience.is-running .touch-controls { display: block; }
  .touch-controls { position: absolute; z-index: 24; inset: auto 0 calc(.8rem + var(--safe-bottom)); pointer-events: none; }
  .touch-pad { position: absolute; left: calc(.8rem + var(--safe-left)); bottom: 0; width: 8.8rem; height: 8.8rem; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(4,6,18,.42); backdrop-filter: blur(8px); pointer-events: auto; }
  .touch-pad button { position: absolute; width: 2.7rem; height: 2.7rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: rgba(255,255,255,.75); touch-action: none; }
  .touch-pad button.is-pressed { background: rgba(101,230,255,.35); color: white; }
  .touch-pad [data-flight="up"] { top: .4rem; left: 3.05rem; }
  .touch-pad [data-flight="down"] { bottom: .4rem; left: 3.05rem; }
  .touch-pad [data-flight="left"] { left: .4rem; top: 3.05rem; }
  .touch-pad [data-flight="right"] { right: .4rem; top: 3.05rem; }
  .touch-flight-actions { position: absolute; right: calc(6.4rem + var(--safe-right)); bottom: .55rem; display: grid; grid-template-columns: repeat(3, 3.6rem); gap: .35rem; pointer-events: auto; }
  .touch-flight-actions button { min-height: 2.35rem; border: 1px solid rgba(255,255,255,.16); border-radius: .45rem; background: rgba(5,9,25,.65); color: #dfe9ff; font-size: .48rem; font-weight: 800; touch-action: none; }
  .touch-flight-actions button.is-pressed { border-color: var(--cyan); background: rgba(40,114,150,.65); }
  .action-button { position: absolute; right: calc(1rem + var(--safe-right)); bottom: 1rem; width: 5.8rem; height: 5.8rem; border: 1px solid rgba(101,230,255,.4); border-radius: 50%; background: rgba(25,71,105,.55); box-shadow: inset 0 0 1.8rem rgba(101,230,255,.15); color: white; font-size: .63rem; font-weight: 800; letter-spacing: .05em; pointer-events: auto; touch-action: none; }
  .action-button:active { transform: scale(.95); background: rgba(48,123,157,.7); }
  .interaction-prompt { bottom: calc(8.1rem + var(--safe-bottom)); }
  .interaction-key { display: none; }
}

@media (max-width: 620px) {
  .experience { min-height: 31rem; }
  .brand span { display: none; }
  .brand img { width: 4.25rem; }
  .topbar { padding-left: calc(.8rem + var(--safe-left)); padding-right: calc(.8rem + var(--safe-right)); }
  .start-screen { padding-top: 8rem; align-items: center; }
  .start-card { padding: 1.5rem; border-radius: 1.1rem; }
  .start-card h1 { font-size: clamp(2.35rem, 12vw, 3.3rem); }
  .start-lead { font-size: .84rem; margin: 1.2rem 0; }
  .controls-hint { margin-top: 1.2rem; }
  .start-credit { display: none; }
  .objective-card { top: calc(8rem + var(--safe-top)); }
  .objective-card { display: none; }
  .toast { top: calc(14.5rem + var(--safe-top)); }
  .target-card { top: calc(7.7rem + var(--safe-top)); left: calc(.8rem + var(--safe-left)); right: auto; width: calc(100% - 1.6rem - var(--safe-left) - var(--safe-right)); padding: .65rem .75rem; }
  .target-card .target-row:nth-of-type(3), .target-card .map-button { display: none; }
  .target-heading { margin-bottom: .35rem; }
  .target-row { padding: .2rem 0; }
  .flight-card { display: none; }
  .world-label { min-width: 6rem; }
  .world-label em { display: none; }
  .hub-dialog-hero { grid-template-columns: 4.5rem 1fr; gap: .8rem; padding: .85rem; }
  .hub-orb { width: 4.2rem; }
  .hub-dialog-hero strong { font-size: .75rem; }
  .hub-topic-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-paths, .hub-site-content .hero-inner, .hub-site-content .hub-banner, .hub-site-content .galaxy-card { grid-template-columns: 1fr; }
  .hub-site-content .grid, .hub-site-content .video-grid, .hub-site-content .principal { grid-template-columns: 1fr; }
  .hub-site-content .hero-media img { max-height: 10rem; }
  .map-list { grid-template-columns: 1fr; }
  .station-grid, .media-grid, .people-grid { grid-template-columns: 1fr; }
  .station-dialog { width: calc(100vw - 1rem); max-height: calc(100svh - 1rem); border-radius: 1rem; }
  .dialog-header, .dialog-content, .dialog-footer { padding-left: 1rem; padding-right: 1rem; }
  .dialog-footer { align-items: stretch; flex-direction: column; }
  .accessible-grid { grid-template-columns: 1fr; }
}

@media (max-height: 650px) and (orientation: landscape) {
  .topbar { min-height: calc(3.7rem + var(--safe-top)); padding-top: calc(.35rem + var(--safe-top)); padding-bottom: .35rem; }
  .mission-progress { padding-block: .35rem; }
  .objective-card { top: calc(4.2rem + var(--safe-top)); }
  .start-screen { padding: 4rem 1rem 1rem; }
  .start-card { padding: 1.25rem 1.5rem; width: min(52rem, 84vw); }
  .start-card h1 { font-size: 2.6rem; }
  .start-lead { margin: .7rem 0 1rem; font-size: .78rem; }
  .controls-hint { margin-top: .8rem; }
  .start-credit { display: none; }
  .touch-pad { width: 7rem; height: 7rem; }
  .touch-pad button { width: 2.2rem; height: 2.2rem; }
  .touch-pad [data-flight="up"] { left: 2.4rem; }
  .touch-pad [data-flight="down"] { left: 2.4rem; }
  .touch-pad [data-flight="left"] { top: 2.4rem; }
  .touch-pad [data-flight="right"] { top: 2.4rem; }
  .action-button { width: 4.8rem; height: 4.8rem; }
  .touch-flight-actions { right: calc(5.3rem + var(--safe-right)); grid-template-columns: repeat(3, 3rem); }
  .touch-flight-actions button { min-height: 2rem; font-size: .42rem; }
}

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