:root {
  --bg: #05070f;
  --ink: #e4ecf5;
  --ink-dim: #7e8fa8;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  overflow-x: hidden;
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px 12px;
}

header {
  text-align: center;
  margin-bottom: 4px;
}

h1 {
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  margin: 0;
  text-shadow: 0 0 24px rgba(124, 214, 255, 0.35);
}

/* --- the 3D globe --- */

.stage {
  width: clamp(320px, 88vmin, 1100px);
  height: clamp(320px, 88vmin, 1100px);
  margin: 8px auto;
  touch-action: none;
  cursor: grab;
}

.stage:active {
  cursor: grabbing;
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- accessible fallback / app list (visually hidden, screen-reader + keyboard only) --- */

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

.applist a:focus-visible {
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--bg);
  color: var(--ink);
  padding: 8px 12px;
  border: 1px solid var(--ink-dim);
  border-radius: 4px;
  z-index: 20;
}

/* --- warp transition overlay --- */

#warp {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: radial-gradient(circle at var(--wx, 50%) var(--wy, 50%), #fff 0%, #000 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#warp.active {
  opacity: 1;
}
