/* Mothlight page shell. Owner: gameplay-1. The canvas fills the window and render.js letterboxes inside it. */
:root {
  --night: #0B1026;
  --text: rgba(230, 236, 255, 0.85);
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--text);
  font-family: ui-rounded, system-ui, sans-serif;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;          /* the whole screen is the touch target; no scroll/zoom */
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: none;                /* the lantern is the cursor */
}

.notice {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 24px;
  text-align: center;
  line-height: 1.6;
  background: var(--night);
}

.notice[hidden] {
  display: none;
}

.notice code {
  color: #FFB547;
}

/* JAM-17: title-screen-only hint to rotate a narrow phone to landscape.
   Visibility is driven by main.js (game state + matchMedia); CSS just styles it. */
.rotate-hint {
  position: fixed;
  left: 50%;
  bottom: max(24px, 9dvh);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;    /* the whole screen stays the hold-to-glow target */
  color: var(--text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(14px, 4vw, 18px);
  text-align: center;
  text-shadow: 0 0 12px rgba(11, 16, 38, 0.6);
}

.rotate-hint[hidden] {
  display: none;
}

.rotate-hint p {
  margin: 0;
}

.rotate-hint__icon {
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(230, 236, 255, 0.6);
  border-radius: 5px;
  animation: rotate-hint-spin 2.4s ease-in-out infinite;
}

@keyframes rotate-hint-spin {
  0%, 15% { transform: rotate(0deg); }
  50%, 65% { transform: rotate(90deg); }
  100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .rotate-hint__icon {
    animation: none;
  }
}
