/* Shared WebView-safe overrides for in-app H5 pages */
:root {
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html,
body {
  font-family: var(--font-ui) !important;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

/* Never leave content invisible if scroll/observer JS fails in WebView */
.reveal {
  opacity: 1 !important;
  -webkit-transform: none !important;
  transform: none !important;
  transition: none !important;
}

/* Gradient clipped text can disappear on some Android WebViews */
.about-slogan,
.hero-brand,
.legal-brand-name {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
}

.about-slogan,
.hero-brand {
  color: #ffffff !important;
}

.noise {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

a,
button {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
  touch-action: manipulation;
}

/* Long emails / URLs in narrow WebViews */
.support-card-value,
.complaint-format-sample,
.complaint-template-body,
.legal-content a,
.legal-support a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Prefer classic viewport units first; modern units only as enhancement */
.support-page,
.faq-page,
.complaint-page,
.cancel-page {
  min-height: 100vh;
}

/* Soften sticky/fixed chrome that can cover content under app bars */
.site-header {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Legal prose readability on small screens */
.legal-content {
  max-width: 100%;
  overflow-x: hidden;
}

.legal-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body[data-site-lang="zh"] {
  font-family:
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif !important;
}
