* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, #0b1026 0%, #05070f 55%, #020308 100%);
  font-family: "Varela Round", system-ui, sans-serif;
  color: #f5e9d0;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

/* Real-DOM link nav for keyboard and screen-reader users — visually hidden
   on every viewport; a focused link reveals itself. */
#fallback-links a {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  color: #ffbd59;
  font-size: 14px;
  text-decoration: none;
}

#fallback-links a:focus-visible {
  width: auto;
  height: auto;
  clip-path: none;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 6;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  outline: 2px solid #ffbd59;
}

/* Static fallback page: shown when WebGL is unavailable (body.no-webgl) or
   JavaScript is off (inside <noscript>). */
.static-page {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 6;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
  background: radial-gradient(120% 90% at 50% 30%, #0b1026 0%, #05070f 55%, #020308 100%);
}

body.no-webgl #scene,
body.no-webgl #fallback-links {
  display: none;
}

body.no-webgl #no-webgl {
  display: flex;
}

noscript .static-page {
  display: flex;
}

.static-page .card-wrap {
  position: relative;
}

.static-page .card-img {
  display: block;
  max-height: 82vh;
  max-width: 90vw;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.6));
}

/* Invisible hotspots aligned to the rows/tiles drawn in the card image. */
.static-page .card-wrap a {
  position: absolute;
  display: block;
  border-radius: 10px;
}

.static-page .card-wrap a:focus-visible {
  outline: 3px solid #ffbd59;
}

.static-page a {
  color: #ffbd59;
  text-decoration: none;
  font-size: 18px;
  margin: 0 10px;
}

.static-page a:hover {
  opacity: 0.7;
}
