/* ============================================================
   iOS Web App 适配层
   只做一件事：把 Safari「添加到主屏幕」后运行的环境，补到和 App 一致。
   规范依据 Apple Human Interface Guidelines（iOS 17）：
   - 触控目标不小于 44×44pt
   - 按下必须有即时可见反馈（默认没有 :hover 的地方靠 :active 补）
   - 导航、按钮不长按弹系统菜单；聊天正文仍可长按选择复制
   - 全屏（standalone）时内容进安全区，不顶到刘海和底部横条
   - 内容区满幅滚动、不显示滚动条、不露橡皮筋白底
   不动任何业务样式，ios.css 仍负责外观。
   ============================================================ */

html, body { height: 100%; }
html { color-scheme: light; }
body {
  background: #F2F2F7;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

/* 触控反馈：HIG 要求「摸下去就有反应」，不等松手 */
button:active,
.tabbar button:active,
.tabbar a:active,
.tb-btn:active,
.wx-plus:active,
.fab:active,
.pill:active,
a:active {
  opacity: .58;
  transition: opacity .06s linear;
}
button, .tabbar, .topbar, .fab {
  -webkit-tap-highlight-color: transparent;
}

/* 图标与按钮不长按弹菜单；正文保持可选 */
button, .tabbar, .topbar, .fab, .wx-plus {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* 满幅滚动、不显示滚动条 */
*::-webkit-scrollbar { width: 0; height: 0; }

/* 全屏运行时：顶部让出状态栏，底部让出 Home 横条 */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
  .tabbar { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .sheet { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* 极窄屏（iPhone SE / mini）：标签栏字号收一档，不换行、不裁字 */
@media (max-width: 360px) {
  .tabbar { font-size: 10px; }
}


/* Safari 15 上 100dvh 在 iPad 旋转后可能算错，用 100% 兜底 */
.app{height:100%}
/* ============ 大屏适配（iPad / 桌面，2026-12） ============
   手机上内容钉在 720 宽，iPad 1024/1194 下左右各空一大片，
   看起来像"只加载了中间一条"。宽屏放宽到 920，横屏再出双列。 */
@media (min-width: 700px){
  .app main, main{max-width:920px !important;padding-left:20px !important;padding-right:20px !important}
  .home-title{font-size:38px !important}
  .home-lead{font-size:15px}
}
@media (min-width: 760px){
  section.home-near:not(.home-near-workers){display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px;align-items:start}
  section.home-near:not(.home-near-workers) > .home-near-head{grid-column:1 / -1}
  section.home-near:not(.home-near-workers) > .ticket-empty{grid-column:1 / -1}
  .home-job{width:100%}
}
