/* 浏览器兼容：主流 Chrome / Safari / Firefox / Edge / 微信内置浏览器 */

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@supports not (scroll-behavior: smooth) {
  html { scroll-behavior: auto; }
}

*,
*::before,
*::after {
  -webkit-tap-highlight-color: transparent;
}

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

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* iOS 输入框聚焦时不自动放大（需 ≥16px） */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

.table-wrap {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
}

.modal-backdrop,
.lock-overlay.is-locked > .lock-overlay-cta {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

@supports not (backdrop-filter: blur(4px)) {
  .modal-backdrop {
    background: rgba(15, 23, 42, 0.65);
  }
  .lock-overlay.is-locked > .lock-overlay-cta {
    background: rgba(238, 243, 248, 0.96);
  }
}

.btn,
.nav a {
  -webkit-user-select: none;
  user-select: none;
}

.btn:focus-visible,
.nav a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus:not(:focus-visible),
.nav a:focus:not(:focus-visible) {
  outline: none;
}

/* 减少动画（系统设置 + 旧设备） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
