/*
 * PWA rules of the owner (skill pwa-na-iphone), adapted to a 1:1 replica of a scrolling website:
 * the document keeps scrolling like the original; only installed mode fixes the iOS status-bar height bug.
 */
html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* No focus zoom on phones (iOS zooms inputs under 16 px). Desktop keeps the original input sizes. */
@media (pointer: coarse) { input, textarea, select { font-size: 16px !important; } }
@media (display-mode: standalone) {
  html { min-height: 100vh; min-height: 100lvh; background: hsl(240 18% 4%); overscroll-behavior-y: none; }
}
/* Portrait only: iOS ignores the manifest, so the root turns against the phone (side set by pwa-iphone.js). */
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  html[data-turn] #root { position: absolute; top: 0; left: 0; width: 100vh; height: 100vw; transform-origin: 0 0; }
  html[data-turn='left'] #root { transform: translateY(100vh) rotate(-90deg); }
  html[data-turn='right'] #root { transform: translateX(100vw) rotate(90deg); }
  html[data-turn] [data-pan-y] { touch-action: pan-x; }
}
