/* VYUH mobile-web / PWA additions (owned by the PWA work; loaded last from <head>).
   Only additive rules: safe-area insets for notched phones with viewport-fit=cover, touch polish,
   dynamic-viewport height, and the iOS standalone status-bar strip that pwa.js inserts. */

/* Touch polish: no 300ms double-tap zoom delay, no grey tap flash, no pull-to-refresh/bounce mid-game. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { touch-action: manipulation; overscroll-behavior-y: none; }

/* Landscape notch / rounded corners: keep content out of the side insets. 0 on devices without them. */
@supports (padding: max(0px)) {
  #app {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}

/* 100vh on mobile Safari includes the hidden toolbar; dvh is the visible height. */
@supports (min-height: 100dvh) {
  #app { min-height: 100dvh; }
}

/* Installed (standalone) mode: the page runs under the status bar / notch. */
.pwa-standalone #app { padding-top: env(safe-area-inset-top, 0px); }
.pwa-statusbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2147482000;
  height: env(safe-area-inset-top, 0px);
  /* iOS "black-translucent" status bar always draws white text, so the strip stays dark in both themes. */
  background: var(--on-gold, #0a0a0b);
  pointer-events: none;
}
@media (display-mode: standalone) {
  /* Text selection on long-press feels broken in a game; inputs keep it. */
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
}
