body:is(.xh-public-home, .xh-auth-page) {
  display: flex;
  flex-direction: column;
  min-height: calc(100 * var(--xh-layout-svh, 1svh));
}

.xh-auth-page .xh-home-wrap {
  width: min(112rem, calc(100% - clamp(2rem, 6vw, 8rem)));
}

.xh-auth-page .xh-home-footer .xh-account-footer { justify-content: center; min-height: 3rem; }
.xh-auth-page .xh-account-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--xh-space-sm); text-align: center; }

.xh-auth-page { background: radial-gradient(ellipse at 30% 0%, #e1f2eb, transparent 62%), #f5f9f7; }
.xh-auth-page .xh-auth-header { display: flex; justify-content: space-between; min-height: 4.25rem; }
.xh-auth-back, .xh-auth-help a { color: var(--home-accent); text-decoration: underline; text-underline-offset: .2em; }
.xh-auth-main { flex: 1; display: grid; align-content: center; justify-items: center; gap: var(--xh-space-lg); padding: 2rem 1rem; }
.xh-auth-page #dljAuthMask.xhInlineAuth { width: min(100%, 31rem); }
:is(.xh-auth-page, .xh-auth-dialog) #dljAuthMask .dljAuthModal {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--home-line);
  border-radius: 18px;
  background: var(--home-panel);
  box-shadow: 0 15px 50px #284e3c14;
}
:is(.xh-auth-page, .xh-auth-dialog) #dljAuthTitle { margin: 0; font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.2; }
:is(.xh-auth-page, .xh-auth-dialog) #xhHomeAuthSubtitle { margin: .6rem 0 1.35rem; color: var(--home-muted); }
:is(.xh-auth-page, .xh-auth-dialog) .dljAuthField { margin-bottom: var(--xh-space-md); }
:is(.xh-auth-page, .xh-auth-dialog) .dljAuthField label { display: block; margin-bottom: 5px; font-weight: 650; }
:is(.xh-auth-page, .xh-auth-dialog) #dljAuthMask .dljAuthInput {
  width: 100%;
  height: var(--xh-control-field-height);
  padding-inline: var(--xh-space-md);
  border: 1px solid var(--home-line);
  border-radius: var(--xh-control-radius);
  font-family: inherit;
}
:is(.xh-auth-page, .xh-auth-dialog) .xhPasswordWrap { position: relative; }
:is(.xh-auth-page, .xh-auth-dialog) #dljAuthMask .xhPasswordWrap input { padding-inline-end: 4.25rem; }
:is(.xh-auth-page, .xh-auth-dialog) .xhPasswordToggle {
  position: absolute;
  inset: 4px 4px 4px auto;
  min-width: 48px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
:is(.xh-auth-page, .xh-auth-dialog) #dljAuthMask .dljAuthSubmit {
  display: flex;
  width: 100%;
  min-height: var(--xh-control-primary-height);
  align-items: center;
  justify-content: center;
  padding: var(--xh-space-sm);
  border: 1px solid var(--home-accent);
  border-radius: var(--xh-control-radius);
  background: var(--home-accent);
  color: #fff;
  font: 650 16px/1.4 var(--xh-type-family);
  text-align: center;
  cursor: pointer;
}
:is(.xh-auth-page, .xh-auth-dialog) #dljAuthMask .dljAuthSubmit:hover { background: var(--home-primary-hover); }
:is(.xh-auth-page, .xh-auth-dialog) #dljAuthMask .dljAuthSubmit:disabled { opacity: .6; cursor: wait; }
:is(.xh-auth-page, .xh-auth-dialog) .dljAuthHint { margin-top: var(--xh-space-md); }
:is(.xh-auth-page, .xh-auth-dialog) .dljAuthStatus:not(:empty) { margin-top: var(--xh-space-sm); }
.xh-auth-help { margin: 0; color: var(--home-muted); font-size: var(--xh-type-detail); text-align: center; }
:is(.xh-auth-page, .xh-auth-dialog) .xhCompleteMark { color: var(--home-accent); font-size: 2rem; }

.xh-auth-dialog {
  position: fixed;
  inset: 0;
  width: min(31rem, calc(100% - 2rem));
  max-height: calc(100 * var(--xh-layout-dvh, 1dvh) - 2rem);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--home-line);
  border-radius: 18px;
  background: var(--home-panel);
  color: var(--home-text);
  box-shadow: 0 20px 70px #123e3066;
}

.xh-auth-dialog::backdrop { background: #102c2380; }
html:has(.xh-auth-dialog[open]) { overflow: hidden; }

.xh-auth-dialog #dljAuthMask .dljAuthModal { border: 0; border-radius: 0; box-shadow: none; }
.xh-auth-dialog #dljAuthTitle { padding-inline-end: 2.5rem; }

.xh-auth-dialog-close {
  position: absolute;
  z-index: 1;
  inset: 12px 12px auto auto;
  margin: 0;
}

.xh-auth-dialog-close button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--home-soft);
  color: var(--home-accent);
  font: 25px/1 system-ui, sans-serif;
  cursor: pointer;
}

.xh-auth-dialog-close button:hover { background: #d9efe6; }
#xhHomeAuthLoading { margin: 0; padding: 2rem 4rem 2rem 1.25rem; }
#xhHomeAuthLoading:empty { display: none; }

@media (max-width: 520px) {
  .xh-auth-page .xh-auth-main { align-content: start; }
}
