/* ============================================================
   门户选择页 · 真机移动端适配 (<=768px)
   加载顺序：必须排在 portal.html 内联 <style> 之后
   解决：overflow:hidden 导致手机上只能看到第一张卡、
        中英标题被从词中间折断、卡片过大撑爆首屏、
        底部被浏览器工具栏遮挡、皮肤悬浮球压住内容
   ============================================================ */
@media (max-width: 768px) {
  html { overflow-x: hidden; }
  body {
    display: block !important;
    align-items: normal !important;
    justify-content: normal !important;
    overflow: visible !important;          /* 解除内联 overflow:hidden，恢复整页滚动 */
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0 0 calc(92px + env(safe-area-inset-bottom)); /* 避开底部浏览器工具栏 */
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
  }
  .portal {
    position: relative; z-index: 1;
    width: 100% !important;
    padding: calc(18px + env(safe-area-inset-top)) 14px 0;
    text-align: center;
  }

  /* 状态条：折成均衡两行，保留演示环境说明，不再挤成一坨长文 */
  .sys-line {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    font-size: 10px !important;
    letter-spacing: .4px !important;
    padding: 6px 14px !important;
    gap: 3px 7px !important;
    line-height: 1.5;
  }
  .sys-line .sys-extra {
    flex: 0 0 100%;
    font-size: 9px;
    opacity: .72;
    letter-spacing: .2px;
  }

  .logo { margin: 16px 0 10px !important; }
  .logo img { width: 66px !important; height: 66px !important; }

  /* 标题：英文一行 + 中文整行，不再把「直销」从中间拆开 */
  .title {
    font-size: 25px !important;
    letter-spacing: 2px !important;
    line-height: 1.3;
    text-shadow: 0 0 18px rgba(var(--c1-rgb), .45);
  }
  .title span {
    display: block;
    margin-top: 4px;
    font-size: 22px;
    letter-spacing: 2px;
    white-space: nowrap;
    line-height: 1.35;
  }
  .subtitle {
    font-size: 10px !important;
    letter-spacing: 1px !important;
    line-height: 1.7;
    margin: 8px auto 0;
    max-width: 310px;
    text-wrap: balance;
  }

  /* 卡片：单列可滚、紧凑，并把公众号版提到首位 */
  .cards {
    display: flex !important;
    flex-direction: column;
    gap: 11px !important;
    margin-top: 22px !important;
  }
  .entry.wx { order: -1; border-color: rgba(var(--c3-rgb), .5) !important; }
  .entry {
    padding: 16px 15px !important;
    border-radius: 14px !important;
  }
  .entry:hover { transform: none; }
  .entry-icon { font-size: 26px !important; line-height: 1.2; }
  .entry h2 { font-size: 17px !important; margin: 7px 0 5px !important; }
  .entry p { font-size: 12px !important; line-height: 1.6 !important; }
  .entry p br { display: none; }

  /* 标签改单行横滑：管理后台 11 个标签不再撑出 4 行高度 */
  .entry-tags {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 6px !important;
    margin-top: 11px !important;
    padding-bottom: 3px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .entry-tags::-webkit-scrollbar { display: none; }
  .entry-tags span {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 10px !important;
    padding: 3px 9px !important;
  }
  .entry-go { margin-top: 12px !important; font-size: 12px !important; }

  .metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 26px !important;
    gap: 16px 12px !important;
  }
  .metrics b { font-size: 19px !important; }
  .metrics span { font-size: 9px !important; letter-spacing: .5px !important; }
  .footer {
    margin-top: 22px !important;
    font-size: 9px !important;
    line-height: 1.7;
    padding: 0 6px;
  }

  /* 悬浮球会压住卡片底部按钮；换肤入口在 index/wechat 右上 ⋯ 面板内 */
  .skin-fab { display: none !important; }
  .skin-panel { max-width: 92vw; }
}
