/* Keep phone navigation in screen pixels while the Figma artboard scales. */
@media (max-width: 1023px) {
  .mobile-view {
    --mobile-header-scale: min(calc(100vw / 390px), 1.3333333333333333);
  }

  .mobile-view [data-node-id='623:1284'] {
    height: auto !important;
  }

  .mobile-view [data-node-id='623:1285'] {
    zoom: calc(1 / var(--mobile-header-scale));
    width: calc(390px * var(--mobile-header-scale)) !important;
    height: auto !important;
    padding: calc(10px + env(safe-area-inset-top, 0px))
      max(16px, env(safe-area-inset-right, 0px)) 10px
      max(16px, env(safe-area-inset-left, 0px)) !important;
    justify-content: center !important;
  }

  .mobile-view [data-node-id='623:1286'] {
    width: 100% !important;
    height: 44px !important;
    gap: 8px !important;
  }

  .mobile-view [data-node-id='623:1287'] {
    flex: none;
    width: auto !important;
    height: auto !important;
    font-size: clamp(19px, 5.2vw, 22px) !important;
    line-height: 1.25 !important;
  }

  .mobile-view [data-node-id='628:4486'] {
    flex: none;
    width: auto !important;
    height: auto !important;
    gap: 8px !important;
  }

  .mobile-view [data-node-id='628:4485'] {
    display: grid;
    place-items: center;
    width: 44px !important;
    height: 44px !important;
  }

  .mobile-view [data-node-id='628:4485'] img {
    position: static !important;
    width: 20px !important;
    height: 18px !important;
  }

  .mobile-view [data-node-id='628:4477'] {
    width: auto !important;
    height: 36px !important;
    padding: 0 24px !important;
    gap: 8px !important;
  }

  /* Keep a comfortable tap area around the slimmer visible button. */
  .mobile-view [data-node-id='628:4477']::before {
    content: '';
    position: absolute;
    inset: -4px 0;
  }

  .mobile-view [data-node-id='I628:4477;626:4419'] {
    width: auto !important;
    height: auto !important;
    white-space: nowrap;
    font-size: 13px !important;
    line-height: 20px !important;
  }

  .mobile-view [data-node-id='I628:4477;628:4432'] {
    width: 14px !important;
    height: 14px !important;
  }

  .mobile-view [data-node-id='I628:4477;628:4432'] > div {
    position: static !important;
    width: 100%;
    height: 100%;
  }

  .mobile-view [data-node-id='I628:4477;628:4432'] img {
    width: 100%;
    height: 100%;
  }

  .engway-menu {
    width: min(248px, calc(100vw - 32px));
    height: auto;
    max-height: calc(100dvh - 16px);
    padding: 8px;
    overflow-y: auto;
  }

  .engway-menu button {
    height: 44px;
    border-radius: 10px;
  }
}

@media (max-width: 359px) {
  .mobile-view [data-node-id='628:4477'] {
    padding: 0 14px !important;
    gap: 6px !important;
  }
  .mobile-view [data-node-id='I628:4477;626:4419'] {
    font-size: 12px !important;
  }
  .mobile-view [data-node-id='I628:4477;628:4432'] {
    width: 12px !important;
    height: 12px !important;
  }
}
