body.uc-platform-mobile {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body.uc-platform-mobile {
  min-height: 100%;
  height: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@supports (-webkit-touch-callout: none) {
  html.uc-transitioning {
    overflow-y: auto !important;
  }
}

body.uc-platform-mobile #uc-slide-layer {
  touch-action: pan-y;
}

body.uc-platform-mobile button,
body.uc-platform-mobile [role="button"],
body.uc-platform-mobile .nav-tab,
body.uc-platform-mobile .uc-surface-btn,
body.uc-platform-mobile .uc-shell-dock-btn,
body.uc-platform-mobile .uc-shell-dock-launcher,
body.uc-platform-mobile a {
  touch-action: manipulation;
}

/*
 * iOS Safari zooms the whole page when a focused field is under 16px.
 * Force 16px on editable controls (not buttons — they don't trigger zoom).
 * Use !important + high specificity so page composers (13–15px !important) can't win.
 */
body.uc-platform-mobile input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
body.uc-platform-mobile select,
body.uc-platform-mobile textarea,
body.uc-platform-mobile [contenteditable="true"] {
  font-size: 16px !important;
}

body.uc-platform-mobile #page-chat-room input,
body.uc-platform-mobile #page-chat-room textarea,
body.uc-platform-mobile #page-chat-room .uc-chat-composer-input,
body.uc-platform-mobile #page-live-room input,
body.uc-platform-mobile #page-live-room textarea,
body.uc-platform-mobile .uc-surface-input,
body.uc-platform-mobile .uc-circles-input,
body.uc-platform-mobile .uc-browse-control,
body.uc-platform-mobile .uc-signup-auth-field input,
body.uc-platform-mobile .uc-signup-auth-field select,
body.uc-platform-mobile .uc-signup-auth-field textarea {
  font-size: 16px !important;
}

/* Fallback when platform class isn't applied yet (narrow phone browsers). */
@media (max-width: 1024px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
  select,
  textarea,
  [contenteditable="true"] {
    font-size: 16px !important;
  }
}

body.uc-platform-mobile .nav-tab,
body.uc-platform-mobile .uc-surface-btn,
body.uc-platform-mobile .uc-shell-dock-btn,
body.uc-platform-mobile .uc-shell-dock-launcher,
body.uc-platform-mobile .uc-gated-web-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.uc-platform-mobile .uc-primary-nav-row {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  gap: 10px;
  padding-bottom: 6px;
}

body.uc-platform-mobile .uc-primary-nav-row .nav-tab {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding-inline: 14px;
  /* Colour emoji must use system fonts — Roboto symbols.woff2 cannot draw them */
  font-family: "Roboto", system-ui, -apple-system, "Apple Color Emoji", "Segoe UI Emoji",
    "Noto Color Emoji", sans-serif;
  font-variant-emoji: emoji;
}

@supports (padding: max(0px)) {
  body.uc-platform-ios .uc-gated-web-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  body.uc-platform-ios .uc-gated-web-footer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  body.uc-platform-ios .uc-shell-dock,
  body.uc-platform-ios .uc-shell-dock-launcher {
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 1024px) {
  body.uc-platform-mobile .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  body.uc-platform-mobile main {
    gap: 14px;
  }

  body.uc-platform-mobile .main-card {
    border-radius: 12px;
  }
}
