:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --fg: #f3f3f3;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

main {
  height: 100vh;
  width: 100vw;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

#display {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

/* Instruction overlay — fades on first interaction. */
.instruction {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: clamp(13px, 2vw, 20px);
  color: rgba(245, 245, 245, 0.92);
  background: rgba(15, 15, 15, 0.62);
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  pointer-events: none;
  z-index: 100;
  letter-spacing: 0.07em;
  font-style: italic;
  font-weight: 500;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: instruction-pulse 2.4s ease-in-out infinite;
  transition: opacity 150ms ease, transform 150ms ease;
}

.instruction.fade-out {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
}

@keyframes instruction-pulse {
  0%, 100% { opacity: 0.95; }
  50%      { opacity: 0.55; }
}
