/**
 * CN/calculator.html 移动端适配
 * v=20260703
 */
body.calc-page {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

@media (max-width: 768px) {
  body.calc-page {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0));
  }

  /* 进度条 */
  #wizardProgress .progress-node {
    width: 28px;
    height: 28px;
    font-size: 12px;
    flex-shrink: 0;
  }

  #wizardProgress + .calc-wizard-labels {
    font-size: 10px;
    gap: 0;
  }

  #wizardProgress + .calc-wizard-labels span {
    flex: 1;
    text-align: center;
    line-height: 1.3;
    padding: 0 2px;
    pointer-events: none;
  }

  #calcResumeBanner {
    flex-direction: column;
    align-items: stretch;
  }

  #calcResumeBanner > span:last-child {
    justify-content: stretch;
  }

  #calcResumeBanner button {
    flex: 1;
    min-height: 44px;
  }

  /* 场景卡片 */
  #scenarioCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .scenario-card {
    padding: 0.65rem !important;
    min-height: 44px;
  }

  .scenario-card .text-sm {
    font-size: 0.8125rem;
  }

  /* 方案包横向滚动 */
  #presetBar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-right: -0.25rem;
  }

  #presetBar::-webkit-scrollbar {
    display: none;
  }

  #presetBar .preset-btn {
    flex-shrink: 0;
  }

  #presetBar > span.text-\[11px\] {
    display: none;
  }

  /* 步骤底部按钮 */
  .calc-step-actions {
    flex-direction: column-reverse;
    align-items: stretch !important;
    gap: 0.5rem;
  }

  .calc-step-actions .calc-step-actions__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .calc-step-actions button {
    width: 100%;
    justify-content: center;
  }

  /* 部署方式单选 */
  #step1 .grid.grid-cols-1.md\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

  /* 浮动 CTA 避开底部 sticky / 企微条 */
  body.calc-page .float-cta {
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0));
    left: 1rem;
    right: 1rem;
  }

  body.calc-page .float-cta a {
    width: 100%;
    justify-content: center;
  }

  /* 结果区卡片 */
  #resultPlatformCards {
    grid-template-columns: 1fr;
  }

  /* AI 加载步骤徽章 */
  .ai-step-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  /* 模块列表标签 */
  .module-category label[data-search] {
    padding: 0.625rem 0.5rem;
  }

  #moduleDetailPanel .grid.grid-cols-1.md\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  #wizardProgress + .calc-wizard-labels span:nth-child(2),
  #wizardProgress + .calc-wizard-labels span:nth-child(4) {
    display: none;
  }
}
