/* ===== MediaHub · iOS / PWA 增强 v2（2026-10-30） =====
   只在 iOS（WebKit）与「添加到主屏幕」模式下生效，不动安卓与桌面。 */

/* 长按不弹系统菜单、不选中文字 —— 更像原生 App */
@supports (-webkit-touch-callout: none) {
  body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
  input,
  textarea,
  select,
  [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
  }
}

/* 阻止 Safari 下拉刷新带动整页回弹 */
html {
  overscroll-behavior-y: contain;
}

/* iOS 上输入框字号 < 16px 时，聚焦会强制放大整页（松手也不还原）。必须钉死 16px。 */
input,
textarea,
select {
  font-size: 16px;
}

/* 点按不要灰色高亮块（原生 App 观感） */
a,
button,
.row,
.card {
  -webkit-tap-highlight-color: transparent;
}

/* 「添加到主屏幕」后是全屏窗口：状态栏会叠在页面顶部，Home 横条会压住底部。
   只在 standalone 下加安全区，Safari 标签页里保持原样（那边本来就有地址栏）。 */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* 横屏（看视频）时左右也要留安全区 */
@media (display-mode: standalone) and (orientation: landscape) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* ---------- 安装引导浮层（由 ios-install.js 注入） ---------- */
#mh-ios-tip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: #ffffff;
  color: #101828;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  padding: 18px 20px calc(18px + env(safe-area-inset-bottom)) 20px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.22);
  line-height: 1.7;
}

#mh-ios-tip h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

#mh-ios-tip ol {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 15px;
}

#mh-ios-tip li {
  margin-bottom: 4px;
}

#mh-ios-tip .mh-tip-sub {
  font-size: 13px;
  color: #667085;
  margin-bottom: 14px;
}

#mh-ios-tip button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #0071e3;
  color: #fff;
  font-size: 17px;
  padding: 12px 0;
  font-weight: 600;
}
