/* Interaction polish only: retain the original visual design. */
html { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-height: 100svh; }
#app { min-height: 100svh; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
:where(button, a, input, select, textarea) { -webkit-tap-highlight-color: transparent; }
:where(button, a):focus-visible { outline: 3px solid #2164bd; outline-offset: 4px; }
:where(button, .btn)[disabled] { cursor: default; }
@media (pointer: coarse) {
  :is(.icon-btn, .small-btn, .language-switch button, .home .pill, .topbar button) { min-width: 44px; min-height: 44px; }
  .language-switch { gap: 6px; }
  .startlinks { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; }
  .startlinks a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 8px; }
  input, select, textarea { font-size: max(16px, 1em); }
  .overlay { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .overlay > :first-child { max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior-y: contain; }
  :is(.btn, .small-btn, .icon-btn, .island, .level, .mascot, .kid) { transition: transform 100ms ease-out, box-shadow 100ms ease-out; }
  .small-btn:not(:disabled):active, .language-switch button:active { transform: scale(.97); }
  /* Avoid sticky hover transforms after a touch. */
  .island:hover:not(:active), .level:hover:not(:active) { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .screen, .overlay, .islands > *, .levels > *, .mascots > * { animation: none !important; }
  :is(.btn, .small-btn, .icon-btn, .island, .level, .mascot, .kid) { transition: none !important; }
}
