dialog.wechat-auth-dialog {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

dialog.wechat-auth-dialog::backdrop {
  background: rgba(11, 31, 25, .62);
  backdrop-filter: blur(2px);
}

.wechat-auth-shell {
  width: min(820px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 32px));
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(390px, 1.18fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(12, 47, 39, .28);
}

.wechat-auth-intro {
  display: flex;
  flex-direction: column;
  padding: 34px 30px;
  color: #133e32;
  background: #eaf4ef;
}

.wechat-auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wechat-auth-brand img {
  width: 38px;
  height: 38px;
}

.wechat-auth-brand strong,
.wechat-auth-brand small {
  display: block;
}

.wechat-auth-brand strong {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 20px;
}

.wechat-auth-brand small {
  margin-top: 2px;
  color: #62756e;
  font-size: 10px;
}

.wechat-auth-intro h2 {
  margin: 38px 0 10px;
  font-size: 27px;
  line-height: 1.45;
  letter-spacing: 0;
}

.wechat-auth-intro > p {
  margin: 0;
  color: #566b63;
  font-size: 12px;
  line-height: 1.8;
}

.wechat-auth-benefits {
  display: grid;
  gap: 16px;
  margin: auto 0 0;
  padding: 28px 0 0;
  border-top: 1px solid #c7dcd3;
  list-style: none;
}

.wechat-auth-benefits li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #43584f;
  font-size: 11px;
}

.wechat-auth-benefits span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #175f4a;
  background: #fff;
  font-size: 10px;
  font-weight: 900;
}

.wechat-auth-main {
  position: relative;
  min-width: 0;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 38px 42px 30px;
  text-align: center;
}

.wechat-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #718078;
  background: transparent;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.wechat-auth-close:hover,
.wechat-auth-close:focus-visible {
  color: #175f4a;
  background: #edf4f1;
  outline: none;
}

.wechat-auth-main h2 {
  margin: 8px 34px 5px;
  color: #18241f;
  font-size: 24px;
  line-height: 1.4;
  letter-spacing: 0;
}

.wechat-auth-subtitle {
  margin: 0;
  color: #6b7872;
  font-size: 12px;
}

.wechat-auth-qr {
  width: 240px;
  height: 240px;
  display: grid;
  place-items: center;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid #dce5e0;
  border-radius: 8px;
  background: #fff;
}

.wechat-auth-qr-frame,
.wechat-auth-qr iframe {
  width: 240px !important;
  height: 240px !important;
  display: block;
  border: 0;
}

.wechat-auth-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  color: #697770;
  background: #f7faf8;
}

.wechat-auth-placeholder > span {
  min-width: 48px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  background: #175f4a;
  font-size: 12px;
  font-weight: 850;
}

.wechat-auth-placeholder strong {
  color: #26342f;
  font-size: 14px;
}

.wechat-auth-placeholder small {
  max-width: 180px;
  font-size: 10px;
  line-height: 1.6;
}

.wechat-auth-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: #5f6e67;
  font-size: 11px;
}

[data-wechat-state="error"] .wechat-auth-status,
[data-wechat-state="unavailable"] .wechat-auth-status {
  color: #9a681a;
}

[data-wechat-state="success"] .wechat-auth-status {
  color: #175f4a;
  font-weight: 800;
}

.wechat-auth-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 3px;
}

.wechat-auth-actions button,
.wechat-auth-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #c5d2cc;
  border-radius: 5px;
  color: #175f4a;
  background: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.wechat-auth-actions button:hover,
.wechat-auth-actions button:focus-visible,
.wechat-auth-actions a:hover,
.wechat-auth-actions a:focus-visible {
  border-color: #175f4a;
  outline: none;
}

.wechat-auth-actions button:disabled {
  color: #99a39f;
  border-color: #dfe6e2;
  background: #f5f7f6;
  cursor: wait;
}

.wechat-auth-legal {
  margin: auto 0 0;
  color: #8a9590;
  font-size: 9px;
  line-height: 1.65;
}

.wechat-auth-legal a {
  color: #526a60;
  text-decoration: none;
}

.wechat-auth-legal a:hover,
.wechat-auth-legal a:focus-visible {
  color: #175f4a;
  text-decoration: underline;
  outline: none;
}

.wechat-auth-phone-pane {
  width: 100%;
  margin-top: 20px;
  text-align: left;
}

.wechat-auth-phone-pane[hidden],
.wechat-auth-scan-pane[hidden] {
  display: none !important;
}

@media (max-width: 680px) {
  .wechat-auth-shell {
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .wechat-auth-intro {
    min-height: 104px;
    padding: 18px 20px;
  }

  .wechat-auth-intro h2 {
    margin: 14px 0 0;
    font-size: 19px;
  }

  .wechat-auth-intro > p,
  .wechat-auth-benefits {
    display: none;
  }

  .wechat-auth-main {
    min-height: 510px;
    padding: 28px 20px 22px;
  }

  .wechat-auth-main h2 {
    font-size: 21px;
  }

  .wechat-auth-qr,
  .wechat-auth-qr-frame,
  .wechat-auth-qr iframe {
    width: 220px !important;
    height: 220px !important;
  }
}
