:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  /* near-black backdrop with soft red light behind the card */
  background:
    radial-gradient(ellipse 45% 40% at 50% 32%, rgba(230, 30, 60, 0.26), transparent 70%),
    radial-gradient(ellipse 45% 40% at 50% 70%, rgba(160, 10, 40, 0.22), transparent 70%),
    radial-gradient(ellipse 35% 50% at 18% 50%, rgba(120, 10, 30, 0.2), transparent 70%),
    radial-gradient(ellipse 35% 50% at 82% 50%, rgba(200, 30, 60, 0.14), transparent 70%),
    #0c0a12;
  overflow: hidden;
  overscroll-behavior: none;
  /* one-finger drags turn the card; two-finger pinch still zooms the page */
  touch-action: pinch-zoom;
  font-family: Montserrat, -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(14, 8, 12, 0.96);
  border: 1.5px solid rgba(255, 90, 110, 0.45);
  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: #ff7a8a;
}

#card-text a:focus-visible {
  outline: 3px solid #ff7a8a;
  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(240, 60, 80, 0.7);
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#hint.hidden {
  opacity: 0;
}
