.yn-auth-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #2a241c;
  background: #f5efe3;
  border: 1px solid rgba(149, 128, 95, .42);
  border-radius: 2px;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .56);
}

.yn-auth-dialog::backdrop {
  background: rgba(8, 7, 6, .78);
  backdrop-filter: blur(10px);
}

.yn-auth-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(360px, 1.18fr);
  min-height: 610px;
}

.yn-auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px 40px 38px;
  overflow: hidden;
  color: #eee3d0;
  background:
    radial-gradient(circle at 12% 10%, rgba(200, 64, 46, .2), transparent 34%),
    linear-gradient(155deg, #1c1813, #0d0c0a 70%);
}

.yn-auth-aside::after {
  content: "众";
  position: absolute;
  right: -22px;
  bottom: -64px;
  color: rgba(236, 228, 212, .035);
  font: 300 250px/1 var(--serif, "Songti SC", serif);
}

.yn-auth-brand,
.yn-auth-coordinate,
.yn-auth-facts,
.yn-auth-aside-note {
  position: relative;
  z-index: 1;
}

.yn-auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-family: var(--serif, "Songti SC", serif);
  letter-spacing: .28em;
}

.yn-auth-brand-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #f7eee0;
  background: #c8402e;
  border-radius: 2px;
  transform: rotate(-4deg);
}

.yn-auth-coordinate {
  margin-top: 62px;
}

.yn-auth-coordinate small {
  display: block;
  margin-bottom: 16px;
  color: rgba(236, 228, 212, .52);
  font-size: 10px;
  letter-spacing: .34em;
}

.yn-auth-coordinate h2 {
  max-width: 280px;
  margin: 0;
  color: #f2e9d9;
  font: 400 clamp(34px, 4vw, 50px)/1.28 var(--serif, "Songti SC", serif);
  letter-spacing: .08em;
}

.yn-auth-coordinate p {
  max-width: 300px;
  margin: 22px 0 0;
  color: rgba(236, 228, 212, .68);
  font-size: 13px;
  line-height: 2;
}

.yn-auth-facts {
  display: grid;
  gap: 11px;
  margin-top: 42px;
}

.yn-auth-facts span {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: rgba(236, 228, 212, .6);
  font-size: 11px;
  letter-spacing: .08em;
}

.yn-auth-facts b {
  color: #cda98b;
  font-weight: 500;
}

.yn-auth-aside-note {
  margin-top: 34px;
  color: rgba(236, 228, 212, .38);
  font-size: 10px;
  letter-spacing: .1em;
}

.yn-auth-main {
  position: relative;
  padding: 44px 48px 38px;
  overflow-y: auto;
}

.yn-auth-close {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: #766a5a;
  background: transparent;
  border: 1px solid rgba(71, 58, 43, .14);
  border-radius: 50%;
  cursor: pointer;
  transition: .2s ease;
}

.yn-auth-close:hover {
  color: #2a241c;
  border-color: rgba(200, 64, 46, .42);
}

.yn-auth-step {
  margin: 0 44px 6px 0;
  color: #a45d4d;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.yn-auth-title {
  margin: 0;
  color: #272118;
  font: 500 30px/1.3 var(--serif, "Songti SC", serif);
  letter-spacing: .06em;
}

.yn-auth-intro {
  margin: 12px 0 28px;
  color: #756b5d;
  font-size: 13px;
  line-height: 1.8;
}

.yn-auth-form {
  display: grid;
  gap: 17px;
}

.yn-auth-panel[hidden],
.yn-auth-error[hidden],
.yn-auth-dev-otp[hidden],
.yn-auth-link-note[hidden],
.yn-auth-invite-field[hidden] {
  display: none !important;
}

.yn-auth-label {
  display: grid;
  gap: 8px;
  color: #4a4034;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
}

.yn-auth-label-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.yn-auth-label-head small {
  color: #9d9182;
  font-size: 10px;
  font-weight: 400;
}

.yn-auth-input,
.yn-auth-otp-row button {
  min-height: 48px;
  border-radius: 2px;
}

.yn-auth-input {
  width: 100%;
  padding: 0 15px;
  color: #2a241c;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(71, 58, 43, .2);
  outline: none;
  font: 400 15px/1 var(--sans, "PingFang SC", sans-serif);
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.yn-auth-input::placeholder {
  color: #aaa092;
}

.yn-auth-input:focus {
  background: #fffdf8;
  border-color: rgba(200, 64, 46, .72);
  box-shadow: 0 0 0 3px rgba(200, 64, 46, .09);
}

.yn-auth-otp-row {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 10px;
}

.yn-auth-otp-row button {
  color: #7a362c;
  background: #eee2d2;
  border: 1px solid rgba(200, 64, 46, .2);
  cursor: pointer;
  font-size: 12px;
}

.yn-auth-otp-row button:disabled,
.yn-auth-action:disabled,
.yn-auth-douyin:disabled {
  cursor: wait;
  opacity: .58;
}

.yn-auth-field-note,
.yn-auth-dev-otp,
.yn-auth-link-note {
  margin: -7px 0 0;
  color: #8d8274;
  font-size: 11px;
  line-height: 1.7;
}

.yn-auth-dev-otp strong {
  color: #9f392b;
  letter-spacing: .12em;
}

.yn-auth-link-note {
  padding: 12px 14px;
  color: #704a3f;
  background: rgba(200, 64, 46, .06);
  border-left: 2px solid #c8402e;
}

.yn-auth-action,
.yn-auth-douyin,
.yn-auth-secondary {
  width: 100%;
  min-height: 49px;
  padding: 0 18px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .08em;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.yn-auth-action {
  margin-top: 4px;
  color: #fff8ed;
  background: #b83c2b;
  border: 1px solid #b83c2b;
  box-shadow: 0 10px 24px rgba(184, 60, 43, .2);
}

.yn-auth-action:hover:not(:disabled),
.yn-auth-douyin:hover:not(:disabled),
.yn-auth-secondary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.yn-auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: #a39889;
  font-size: 10px;
  letter-spacing: .16em;
}

.yn-auth-divider::before,
.yn-auth-divider::after {
  content: "";
  height: 1px;
  background: rgba(71, 58, 43, .12);
}

.yn-auth-douyin,
.yn-auth-secondary {
  color: #332c24;
  background: transparent;
  border: 1px solid rgba(71, 58, 43, .23);
}

.yn-auth-douyin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.yn-auth-douyin-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: #171717;
  border-radius: 7px;
  font-size: 14px;
}

.yn-auth-boundary {
  margin: 2px 0 0;
  color: #9c9183;
  font-size: 10px;
  line-height: 1.65;
  text-align: center;
}

.yn-auth-error {
  padding: 10px 13px;
  color: #a33224;
  background: rgba(184, 60, 43, .07);
  border: 1px solid rgba(184, 60, 43, .16);
  font-size: 12px;
  line-height: 1.65;
}

.yn-auth-consent {
  display: grid;
  gap: 11px;
  padding: 16px;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(71, 58, 43, .13);
}

.yn-auth-consent legend {
  padding: 0 6px;
  color: #655a4b;
  font-size: 11px;
  letter-spacing: .08em;
}

.yn-auth-choice {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: #655b4e;
  font-size: 12px;
  line-height: 1.7;
}

.yn-auth-choice input {
  appearance: none;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  background: #fff;
  border: 1px solid rgba(71, 58, 43, .3);
  border-radius: 4px;
  cursor: pointer;
}

.yn-auth-choice input:checked {
  background: #b83c2b;
  border-color: #b83c2b;
  box-shadow: inset 0 0 0 4px #f5efe3;
}

.yn-auth-choice a {
  color: #a23628;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yn-auth-link-paths {
  display: grid;
  gap: 12px;
  margin: 6px 0 22px;
}

.yn-auth-link-paths div {
  padding: 14px 16px;
  color: #74695b;
  background: rgba(255, 255, 255, .52);
  border: 1px solid rgba(71, 58, 43, .12);
  font-size: 12px;
  line-height: 1.75;
}

.yn-auth-link-paths strong {
  display: block;
  color: #3d352b;
}

.yn-auth-link-actions,
.yn-auth-success-actions {
  display: grid;
  gap: 10px;
}

.yn-auth-account-card {
  margin: 4px 0 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, .5);
  border: 1px solid rgba(71, 58, 43, .14);
  border-radius: 2px;
}

.yn-auth-account-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
}

.yn-auth-account-avatar {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff5e8;
  background: #b83c2b;
  border-radius: 50%;
  overflow: hidden;
  font: 400 21px/1 var(--serif, "Songti SC", serif);
}

.yn-auth-account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yn-auth-account-primary {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.yn-auth-account-primary strong {
  overflow: hidden;
  color: #332c24;
  font: 500 17px/1.35 var(--serif, "Songti SC", serif);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yn-auth-account-primary small {
  color: #8f8374;
  font-size: 10px;
  letter-spacing: .08em;
}

.yn-auth-account-badge {
  margin-left: auto;
  padding: 5px 8px;
  color: #8d3c30;
  background: rgba(184, 60, 43, .08);
  border: 1px solid rgba(184, 60, 43, .13);
  font-size: 10px;
  white-space: nowrap;
}

.yn-auth-account-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid rgba(71, 58, 43, .11);
}

.yn-auth-account-details div {
  min-width: 0;
  padding: 12px 16px 13px;
  border-bottom: 1px solid rgba(71, 58, 43, .08);
}

.yn-auth-account-details div:nth-child(odd) {
  border-right: 1px solid rgba(71, 58, 43, .08);
}

.yn-auth-account-details div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.yn-auth-account-details dt {
  margin-bottom: 5px;
  color: #9a8e7f;
  font-size: 9px;
  letter-spacing: .12em;
}

.yn-auth-account-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #4d4337;
  font-size: 11px;
  line-height: 1.55;
}

.yn-auth-account-notice {
  margin: 0;
  padding: 8px 16px;
  color: #806f60;
  background: rgba(184, 60, 43, .04);
  border-top: 1px solid rgba(71, 58, 43, .08);
  font-size: 10px;
  line-height: 1.6;
}

.yn-auth-account-notice[hidden] {
  display: none;
}

.yn-auth-success-copy {
  margin: 0 0 22px;
  color: #73685a;
  font-size: 13px;
  line-height: 1.9;
}

.yn-auth-footer {
  margin-top: 24px;
  color: #a39889;
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

[data-yunian-auth-trigger][data-authenticated="true"] {
  border-color: rgba(200, 64, 46, .65);
  color: #fff;
}

.yn-auth-dialog :focus-visible {
  outline: 2px solid #c8402e;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .yn-auth-dialog {
    width: min(100vw - 18px, 560px);
    max-height: calc(100dvh - 18px);
  }

  .yn-auth-shell {
    display: flex;
    height: min(760px, calc(100dvh - 18px));
    min-height: 0;
    flex-direction: column;
  }

  .yn-auth-aside {
    flex: 0 0 150px;
    min-height: 150px;
    padding: 24px 24px 22px;
  }

  .yn-auth-coordinate {
    margin-top: 24px;
  }

  .yn-auth-coordinate h2 {
    font-size: 28px;
  }

  .yn-auth-coordinate p,
  .yn-auth-facts,
  .yn-auth-aside-note {
    display: none;
  }

  .yn-auth-main {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    padding: 30px 23px 26px;
  }

  .yn-auth-close {
    top: 14px;
    right: 14px;
    color: #655a4b;
  }

  .yn-auth-title {
    font-size: 26px;
  }

  .yn-auth-account-head {
    padding: 14px;
  }

  .yn-auth-account-details div {
    padding: 11px 14px 12px;
  }
}

@media (max-width: 430px) {
  .yn-auth-dialog {
    width: 100vw;
    max-width: none;
    max-height: 100dvh;
    border: 0;
  }

  .yn-auth-aside {
    flex-basis: 150px;
    min-height: 132px;
    padding: 18px 23px 16px;
  }

  .yn-auth-shell {
    height: 100dvh;
  }

  .yn-auth-coordinate {
    margin-top: 14px;
  }

  .yn-auth-coordinate small {
    display: none;
  }

  .yn-auth-coordinate h2 {
    font-size: 26px;
  }

  .yn-auth-otp-row {
    grid-template-columns: 1fr 112px;
  }

  .yn-auth-account-details {
    grid-template-columns: 1fr;
  }

  .yn-auth-account-details div,
  .yn-auth-account-details div:nth-child(odd),
  .yn-auth-account-details div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(71, 58, 43, .08);
  }

  .yn-auth-account-details div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yn-auth-dialog *,
  .yn-auth-dialog *::before,
  .yn-auth-dialog *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
