/* Mobile helpers — scoped so they do not fight main.css / game layouts.
   (Previous version fixed `html` and forced 44px buttons site-wide, which broke iOS Safari.) */

/* Auth: stack + readable inputs (iOS 16px avoids focus-zoom) */
@media (max-width: 767px) {
  #auth-screen.active {
    flex-direction: column;
    justify-content: flex-start;
  }

  .auth-canvas {
    opacity: 0.3;
  }

  .auth-wrap {
    flex-direction: column;
    height: auto;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
  }

  .auth-left {
    padding: 1.5rem 1.25rem;
    background: transparent;
    order: 2;
  }

  .auth-h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0.75rem;
  }

  .auth-brand {
    margin-bottom: 1.25rem;
  }

  .auth-tagline {
    font-size: 0.875rem;
    max-width: 100%;
    margin-bottom: 1.25rem;
  }

  .auth-stats {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .astat-div {
    display: none;
  }

  .auth-right {
    width: 100%;
    flex-shrink: 1;
    padding: 1.25rem max(1.25rem, env(safe-area-inset-right))
      max(1rem, env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
    background: rgba(0, 0, 0, 0.3);
    border-left: none;
    border-top: 1px solid var(--border);
    order: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
  }

  .auth-card {
    width: 100%;
    max-width: 100%;
    padding: 1.25rem;
    border-radius: var(--radius-2xl);
    max-height: min(560px, 85dvh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #auth-screen .ds-input,
  #auth-screen .auth-form input,
  #auth-screen .auth-form select,
  #auth-screen .auth-form textarea {
    min-height: 44px;
    padding: 12px 14px;
    font-size: 16px;
  }

  #auth-screen .atab,
  #auth-screen .abtn,
  #auth-screen .abtn-outline {
    min-height: 44px;
    font-size: 1rem;
  }

  .auth-form label {
    font-size: 0.875rem;
  }
}

/* Coarse pointers: calm tap flash (does not resize controls) */
@media (hover: none) and (pointer: coarse) {
  .main-content,
  .game-shell,
  .slots-viewport {
    -webkit-tap-highlight-color: transparent;
  }
}
