/* FXFeng mobile refinement — desktop remains unchanged. */
@media (max-width: 760px) {
  html.fx-home-active,
  body.fx-home-active,
  #root {
    min-height: 100%;
  }

  body.fx-home-active {
    background: #efefeb;
  }

  body.fx-home-active .fx-home {
    height: 100dvh;
    min-height: 100svh;
    scroll-snap-type: none;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.fx-home-active .fx-home ::selection {
    background: #b8c0b8;
    color: #172019;
  }

  body.fx-home-active .fx-progress {
    height: 2px;
    padding-top: env(safe-area-inset-top);
    background: transparent;
  }

  body.fx-home-active .fx-nav-shell {
    top: env(safe-area-inset-top);
    left: 16px;
    right: 16px;
    width: auto;
    height: 64px;
    margin: 0;
    background: linear-gradient(to bottom, #f0f0ecef 0 78%, transparent);
  }

  body.fx-home-active .fx-brand {
    min-height: 44px;
    padding-right: 12px;
  }

  body.fx-home-active .fx-brand-mark {
    font-size: 22px;
  }

  body.fx-home-active .fx-brand strong {
    font-size: 17px;
  }

  body.fx-home-active .fx-menu-button {
    width: 44px;
    height: 44px;
  }

  body.fx-home-active .fx-mobile-menu {
    top: calc(72px + env(safe-area-inset-top));
    left: 16px;
    right: 16px;
    max-height: calc(100dvh - 94px - env(safe-area-inset-top));
    overflow-y: auto;
    padding: 8px;
  }

  body.fx-home-active .fx-mobile-menu button {
    min-height: 50px;
    padding: 12px 14px;
  }

  body.fx-home-active .fx-hero {
    min-height: 100svh;
    padding: calc(92px + env(safe-area-inset-top)) 20px max(64px, calc(42px + env(safe-area-inset-bottom)));
    overflow: hidden;
  }

  body.fx-home-active .fx-hero-copy {
    transform: none !important;
    opacity: 1 !important;
  }

  body.fx-home-active .fx-eyebrow {
    gap: 9px;
    font-size: 9px;
    line-height: 1.55;
    letter-spacing: .75px;
  }

  body.fx-home-active .fx-hero h1 {
    max-width: 350px;
    margin: 24px 0 17px;
    font-size: clamp(40px, 11.6vw, 48px);
    line-height: 1.01;
    letter-spacing: -1.4px;
  }

  body.fx-home-active .fx-role {
    font-size: 12px;
    line-height: 1.5;
  }

  body.fx-home-active .fx-intro {
    max-width: 35ch;
    margin: 14px 0 18px;
    font-size: 15px;
    line-height: 1.75;
  }

  body.fx-home-active .fx-text-link {
    min-height: 48px;
    gap: 24px;
    padding: 0 2px 7px;
    font-size: 12px;
  }

  body.fx-home-active .fx-mobile-agents {
    gap: 10px;
    margin-top: 18px;
  }

  body.fx-home-active .fx-mobile-agents > span {
    font-size: 8px;
    line-height: 1.5;
  }

  body.fx-home-active .fx-mobile-agents button {
    min-height: 62px;
    padding: 9px;
    grid-template-columns: 28px 1fr 14px;
    gap: 8px;
  }

  body.fx-home-active .fx-mobile-agents strong {
    font-size: 12px;
    line-height: 1.35;
  }

  body.fx-home-active .fx-console-wrap {
    position: relative;
    right: auto;
    bottom: auto;
    width: 126%;
    margin: 22px 0 -22% -20%;
    opacity: .58;
    transform: none !important;
  }

  body.fx-home-active .fx-console-wrap > img {
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 82%, transparent 100%);
  }

  body.fx-home-active .fx-scroll-cue {
    display: none;
  }

  body.fx-home-active .fx-home .fx-chapter,
  body.fx-home-active .fx-chapter.fx-business-paths {
    min-height: 0;
    padding: 94px 20px max(76px, calc(58px + env(safe-area-inset-bottom)));
    gap: 28px;
    align-content: start;
    scroll-snap-align: none;
    overflow: hidden;
  }

  body.fx-home-active .fx-chapter::before {
    inset: 8px;
    border-radius: 16px;
  }

  body.fx-home-active .fx-frame {
    inset: 20px;
  }

  body.fx-home-active .fx-frame > i {
    width: 10px;
    height: 10px;
  }

  body.fx-home-active .fx-frame > div {
    min-height: 38px;
    align-items: center;
    gap: 14px;
    padding: 4px 12px 10px;
    font-size: 8px;
    line-height: 1.45;
    letter-spacing: 1px;
  }

  body.fx-home-active .fx-frame > div span:first-child {
    font-size: 16px;
  }

  body.fx-home-active .fx-home .fx-chapter-copy {
    max-width: none;
  }

  body.fx-home-active .fx-home .fx-chapter h2,
  body.fx-home-active .fx-business-paths h2 {
    max-width: 12ch;
    margin: 22px 0 16px;
    font-size: clamp(31px, 9.4vw, 40px);
    line-height: 1.12;
    letter-spacing: -1.1px;
  }

  body.fx-home-active .fx-home .fx-chapter-copy > p,
  body.fx-home-active .fx-business-paths .fx-chapter-copy > p {
    max-width: 38ch;
    font-size: 15px;
    line-height: 1.8;
  }

  body.fx-home-active .fx-home .fx-product-grid,
  body.fx-home-active .fx-home .fx-community-links,
  body.fx-home-active .fx-home .fx-about-actions,
  body.fx-home-active .fx-business-paths .fx-path-grid {
    margin-top: 0;
    gap: 14px;
  }

  body.fx-home-active .fx-home .fx-product-grid > button {
    min-height: 108px;
    padding: 16px;
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    align-items: center;
    align-content: center;
    gap: 13px;
    border-radius: 13px;
  }

  body.fx-home-active .fx-home .fx-product-icon {
    grid-column: auto;
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  body.fx-home-active .fx-home .fx-product-grid strong {
    gap: 6px;
    font-size: 16px;
    line-height: 1.42;
  }

  body.fx-home-active .fx-home .fx-product-grid small {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.55;
  }

  body.fx-home-active .fx-home .fx-product-grid > button > svg {
    margin-top: 0;
  }

  body.fx-home-active .fx-home .fx-community-links button {
    min-height: 114px;
    padding: 17px;
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    align-items: center;
    align-content: center;
    gap: 13px;
    border-radius: 13px;
  }

  body.fx-home-active .fx-home .fx-community-links button > span {
    grid-column: auto;
    width: 44px;
    height: 44px;
    margin: 0;
    border-radius: 10px;
    font-size: 16px;
  }

  body.fx-home-active .fx-home .fx-community-links strong {
    font-size: 16px;
    line-height: 1.42;
  }

  body.fx-home-active .fx-home .fx-community-links small {
    display: block;
    grid-column: 2;
    margin-top: -7px;
    font-size: 12px;
    line-height: 1.5;
  }

  body.fx-home-active .fx-home .fx-community-links button > svg {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    margin: 0;
  }

  body.fx-home-active .fx-path-card {
    padding: 20px;
    border-radius: 14px;
  }

  body.fx-home-active .fx-path-number {
    width: 44px;
    height: 44px;
    margin-bottom: 17px;
    font-size: 16px;
  }

  body.fx-home-active .fx-path-card h3 {
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.45;
  }

  body.fx-home-active .fx-path-card p {
    font-size: 14px;
    line-height: 1.78;
  }

  body.fx-home-active .fx-path-card p + p {
    margin-top: 13px;
    padding-top: 13px;
  }

  body.fx-home-active .fx-home a.fx-path-card .fx-text-link {
    margin-top: 14px;
  }

  body.fx-home-active .fx-home .fx-about-actions .fx-metal-button {
    min-height: 72px;
    padding: 17px 18px;
    font-size: 16px;
    border-radius: 13px;
  }

  body.fx-home-active .fx-home .fx-about {
    min-height: 100svh;
    padding-bottom: max(94px, calc(76px + env(safe-area-inset-bottom)));
  }

  body.fx-home-active .fx-final-contact {
    width: 100%;
    margin-top: 2px;
  }

  body.fx-home-active .fx-final-contact .fx-qr-frame {
    width: min(230px, 68vw);
    padding: 14px;
    border-radius: 19px;
  }

  body.fx-home-active .fx-final-contact > p {
    margin-top: 18px;
    font-size: 15px;
  }

  body.fx-home-active .fx-footer {
    left: 24px;
    right: 24px;
    bottom: max(24px, env(safe-area-inset-bottom));
    font-size: 8px;
  }

  body.fx-home-active .fx-home .fx-chat {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, calc(10px + env(safe-area-inset-bottom)));
  }

  body.fx-home-active .fx-home .fx-chat-launcher {
    width: 54px;
    min-width: 54px;
    height: 54px;
    padding: 6px;
  }

  body.fx-home-active .fx-home .fx-chat-panel {
    width: calc(100vw - 24px);
    height: calc(100dvh - 88px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: 680px;
  }

  body.fx-home-active .fx-contact-modal {
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  }

  body.fx-home-active .fx-contact-panel {
    width: min(430px, calc(100vw - 32px));
    max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
  }

  @media (hover: none) {
    .fx-home .fx-path-card:hover,
    .fx-home .fx-product-grid > button:hover,
    .fx-home .fx-community-links button:hover,
    .fx-home .fx-chat-launcher:hover,
    .fx-metal-button:hover,
    .fx-text-link:hover {
      transform: none;
    }
  }
}

@media (max-width: 380px) {
  body.fx-home-active .fx-hero {
    padding-inline: 17px;
  }

  body.fx-home-active .fx-hero h1 {
    font-size: clamp(38px, 11.3vw, 43px);
  }

  body.fx-home-active .fx-home .fx-chapter,
  body.fx-home-active .fx-chapter.fx-business-paths {
    padding-inline: 17px;
  }

  body.fx-home-active .fx-frame {
    inset-inline: 17px;
  }

}

@media (min-width: 761px) and (max-width: 1023px) {
  body.fx-home-active .fx-home .fx-chapter {
    padding-inline: 7vw;
  }

  body.fx-home-active .fx-home .fx-product-grid,
  body.fx-home-active .fx-home .fx-community-links,
  body.fx-home-active .fx-home .fx-about-actions,
  body.fx-home-active .fx-business-paths .fx-path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
