.invite-mobile-page {
  display: none;
}

@media (max-width: 640px) {
  body {
    min-width: 0 !important;
  }

  .guide,
  #index,
  #new-index,
  .new-footer,
  .side-btn,
  .mobile-kefu-float-wrapper,
  #inviteAppContainer > .invite-main-section {
    display: none !important;
  }

  #inviteAppContainer {
    min-width: 0;
    padding: 0;
    background: #ffefd5;
  }

  .invite-mobile-page {
    display: block;
    width: 100%;
    margin: 0 auto;
    color: #80634e;
    background: linear-gradient(180deg, #ffdb8c 0%, #ffe0a2 48%, #fff0d9 100%);
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
  }

  .invite-mobile-page * {
    box-sizing: border-box;
  }

  .mobile-invite-banner {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-activity-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 8px 12px 0;
  }

  .mobile-activity-card {
    position: relative;
    padding: 32px 17px 20px;
    border-radius: 24px;
    background: #fffefa;
    box-shadow: 0 8px 20px rgba(192, 131, 48, 0.06);
  }

  .mobile-activity-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    min-width: 84px;
    padding: 2px 20px;
    border: 2px solid #fffaf0;
    border-radius: 20px;
    color: #a76833;
    background: #ffebc2;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    text-align: center;
    white-space: nowrap;
    transform: translateX(-50%);
  }

  .mobile-activity-card h2 {
    margin: 0 0 20px;
    color: #572b1b;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    text-align: center;
  }

  .mobile-reward-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
  }

  .mobile-activity-card h3 {
    margin: 24px 0 16px;
    color: #91502b;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    text-align: center;
  }

  .mobile-activity-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: activity-step;
  }

  .mobile-activity-steps li {
    position: relative;
    min-height: 20px;
    padding-left: 30px;
    overflow-wrap: anywhere;
    counter-increment: activity-step;
  }

  .mobile-activity-steps li::before {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border: 1px solid #ffc47e;
    border-radius: 50%;
    color: #b4783b;
    background: #fff2cc;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    content: counter(activity-step);
  }

  .mobile-invite-note {
    margin: 12px 0 0;
    color: #c57833;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
  }

  .mobile-activity-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }

  .mobile-action-row {
    display: flex;
    gap: 10px;
  }

  .mobile-activity-actions button {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #efbd8e;
    border-radius: 28px;
    color: #b36b2d;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
  }

  .mobile-activity-actions img {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }

  .mobile-activity-actions .mobile-primary-button {
    min-height: 48px;
    border-color: #ff553f;
    color: #fff;
    background: #ff553f;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(211, 103, 40, 0.12);
  }

  .mobile-activity-actions button:active {
    opacity: 0.8;
  }

  .mobile-activity-actions button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }

  .mobile-activity-description {
    margin: 0;
    line-height: 24px;
  }

  .mobile-activity-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid #ffddb0;
    border-radius: 10px;
    color: #b48445;
    background: #fff8e9;
    font-size: 12px;
    line-height: 20px;
  }

  .mobile-activity-notice img {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 3px;
  }

  .mobile-action-tip {
    margin: 0;
    font-size: 12px;
    line-height: 20px;
  }

  .mobile-pc-tip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    margin-top: 24px;
    padding: 10px 8px;
    border: 1px dashed #d9dee8;
    border-radius: 8px;
    color: #697586;
    background: #f7f8fa;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
  }

  .mobile-pc-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #262626;
  }

  .mobile-pc-tip a {
    color: #1890ff;
    white-space: nowrap;
  }

  .mobile-invite-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 0 16px;
    color: #b89a70;
    font-size: 12px;
    line-height: 20px;
  }

  .mobile-invite-footer::before,
  .mobile-invite-footer::after {
    width: 36px;
    height: 1px;
    background: #d9c298;
    content: '';
  }

  .invite-poster-modal .ant-modal,
  .invite-review-modal .ant-modal,
  .invite-detail-modal .ant-modal {
    max-width: calc(100vw - 24px);
    margin: 12px auto;
  }

  .invite-poster-modal .ant-modal-body {
    padding: 0 16px 20px;
  }

  .invite-review-modal .review-modal-container,
  .invite-detail-modal .invite-detail-modal-container {
    max-height: 85vh;
    overflow-y: auto;
  }

  .invite-review-modal .review-modal-layout {
    flex-direction: column;
  }

  .invite-review-modal .review-modal-left,
  .invite-review-modal .review-modal-right {
    width: 100%;
    padding: 24px 16px;
  }

  .invite-detail-modal .invite-detail-modal-body {
    overflow-x: auto;
  }
}
