/* 移动端适配（2026-11-04）：顶部栏、导航、lab 布局、任务舞台、弹窗、表格 */
@media (max-width: 768px) {
  /* 顶部栏 */
  .title-bar { padding: 10px 12px; gap: 10px; flex-wrap: wrap; min-height: auto; }
  .title-bar .brand { font-size: 15px; gap: 8px; min-width: 0; }
  .title-bar .brand-mark { width: 30px; height: 30px; font-size: 19px; }
  .title-bar .brand-text { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .5px; }
  .api-row { padding: 4px 6px; gap: 6px; border-radius: 10px; flex-wrap: wrap; }
  .api-row label { display: none; }
  .exp-pill { font-size: 11.5px; padding: 5px 10px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .identity-value input { width: 84px; font-size: 12px; }
  .tb-icon { width: 28px; height: 28px; font-size: 13px; }

  /* 导航：横向滚动，不换行 */
  .nav-bar { padding: 8px 10px; gap: 8px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .nav-item { flex: 0 0 auto; padding: 8px 12px; font-size: 12.5px; min-height: 42px; }
  .nav-item .step-index { width: 22px; height: 22px; font-size: 10px; }

  /* 工作台标题 */
  .workspace-intro h1 { font-size: 17px; line-height: 1.45; }
  .workspace-intro p { font-size: 11.5px; }
  .workspace-eyebrow { display: none; }

  /* lab 布局：单列 */
  .lab { padding: 12px 10px 24px; }
  .lab-hero { flex-direction: column; align-items: flex-start; gap: 6px; }
  .lab-hero h2 { font-size: 16.5px; line-height: 1.5; }
  .lab-hero p { font-size: 12px; }
  .lab-layout { grid-template-columns: 1fr !important; gap: 12px; }
  .lab-card { border-radius: 12px; }
  .lab-card .lab-pad { padding: 12px; }
  .lab-card-head { padding: 10px 12px; font-size: 12.5px; }
  .lab-kicker { font-size: 10.5px; }
  .lab-qtitle { font-size: 15px; line-height: 1.5; }
  .lab-prompt { font-size: 13px; line-height: 1.7; }
  .lab-scenario { padding: 10px 12px; font-size: 12px; line-height: 1.75; }
  .lab-steps { gap: 6px; }
  .lab-step { width: 30px; height: 30px; font-size: 12px; }
  .lab-choice { padding: 11px 12px; font-size: 13px; line-height: 1.6; }

  /* 按钮：触控热区 */
  .lab button, .lab-actions button, .le-modal-head button { min-height: 42px; font-size: 13px; }
  .lab-chat-form textarea, .lab textarea { font-size: 16px; } /* 防 iOS 缩放 */

  /* 任务舞台 */
  .le-stage { height: 300px; margin: 8px 0; }
  .le-stage iframe { min-height: 100%; }

  /* 弹窗：满屏 */
  .le-modal { padding: 0; }
  .le-modal-card { width: 100vw; height: 100dvh; max-width: none; max-height: none; border-radius: 0; }
  .le-modal-head { padding: 10px 14px; font-size: 12.5px; }

  /* 结果表：窄屏横向滚动，不撑破卡片 */
  .lab-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lab-table td { white-space: nowrap; }

  /* 收尾：避免 lab 内出现横向滚动条 */
  .lab, .lab-layout, .lab-card { min-width: 0; }
  .lab pre, .lab code { white-space: pre-wrap; word-break: break-word; }
}

/* 超窄屏（≤400px） */
@media (max-width: 400px) {
  .title-bar .brand-text { max-width: 110px; font-size: 13.5px; }
  .lab-hero h2 { font-size: 15px; }
  .le-stage { height: 240px; }
  .lab-step { width: 27px; height: 27px; }
}
