.auth-page {
  max-width: 560px;
}

.auth-page--register {
  max-width: 1040px;
}

.auth-page__heading {
  margin-bottom: 24px;
}

.auth-page__heading h1 {
  margin: 0;
}

.auth-page__heading p {
  max-width: 760px;
  margin: .65rem 0 0;
  color: var(--ldla-muted);
  line-height: 1.8;
}

.auth-register-layout {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: start;
}

.auth-guide-card,
.auth-card {
  padding: 26px;
}

.auth-guide-card {
  position: sticky;
  top: 106px;
  background: linear-gradient(180deg, #f7faff, #fff);
}

.auth-guide-card h2,
.auth-register-card h2 {
  margin-top: 0;
}

.auth-benefit-list {
  display: grid;
  gap: .8rem;
  padding-left: 1.25rem;
  line-height: 1.7;
}

.auth-notice-box {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: #fffaf3;
}

.auth-notice-box h3 {
  margin: 0 0 .7rem;
  font-size: 1.05rem;
}

.auth-notice-box p {
  margin: .55rem 0 0;
  color: #5f4a34;
  font-size: .94rem;
  line-height: 1.75;
}

.auth-required-note {
  margin: -.2rem 0 1.2rem;
  color: var(--ldla-muted);
  font-size: .92rem;
}

.auth-register-form {
  gap: 22px;
}

.auth-field {
  min-width: 0;
}

.auth-field__label-row,
.auth-birth-field legend {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  font-weight: 800;
}

.auth-field__help,
.auth-field__caution {
  margin: 0 0 8px;
  font-size: .9rem;
  line-height: 1.65;
}

.auth-field__help {
  color: var(--ldla-muted);
}

.auth-field__caution {
  color: #9a5b18;
}

.auth-field-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .12rem .55rem;
  font-size: .73rem;
  font-weight: 900;
  line-height: 1.4;
}

.auth-field-badge--required {
  background: #fff1f2;
  color: #be123c;
}

.auth-field-badge--optional {
  background: #f1f5f9;
  color: #475569;
}

.auth-field.has-error input,
.auth-field.has-error select {
  border-color: #f43f5e;
  background: #fffafb;
}

.auth-field__error {
  margin: 7px 0 0;
  color: #be123c;
  font-size: .9rem;
  font-weight: 700;
}

.auth-birth-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-birth-selects {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(92px, .8fr) minmax(92px, .8fr);
  gap: 10px;
}

.auth-birth-selects label,
.auth-birth-selects select {
  min-width: 0;
}

.auth-password-toggle,
.auth-check-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 10px;
  font-weight: 600;
  line-height: 1.6;
}

.auth-password-toggle input,
.auth-check-label input {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.auth-terms-field {
  padding: 16px;
  border: 1px solid var(--ldla-border);
  border-radius: 14px;
  background: #f8fafc;
}

.auth-terms-field.has-error {
  border-color: #f43f5e;
  background: #fffafb;
}


.auth-terms-agreement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-terms-agreement .auth-check-label {
  margin-top: 0;
}

.auth-terms-open {
  flex: 0 0 auto;
  font-weight: 800;
}

.auth-terms-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(88dvh, 900px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: inherit;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.auth-terms-dialog:not([open]) {
  display: none;
}

.auth-terms-dialog::backdrop {
  background: rgba(15, 23, 42, .62);
}

.auth-terms-dialog__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(88dvh, 900px);
}

.auth-terms-dialog__header,
.auth-terms-dialog__footer {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
}

.auth-terms-dialog__header {
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ldla-border);
}

.auth-terms-dialog__header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.auth-terms-dialog__close {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--ldla-border);
  border-radius: 999px;
  background: #fff;
  color: var(--ldla-text);
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.auth-terms-dialog__body {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 24px 30px;
  line-height: 1.8;
  overscroll-behavior: contain;
}

.auth-terms-dialog__body h2 {
  margin: 28px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--ldla-border);
  font-size: 1.2rem;
}

.auth-terms-dialog__body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.auth-terms-dialog__body p {
  margin: .8rem 0 0;
}

.auth-terms-dialog__body .readme-prohibited-list {
  display: grid;
  gap: .8rem;
  margin-top: 1rem;
}

.auth-terms-dialog__body .readme-prohibited-list p {
  margin: 0;
}

.auth-terms-dialog__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--ldla-border);
}

.auth-submit-button {
  width: 100%;
  min-height: 50px;
  font-size: 1rem;
}

.auth-links {
  margin: 20px 0 0;
  text-align: center;
}

.auth-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

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

@media (max-width: 860px) {
  .auth-register-layout {
    grid-template-columns: 1fr;
  }

  .auth-guide-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .auth-guide-card,
  .auth-card {
    padding: 20px;
  }

  .auth-birth-selects {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 560px) {
  .auth-terms-dialog {
    width: calc(100% - 20px);
    max-height: 92dvh;
    border-radius: 14px;
  }

  .auth-terms-dialog__panel {
    max-height: 92dvh;
  }

  .auth-terms-dialog__header,
  .auth-terms-dialog__footer {
    padding: 14px 16px;
  }

  .auth-terms-dialog__body {
    padding: 20px 16px 26px;
  }

  .auth-terms-dialog__footer .ui-button {
    width: 100%;
  }
}
