/* 小工具箱之家 · 全站手机适配 v1 — 2026-11-10 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }

/* —— 顶栏 / 页脚 —— */
@media (max-width: 991.98px) {
  header.o_header_standard {
    background-color: rgba(255,255,255,.98) !important;
    box-shadow: 0 1px 10px rgba(15,42,90,.08) !important;
  }
  header.o_header_standard nav.navbar {
    background-color: transparent !important;
    padding-top: .35rem !important;
    padding-bottom: .35rem !important;
  }
  header.o_header_standard .hm-header-cta { display: none !important; }
  header.o_header_standard .hm-brand-name {
    font-size: 1rem !important;
    max-width: min(46vw, 9.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
  }
  header.o_header_standard .hm-brand-group .navbar-brand.logo img,
  header.o_header_standard .hm-brand-group .navbar-brand.logo {
    max-height: 36px !important;
  }
  header.o_header_standard .navbar-toggler {
    min-width: 44px;
    min-height: 44px;
    padding: .45rem .6rem !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
  }
  header.o_header_standard #top_menu_collapse {
    position: static !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    margin-top: .5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: .5rem;
    box-shadow: 0 10px 28px rgba(15,23,42,.08);
  }
  header.o_header_standard #top_menu_collapse .nav-link {
    color: #0d346e !important;
    padding: .7rem .9rem !important;
    border-radius: 8px;
    font-weight: 600;
  }
  header.o_header_standard #top_menu_collapse .nav-link:hover,
  header.o_header_standard #top_menu_collapse .nav-link.active {
    background: #eff6ff !important;
  }
  #footer .container, .o_footer_copyright .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  #footer .o_grid_item, #footer [class*="g-col"] {
    grid-area: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .o_footer_copyright .row > [class*="col"] {
    text-align: center !important;
    margin-bottom: .35rem;
  }
}

/* —— 首页 —— */
.xgj-home { overflow-x: clip; }
.xgj-home .xgj-search-box input { font-size: 16px !important; }
.xgj-home .xgj-catbar a {
  min-height: 40px;
  padding: 8px 14px !important;
  -webkit-tap-highlight-color: transparent;
}
.xgj-home .xgj-card {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.xgj-home .xgj-apk-link { min-height: 40px; padding: 8px 12px !important; }
@media (max-width: 900px) {
  .xgj-home .xgj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .xgj-home .xgj-why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .xgj-home .xgj-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .xgj-home .xgj-wrap { padding-left: 14px !important; padding-right: 14px !important; }
  .xgj-home .xgj-card { min-height: 0; padding: 14px 12px 12px !important; }
  .xgj-home .xgj-card-name { font-size: 15px !important; }
  .xgj-home .xgj-card-desc { font-size: 12px !important; }
  .xgj-home .xgj-new-strip { padding: 12px !important; }
  .xgj-home .xgj-new-links a { min-height: 34px; display: inline-flex; align-items: center; }
}
@media (max-width: 420px) {
  .xgj-home .xgj-grid { grid-template-columns: 1fr !important; }
  .xgj-home .xgj-hero { padding: 24px 0 20px !important; }
  .xgj-home .xgj-hero h1 { font-size: 26px !important; }
  .xgj-home .xgj-catbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px !important;
    padding-bottom: 4px;
    margin-right: -14px;
    padding-right: 14px;
    scrollbar-width: none;
  }
  .xgj-home .xgj-catbar::-webkit-scrollbar { display: none; }
  .xgj-home .xgj-catbar a { flex: 0 0 auto; white-space: nowrap; }
}

/* —— 工具嵌入通用：输入 ≥16px，防 iOS 缩放；触控热区 —— */
@media (max-width: 768px) {
  .xgj-more,
  .xgj-devtools,
  .xgj-life,
  .xgj-games,
  .hm-pdf-tools,
  .xgj-prod,
  .hm-page,
  .xgj-loan,
  .xgj-evidence,
  .xgj-cow,
  .xgj-nvr {
    margin-left: 8px !important;
    margin-right: 8px !important;
    max-width: calc(100% - 16px) !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
  }
  .xgj-more input,
  .xgj-more textarea,
  .xgj-more select,
  .xgj-devtools input,
  .xgj-devtools textarea,
  .xgj-devtools select,
  .xgj-life input,
  .xgj-life textarea,
  .xgj-life select,
  .xgj-games input,
  .xgj-games textarea,
  .xgj-games select,
  .hm-pdf-tools input,
  .hm-pdf-tools textarea,
  .hm-pdf-tools select,
  .xgj-chat-profile input,
  .xgj-chat-composer textarea {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
  .xgj-more .xgj-btn,
  .xgj-devtools .xgj-btn,
  .xgj-life .xgj-btn,
  .xgj-games .xgj-btn,
  .hm-pdf-tools button,
  .hm-pdf-tools .hm-tab,
  .hm-pdf-tools .tab,
  .xgj-chat-composer button,
  .hm-page .p-btn {
    min-height: 44px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    touch-action: manipulation;
  }
  .xgj-more .xgj-nav a,
  .xgj-devtools .xgj-nav a,
  .xgj-life .xgj-nav a,
  .xgj-games .xgj-nav a,
  .xgj-more .xgj-chip,
  .xgj-devtools .xgj-chip {
    min-height: 40px;
    display: inline-flex !important;
    align-items: center;
    padding: 8px 12px !important;
  }
  .xgj-more .xgj-grid,
  .xgj-devtools .xgj-grid,
  .xgj-life .xgj-grid,
  .xgj-games .xgj-grid,
  .xgj-prod .xgj-grid {
    grid-template-columns: 1fr !important;
  }
  .xgj-more .xgj-row,
  .xgj-more .xgj-row-3,
  .xgj-devtools .xgj-row,
  .xgj-devtools .xgj-row-3,
  .xgj-life .xgj-row,
  .xgj-life .xgj-row-3 {
    grid-template-columns: 1fr !important;
  }
  .xgj-more .xgj-tbl-wrap,
  .xgj-life .xgj-tbl-wrap,
  .hm-pdf-tools .table-wrap,
  .hm-pdf-tools table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .xgj-more table.xgj-tbl,
  .xgj-life table {
    display: table;
  }
  /* 工具内导航：自动换行 + 更大触控 */
  .xgj-more .xgj-nav,
  .xgj-devtools .xgj-nav,
  .xgj-life .xgj-nav {
    overflow-x: visible;
  }
  .xgj-more .xgj-nav-group {
    flex-wrap: wrap !important;
  }
  .xgj-more .xgj-nav-group a {
    white-space: nowrap;
  }
  .hm-page .p-hero { padding: 48px 0 40px !important; }
  .hm-page .p-hero h1 { font-size: 26px !important; }
  .hm-page .p-sec { padding: 36px 0 !important; }
  .hm-page .p-wrap, .hm-page .p-inner { padding-left: 16px !important; padding-right: 16px !important; }
  .hm-page .c-info { padding: 22px 18px !important; }
  .hm-page .contact-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  .xgj-chat-shell, .xgj-chat { min-height: 420px !important; }
  .xgj-chat-profile { grid-template-columns: 1fr !important; }
  .xgj-chat-composer { grid-template-columns: 1fr !important; }
  .xgj-chat-composer button { width: 100%; min-height: 48px !important; }
  .xgj-prod .xgj-wrap { padding: 24px 14px 40px !important; }
  .s_embed_code.pt48 { padding-top: 24px !important; }
  .s_embed_code.pb64 { padding-bottom: 32px !important; }
  .container { max-width: 100% !important; }
}

/* 触控：去掉桌面 hover 位移造成的跳动感 */
@media (hover: none) {
  .xgj-home .xgj-card.is-live:hover,
  .xgj-prod .xgj-card:hover {
    transform: none;
  }
}
