:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  /* dark backdrop with soft coloured ambient light behind the card */
  background:
    radial-gradient(ellipse 45% 40% at 50% 35%, rgba(40, 130, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 45% 40% at 50% 68%, rgba(40, 210, 230, 0.2), transparent 70%),
    radial-gradient(ellipse 35% 50% at 20% 50%, rgba(30, 80, 200, 0.18), transparent 70%),
    radial-gradient(ellipse 35% 50% at 80% 50%, rgba(40, 200, 220, 0.14), transparent 70%),
    #050a18;
  overflow: hidden;
  overscroll-behavior: none;
  /* one-finger drags turn the card; two-finger pinch still zooms the page */
  touch-action: pinch-zoom;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#scene:active {
  cursor: grabbing;
}

/* Hidden until a keyboard user tabs into it, then shown as a panel. */
#card-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#card-text:focus-within {
  position: fixed;
  z-index: 5;
  top: 16px;
  left: 16px;
  right: 16px;
  width: auto;
  height: auto;
  max-height: calc(100% - 32px);
  overflow: auto;
  clip-path: none;
  white-space: normal;
  padding: 20px 24px;
  border-radius: 20px;
  background: rgba(4, 22, 56, 0.96);
  border: 1.5px solid rgba(140, 230, 255, 0.4);
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
}

#card-text h1,
#card-text h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

#card-text ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

#card-text a {
  color: #5fe6f5;
}

#card-text a:focus-visible {
  outline: 3px solid #5fe6f5;
  outline-offset: 2px;
}

#hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 28px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(95, 230, 245, 0.6);
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#hint.hidden {
  opacity: 0;
}
