html.auth-checking {
  background: #f4f0e8;
}

html.auth-checking body > :not(#bubu-auth-gate) {
  visibility: hidden !important;
}

#bubu-auth-gate {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 24px;
  background:
    radial-gradient(circle at 14% 16%, rgba(218, 232, 209, 0.82), transparent 31%),
    radial-gradient(circle at 86% 82%, rgba(238, 218, 195, 0.72), transparent 33%),
    #f7f3eb;
  color: #3f493d;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

#bubu-auth-gate[hidden] {
  display: none;
}

.bubu-auth-shell {
  display: grid;
  width: min(920px, 100%);
  min-height: 560px;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  border: 1px solid rgba(91, 105, 86, 0.16);
  border-radius: 32px;
  background: rgba(255, 253, 249, 0.95);
  box-shadow: 0 28px 90px rgba(64, 72, 59, 0.16);
}

.bubu-auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px;
  background: #667c5f;
  color: #fff;
}

.bubu-auth-story::before,
.bubu-auth-story::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  content: "";
}

.bubu-auth-story::before {
  top: -90px;
  right: -85px;
  width: 270px;
  height: 270px;
}

.bubu-auth-story::after {
  right: 36px;
  bottom: 75px;
  width: 90px;
  height: 90px;
}

.bubu-auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bubu-auth-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  font-size: 14px;
}

.bubu-auth-quote {
  position: relative;
  max-width: 270px;
}

.bubu-auth-quote small {
  display: block;
  margin-bottom: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  opacity: 0.72;
}

.bubu-auth-quote strong {
  display: block;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.55;
}

.bubu-auth-quote span {
  display: block;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.8;
  opacity: 0.72;
}

.bubu-auth-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px 62px;
}

.bubu-auth-eyebrow {
  margin: 0 0 10px;
  color: #82917c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.bubu-auth-form-wrap h1 {
  margin: 0;
  color: #354033;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.bubu-auth-intro {
  margin: 12px 0 28px;
  color: #81887d;
  font-size: 13px;
  line-height: 1.75;
}

.bubu-auth-field {
  margin-bottom: 15px;
}

.bubu-auth-field label {
  display: block;
  margin-bottom: 7px;
  color: #596354;
  font-size: 12px;
  font-weight: 700;
}

.bubu-auth-field input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid #dce1d8;
  border-radius: 13px;
  outline: none;
  background: #fff;
  color: #384136;
  font-size: 15px;
  padding: 0 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bubu-auth-field input:focus {
  border-color: #849a7c;
  box-shadow: 0 0 0 4px rgba(132, 154, 124, 0.14);
}

.bubu-auth-button {
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  background: #5f7459;
  box-shadow: 0 10px 24px rgba(95, 116, 89, 0.2);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
}

.bubu-auth-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.bubu-auth-message {
  min-height: 22px;
  margin: 13px 0 0;
  color: #a15348;
  font-size: 12px;
  line-height: 1.55;
}

.bubu-auth-private {
  margin: 18px 0 0;
  color: #9a9e96;
  font-size: 11px;
  line-height: 1.65;
}

.web-first-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 560px;
  margin-top: 22px;
  padding: 12px 15px;
  border: 1px solid rgba(102, 124, 95, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: #70796c;
  font-size: 12px;
  line-height: 1.65;
}

.web-first-note span {
  color: #657c5e;
  font-weight: 800;
}

@media (max-width: 760px) {
  #bubu-auth-gate {
    padding: 12px;
  }

  .bubu-auth-shell {
    min-height: auto;
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

  .bubu-auth-story {
    min-height: 180px;
    padding: 28px;
  }

  .bubu-auth-quote strong {
    font-size: 24px;
  }

  .bubu-auth-quote span {
    display: none;
  }

  .bubu-auth-form-wrap {
    padding: 34px 28px 38px;
  }
}
