/* Public workbench phone layout
   Keep the greeting and conversation input in the first viewport. Secondary
   discovery and campaign content follows below instead of pushing the primary
   action off-screen. */

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  body[data-sxm-home="workbench"] .stage {
    display: block;
    padding:
      10px
      calc(10px + env(safe-area-inset-right, 0px))
      calc(28px + env(safe-area-inset-bottom, 0px))
      calc(10px + env(safe-area-inset-left, 0px));
  }

  body[data-sxm-home="workbench"] .content-column {
    position: static;
    display: flex;
    width: 100%;
    max-width: 100%;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    transform: none;
  }

  body[data-sxm-home="workbench"] .hero-card {
    order: 1;
    width: 100%;
    height: 270px;
    margin: 0;
    padding: 72px 18px 18px;
  }

  body[data-sxm-home="workbench"] .composer-wrap {
    position: static;
    order: 2;
    width: 100%;
    margin: 0;
  }

  body[data-sxm-home="workbench"] .capability-grid {
    order: 3;
    width: 100%;
    height: auto;
    margin-top: 2px;
  }

  body[data-sxm-home="workbench"] .capability-fold {
    order: 3;
    width: 100%;
    margin-top: -4px;
  }

  body[data-sxm-home="workbench"] .capability-fold button {
    min-height: 44px;
  }

  body[data-sxm-home="workbench"] .tool-ribbon,
  body[data-sxm-home="workbench"] .community-strip {
    order: 4;
  }

  body[data-sxm-home="workbench"] .legal {
    order: 5;
  }

  body[data-sxm-home="workbench"] .usage-map,
  body[data-sxm-home="workbench"] .paper-rail,
  body[data-sxm-home="workbench"] #visitBoard {
    display: none !important;
  }

  body[data-sxm-home="workbench"] .topbar {
    min-height: 60px;
    height: 60px;
    padding-inline: 10px;
    gap: 7px;
  }

  body[data-sxm-home="workbench"] .mobile-sidebar-menu,
  body[data-sxm-home="workbench"] .skin-trigger {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }

  body[data-sxm-home="workbench"] .top-actions {
    gap: 5px;
  }

  body[data-sxm-home="workbench"] .top-actions .nav-pill {
    min-height: 44px;
    padding-inline: 11px;
  }

  body[data-sxm-home="workbench"] .composer {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 11px 11px 10px;
    border: 1.5px solid rgba(132, 159, 198, .48);
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    box-shadow:
      0 16px 38px rgba(54, 85, 126, .12),
      0 0 0 4px rgba(111, 154, 218, .055);
  }

  body[data-sxm-home="workbench"] .composer:focus-within {
    border-color: rgba(90, 135, 198, .82);
    box-shadow:
      0 18px 42px rgba(54, 85, 126, .14),
      0 0 0 4px rgba(92, 139, 205, .12);
  }

  body[data-sxm-home="workbench"] #composerTitle {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    margin: 0 7px 7px;
    clip: auto;
    color: #526a88;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
  }

  body[data-sxm-home="workbench"] #composerTitle::after {
    content: " · 直接告诉小满要做什么";
    color: #8b9aad;
    font-weight: 500;
  }

  body[data-sxm-home="workbench"] #focusInput {
    min-height: 66px;
    padding: 9px 7px;
    font-size: 16px;
    line-height: 1.55;
  }

  body[data-sxm-home="workbench"] .composer-tools {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 6px;
    margin-top: 7px;
  }

  body[data-sxm-home="workbench"] .tool-left {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
  }

  body[data-sxm-home="workbench"] .tool-right {
    width: auto;
    flex: 0 0 auto;
  }

  body[data-sxm-home="workbench"] .tool-pill,
  body[data-sxm-home="workbench"] .local-toggle,
  body[data-sxm-home="workbench"] .optimize,
  body[data-sxm-home="workbench"] .icon-button,
  body[data-sxm-home="workbench"] .send-button,
  body[data-sxm-home="workbench"] .cap-card,
  body[data-sxm-home="workbench"] .tool-ribbon > button {
    min-height: 44px;
  }

  body[data-sxm-home="workbench"] .icon-button,
  body[data-sxm-home="workbench"] .send-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }

  body[data-sxm-home="workbench"] .file-hint {
    display: none;
  }

  body[data-sxm-home="workbench"] .selected-mode {
    min-height: 44px;
  }

  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  select:focus-visible {
    outline: 2px solid rgba(76, 126, 193, .72);
    outline-offset: 2px;
  }
}

@media (max-width: 620px) {
  body[data-sxm-home="workbench"] .tool-ribbon,
  body[data-sxm-home="workbench"] .community-strip {
    display: none !important;
  }

  body[data-sxm-home="workbench"] .top-actions [data-href="./agent-canvas/"],
  body[data-sxm-home="workbench"] .top-actions [data-href="./live/?new=1&voice=1"] {
    display: none !important;
  }

  body[data-sxm-home="workbench"] .hero-card {
    height: 255px;
    padding-top: 66px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-sxm-home="workbench"] .hero-card,
  body[data-sxm-home="workbench"] .composer {
    animation: none !important;
    transition: none !important;
  }
}
