* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #070909;
}

body.jiling-auth-page {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: #edf2f1;
  background: #070909;
}

html.jiling-miniapp-embed body.jiling-auth-page { min-width: 0; }
html.jiling-miniapp-embed .jiling-auth-header { display: none; }
html.jiling-miniapp-embed .auth-shell { min-height: 100svh; padding: 0; }
html.jiling-miniapp-embed .auth-panel { width: min(100%, 390px); padding: 26px 22px 22px; }

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

.jiling-auth-header {
  position: fixed;
  z-index: 4;
  top: 0;
  left: 0;
  width: 100%;
  height: 72px;
  border-bottom: 0;
}

.jiling-auth-header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 255, 255, .1);
  pointer-events: none;
}

.jiling-auth-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, calc(100% - 80px));
  height: 100%;
  margin: 0 auto;
}

.jiling-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.jiling-wordmark img {
  width: 48px;
  height: 48px;
  margin-right: -4px;
  margin-bottom: -4px;
  object-fit: contain;
  transform: translateY(-2px);
}

.jiling-wordmark span {
  display: grid;
  gap: 2px;
}

.jiling-wordmark b {
  font: inherit;
}

.jiling-wordmark small {
  color: rgba(255, 255, 255, .48);
  font-size: 8px;
  font-weight: 500;
}

.hzs-return {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  color: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 11px;
  transition: color .2s ease, background-color .2s ease;
}

.hzs-return:hover,
.hzs-return:focus-visible {
  color: #0a0d0d;
  background: #f4f7f6;
}

.hzs-return svg {
  width: 13px;
  height: 13px;
}

.auth-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 96px 24px 40px;
}

.jiling-source-panel {
  position: absolute;
  inset: 72px 0 0;
  width: 100%;
  min-height: calc(100svh - 72px);
  background: #070909;
}

.jiling-source-frame {
  display: block;
  width: 100%;
  height: calc(100svh - 72px);
  border: 0;
  background: #070909;
}

html.jiling-miniapp-embed .jiling-source-panel {
  inset: 0;
  min-height: 100svh;
}

html.jiling-miniapp-embed .jiling-source-frame {
  height: 100svh;
}

.auth-panel {
  width: min(100%, 420px);
  padding: 30px 32px 26px;
  background: rgba(10, 13, 13, .96);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
}

.auth-heading {
  margin-bottom: 25px;
}

.auth-heading p {
  margin: 0 0 9px;
  color: #87c8c3;
  font-size: 9px;
}

.auth-heading h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: 0;
}

.auth-heading > span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, .48);
  font-size: 12px;
}

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

.auth-field {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 11px;
}

.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: #f2f5f4;
  background: #111515;
  border: 1px solid #343b3a;
  border-radius: 4px;
  outline: 0;
}

.auth-field input:hover {
  border-color: #4b5554;
}

.auth-field input:focus {
  border-color: #78bcb7;
  box-shadow: 0 0 0 2px rgba(120, 188, 183, .12);
}

.password-control,
.auth-code-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
}

.password-control input {
  grid-column: 1 / -1;
  grid-row: 1;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: rgba(255, 255, 255, .48);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.password-toggle svg {
  width: 17px;
  height: 17px;
}

.auth-code-row {
  gap: 8px;
}

.auth-code-row button {
  min-width: 94px;
  padding: 0 12px;
  color: #d8e6e4;
  background: #1b2322;
  border: 1px solid #394442;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
}

.auth-options > span {
  display: flex;
  gap: 13px;
}

.auth-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.auth-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-options label i {
  display: block;
  width: 12px;
  height: 12px;
  border: 1px solid #596361;
}

.auth-options input:checked + i {
  background: #83c9c3;
  border-color: #83c9c3;
  box-shadow: inset 0 0 0 3px #111515;
}

.auth-options button,
.auth-mode-switch button {
  padding: 0;
  color: #8fcac5;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: inherit;
}

.auth-status {
  min-height: 16px;
  margin: -2px 0 0;
  color: rgba(255, 255, 255, .4);
  font-size: 10px;
  line-height: 1.6;
}

.auth-status.is-error {
  color: #ef8d82;
}

.auth-status.is-success {
  color: #8bd5ae;
}

.auth-submit {
  display: grid;
  grid-template-columns: 32px 1fr 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  padding: 0 14px 0 8px;
  color: #07100f;
  background: #d9eeee;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background-color .2s ease, transform .2s ease;
}

.auth-submit:hover {
  background: #f0f8f7;
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: .62;
}

.auth-submit img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: invert(1);
}

.auth-submit span {
  text-align: left;
}

.auth-submit svg {
  width: 17px;
  height: 17px;
}

.auth-mode-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  color: rgba(255, 255, 255, .45);
  font-size: 10px;
}

.auth-announcement {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 9px;
  margin-top: 22px;
  padding-top: 17px;
  color: rgba(255, 255, 255, .42);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-announcement > svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.auth-announcement p {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.auth-announcement strong {
  color: rgba(255, 255, 255, .65);
  font-weight: 500;
}

.hzs-announcement-panel {
  position: relative;
  width: min(78vw, 55.714svh, 786px);
  min-height: 0;
  aspect-ratio: 5 / 7;
  padding: clamp(54px, 7vh, 78px) clamp(44px, 6vw, 60px) clamp(34px, 5vh, 48px);
  overflow: hidden;
  background: rgba(8, 11, 11, .98);
  border-color: rgba(255, 255, 255, .18);
  border-radius: 11px;
  box-shadow: 0 36px 100px rgba(0, 0, 0, .48);
}

.hzs-announcement-panel:not([hidden]) {
  display: grid;
  grid-template-rows: auto minmax(160px, 1fr) minmax(120px, .72fr) auto;
}

.hzs-announcement-eyebrow {
  align-self: start;
  margin: 0;
  color: #8fcac5;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
}

.hzs-announcement-heading {
  align-self: center;
  margin: 0;
  text-align: center;
}

.hzs-announcement-heading h1 {
  font-size: var(--hzs-announcement-title-size, clamp(31px, 3.3vw, 46px));
  line-height: 1.3;
  font-weight: 300;
  white-space: pre-line;
}

.hzs-announcement-heading > span {
  max-width: 26em;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, .76);
  font-size: var(--hzs-announcement-body-size, clamp(17px, 2vw, 25px));
  line-height: 1.65;
  font-weight: 300;
  white-space: pre-line;
}

.hzs-announcement-mark {
  align-self: center;
  justify-self: center;
  width: clamp(104px, 15vw, 156px);
  height: clamp(104px, 15vw, 156px);
  object-fit: contain;
  opacity: .92;
}

.hzs-announcement-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.hzs-announcement-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .54);
  font-size: 11px;
  text-decoration: none;
  transition: color .2s ease;
}

.hzs-announcement-action:hover,
.hzs-announcement-action:focus-visible {
  color: #fff;
}

.hzs-announcement-action svg {
  width: 14px;
  height: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .jiling-auth-header-inner {
    width: min(calc(100% - 40px), 820px);
  }
}
@media (max-width: 700px) {
  .jiling-auth-header {
    height: 64px;
  }

  .jiling-auth-header-inner {
    width: calc(100% - 32px);
  }

  .jiling-wordmark img {
    width: 32px;
    height: 32px;
  }

  .auth-shell {
    align-items: start;
    padding: 84px 14px 24px;
  }

  .auth-panel {
    padding: 26px 22px 22px;
  }

  .hzs-announcement-panel {
    width: min(100%, 55.714svh, calc(71.428svh - 77px), 540px);
    min-height: 0;
    aspect-ratio: 5 / 7;
    padding: 34px 26px 26px;
    border-radius: 8px;
  }

  .hzs-announcement-panel:not([hidden]) {
    grid-template-rows: auto minmax(150px, 1fr) minmax(120px, .72fr) auto;
  }

  .hzs-announcement-eyebrow {
    font-size: 11px;
  }

  .hzs-announcement-heading h1 {
    font-size: min(var(--hzs-announcement-title-size, 35px), 9vw, 38px);
  }

  .hzs-announcement-heading > span {
    margin-top: 14px;
    font-size: min(var(--hzs-announcement-body-size, 21px), 5.4vw, 24px);
  }

  .hzs-announcement-mark {
    width: 112px;
    height: 112px;
  }
}

html.jiling-miniapp-embed .hzs-announcement-panel {
  width: min(calc(100% - 28px), 55.714svh, 540px);
  min-height: 0;
  aspect-ratio: 5 / 7;
  padding: 34px 26px 26px;
}

body[data-jiling-bridge-mode="hzs-announcement"] .auth-shell {
  place-items: center;
}

body[data-jiling-bridge-device="mobile"] .local-download-button,
body[data-jiling-bridge-device="miniapp"] .local-download-button,
html.jiling-miniapp-embed .local-download-button {
  display: none;
}

@media (max-width: 420px) {
  .jiling-wordmark small,
  .hzs-return span {
    display: none;
  }

  .hzs-return {
    width: 36px;
    padding: 0;
    justify-content: center;
  }

  .auth-options {
    align-items: flex-start;
  }

  .auth-options > span {
    flex-direction: column;
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* Match the HZS header coordinate system */
.jiling-auth-header {
  height: 86px;
}

.jiling-wordmark {
  gap: 14px;
  font-size: 17px;
}

.jiling-wordmark span {
  gap: 4px;
}

.jiling-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jiling-header-spacer {
  display: block;
  flex: 0 0 auto;
  visibility: hidden;
  pointer-events: none;
}

.jiling-header-spacer-language {
  width: 38px;
  height: 38px;
}

.jiling-header-spacer-menu {
  display: none;
  width: 40px;
  height: 40px;
}

@media (max-width: 900px) {
  .jiling-header-spacer-menu {
    display: block;
  }
}

@media (max-width: 700px) {
  .jiling-auth-header {
    height: 68px;
  }

  .jiling-wordmark img {
    width: 42px;
    height: 42px;
  }
}
/* Transparent HZS quick-switch mark */
.hzs-return-logo {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: invert(1) brightness(1.12);
}

.hzs-return:hover .hzs-return-logo,
.hzs-return:focus-visible .hzs-return-logo {
  filter: brightness(.16);
}

@media (max-width: 420px) {
  .hzs-return i,
  .hzs-return svg {
    display: none;
  }
}
/* Local client download slot */
.hzs-return {
  height: 38px;
  padding: 0 10px 0 7px;
  background: rgba(255, 255, 255, .035);
  border-radius: 999px;
}

.local-download-button {
  display: inline-flex;
  flex: 0 0 96px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 96px;
  height: 38px;
  padding: 0 9px;
  color: rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.local-download-button:hover,
.local-download-button:focus-visible {
  color: #0a0d0d;
  background: #f4f7f6;
  border-color: #f4f7f6;
}

.local-download-button svg {
  width: 13px;
  height: 13px;
}

.local-download-button:disabled {
  cursor: not-allowed;
  opacity: .58;
}

@media (max-width: 700px) {
  .hzs-return {
    flex-basis: 38px;
    width: 38px;
    padding: 0;
    justify-content: center;
  }

  .local-download-button {
    display: none;
  }

  .hzs-return span,
  .hzs-return i,
  .hzs-return svg {
    display: none;
  }
}
/* R29 transparent-logo login hotspot */
.auth-submit.is-logo-submit {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  justify-self: center;
  width: 78px;
  min-width: 78px;
  height: 78px;
  min-height: 78px;
  margin: 20px auto 4px;
  padding: 0;
  color: transparent;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}

.auth-submit.is-logo-submit:hover {
  background: transparent;
}

.auth-submit.is-logo-submit:focus-visible {
  outline: 2px solid rgba(120, 188, 183, .72);
  outline-offset: 6px;
}

.auth-submit.is-logo-submit:active {
  transform: translateY(1px);
}

.auth-submit.is-logo-submit:disabled {
  cursor: wait;
  opacity: .62;
}

.auth-submit.is-logo-submit img {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: contain;
  filter: none;
  pointer-events: none;
  user-select: none;
}

.auth-submit-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
