.wechat-download-guide[hidden] {
  display: none;
}

html.is-wechat-guide-open,
body.is-wechat-guide-open {
  overflow: hidden;
}

.wechat-download-guide {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 16, 28, 0.72);
}

.wechat-download-guide__panel {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background: #ffffff;
  color: #101827;
  box-shadow: 0 24px 70px rgba(9, 16, 28, 0.28);
}

.wechat-download-guide__header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e5e9ef;
}

.wechat-download-guide__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf4ff;
  color: #2f6fed;
}

.wechat-download-guide__icon svg,
.wechat-download-guide__close svg,
.wechat-download-guide__button svg {
  width: 19px;
  height: 19px;
}

.wechat-download-guide__title {
  min-width: 0;
}

.wechat-download-guide__title h2 {
  margin: 0;
  color: #101827;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.wechat-download-guide__close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d8dee8;
  border-radius: 7px;
  background: #ffffff;
  color: #344054;
  cursor: pointer;
}

.wechat-download-guide__body {
  padding: 18px;
}

.wechat-download-guide__lead {
  margin: 0 0 6px;
  color: #475467;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.wechat-download-guide__flow {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 15px 0 13px;
  border-bottom: 1px solid #e5e9ef;
}

.wechat-download-guide__flow-step {
  flex: 1 1 0;
  min-width: 0;
  color: #101827;
  text-align: center;
}

.wechat-download-guide__flow-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border: 1px solid #d9e4f7;
  border-radius: 50%;
  background: #edf4ff;
  color: #2f6fed;
}

.wechat-download-guide__flow-step[data-tone="2"] .wechat-download-guide__flow-icon {
  border-color: #cbe9dc;
  background: #edf9f3;
  color: #11845d;
}

.wechat-download-guide__flow-step[data-tone="3"] .wechat-download-guide__flow-icon {
  border-color: #f1dfbc;
  background: #fff8ea;
  color: #b56a00;
}

.wechat-download-guide__flow-step[data-tone="4"] .wechat-download-guide__flow-icon {
  border-color: #e5d8f6;
  background: #f7f0ff;
  color: #7650aa;
}

.wechat-download-guide__flow-icon svg {
  width: 20px;
  height: 20px;
}

.wechat-download-guide__flow-arrow {
  flex: 0 0 14px;
  display: grid;
  place-items: center;
  padding-top: 14px;
  color: #98a2b3;
}

.wechat-download-guide__flow-arrow svg {
  width: 14px;
  height: 14px;
}

.wechat-download-guide__flow-step strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.wechat-download-guide__flow-step small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.wechat-download-guide__feedback {
  position: relative;
  min-height: 34px;
  display: grid;
  place-items: center;
  margin-top: 8px;
}

.wechat-download-guide__fallback {
  margin: 0;
  padding: 0;
  color: #475467;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  transition: opacity 120ms ease;
}

.wechat-download-guide__feedback.is-toast-visible .wechat-download-guide__fallback {
  opacity: 0;
}

.wechat-download-guide__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 7px;
}

.wechat-download-guide__button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid #c8d0dc;
  border-radius: 7px;
  background: #ffffff;
  color: #101827;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.wechat-download-guide__button--primary {
  border-color: #2f6fed;
  background: #2f6fed;
  color: #ffffff;
}

.wechat-download-guide__status {
  position: absolute;
  top: 50%;
  left: 50%;
  bottom: auto;
  z-index: 2;
  max-width: calc(100% - 28px);
  margin: 0;
  padding: 9px 13px;
  border-radius: 6px;
  background: rgba(16, 24, 39, 0.94);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-50% + 5px));
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  pointer-events: none;
}

.wechat-download-guide__status.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

@media (max-width: 640px) {
  .wechat-download-guide {
    align-items: flex-end;
    padding: 0;
  }

  .wechat-download-guide__panel {
    width: 100%;
    max-height: 92dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .wechat-download-guide__header {
    padding: 16px 14px 13px;
  }

  .wechat-download-guide__body {
    padding: 15px 14px calc(18px + env(safe-area-inset-bottom));
  }

  .wechat-download-guide__actions {
    grid-template-columns: 1fr;
    margin-top: 7px;
  }

  .wechat-download-guide__button {
    width: 100%;
  }

}
