/* 触控优先：同一份 HTML/URL，按输入能力（指针粗细）差异化，不按 UA 分站。 */

/* 1) 手机浏览器基础：避免 iOS 输入缩放、去点击高亮、文字自动调整 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
input, select, textarea { font-size: max(16px, 1em); }
a, button, [role="button"], summary { -webkit-tap-highlight-color: transparent; }

/* 2) 触屏（手机/平板）：把"hover 才有"的信息改成始终可见，并把 hover 位移去掉 */
@media (hover: none), (pointer: coarse) {
  a, button, [role="button"] { touch-action: manipulation; }
  * { scroll-behavior: auto; }
  /* hover 位移在触屏会造成"点完卡住" */
  .fmc-film-top:hover svg,
  .fmc-upcoming-film .fmc-upcoming-poster:hover .fmc-upcoming-chevron { transform: none !important; }
  /* 触控目标最小 44px */
  nav a, footer a, .fmc-foot-links a, .edition-languages summary { min-height: 44px; }
  /* 触屏按下反馈（替代 hover） */
  a:active, button:active, [role="button"]:active { opacity: .72; }
}

/* 3) iOS Safari 专属微调（能力探测，不分内容） */
@supports (-webkit-touch-callout: none) {
  /* 惯性滚动 */
  body { -webkit-overflow-scrolling: touch; }
  /* 底部安全区：玻璃导航条之上留出内容空间 */
  body { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* 4) 桌面：保留 hover 与键盘焦点环，不做触屏那套 */
@media (hover: hover) and (pointer: fine) {
  a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid var(--fm-action, #0071e3);
    outline-offset: 2px;
  }
}

/* 5) 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
/* 6) 补足剩余小目标：语言菜单项、捐赠触发器 */
@media (max-width: 640px), (pointer: coarse) {
  .site-header .edition-languages details > nav a { min-height: 44px !important; }
  .fmc-ticket-trigger { min-height: 44px; display: inline-flex; align-items: center; }
}

/* 7) 首页"近期放映"链接：补齐 44px 命中区 */
@media (max-width: 640px), (pointer: coarse) {
  .fmc-latest-issue { min-height: 44px; display: inline-flex; align-items: center; }
}
