/* ==========================================================================
   responsive.css
   The artwork is a fixed 4:3 (2048 × 1536) stage; main.js scales it to fit
   and the remaining space is letterboxed. Responsiveness therefore lives in
   the scale factor — these rules only tune the surroundings.
   ========================================================================== */

/* Respect notches / home indicators: main.js subtracts safe-area insets
   (read from these custom properties) before computing the scale. */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

/* Portrait screens: larger bars top/bottom — use a vertical glow */
@media (orientation: portrait) {
  .viewport {
    background: radial-gradient(ellipse 120% 60% at 50% 50%, #6e0014 0%, var(--letterbox) 75%);
  }
}

/* Touch devices: no grab cursor */
@media (hover: none) {
  .book { cursor: default; }
}

/* Very small screens (phones portrait): hint to rotate */
.rotate-hint {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(18px + var(--safe-bottom));
  margin: 0;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
@media (orientation: portrait) and (max-width: 600px) {
  .rotate-hint { opacity: 0.7; }
}
