.dd-auth[hidden],
.dd-auth [hidden] {
  display: none !important;
}

.dd-auth-trigger {
  margin-left: auto !important;
  color: var(--marigold, #e6b34a) !important;
  white-space: nowrap;
}

.dd-auth-trigger[data-auth-state="pending"]::before,
.dd-auth-trigger[data-auth-state="verified"]::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 2px;
}

.dd-auth-trigger[data-auth-state="verified"]::before {
  background: #62c98c;
  box-shadow: 0 0 0 3px rgba(98, 201, 140, 0.15);
}

body.dd-auth-open {
  overflow: hidden;
}

.dd-auth {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 180ms ease;
}

.dd-auth.is-open {
  opacity: 1;
}

.dd-auth__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(230, 179, 74, 0.13), transparent 32%),
    rgba(5, 7, 6, 0.83);
  backdrop-filter: blur(18px);
  cursor: default;
}

.dd-auth__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(230, 179, 74, 0.28);
  border-radius: 28px;
  color: var(--ink, #f7f0e6);
  background:
    linear-gradient(145deg, rgba(38, 34, 25, 0.98), rgba(14, 16, 14, 0.99) 58%),
    var(--charcoal, #11110f);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(12px) scale(0.985);
  transition: transform 180ms ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 179, 74, 0.35) transparent;
}

.dd-auth.is-open .dd-auth__dialog {
  transform: translateY(0) scale(1);
}

.dd-auth__dialog::-webkit-scrollbar {
  width: 8px;
}

.dd-auth__dialog::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(230, 179, 74, 0.35);
}

.dd-auth__header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 24px;
  border-bottom: 1px solid rgba(247, 240, 230, 0.1);
  background: rgba(19, 19, 16, 0.92);
  backdrop-filter: blur(18px);
}

.dd-auth__identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.dd-auth__mark,
.dd-auth__factor-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(230, 179, 74, 0.35);
  border-radius: 15px;
  color: var(--marigold, #e6b34a);
  background: rgba(230, 179, 74, 0.09);
}

.dd-auth svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dd-auth__header h1,
.dd-auth__panel h2,
.dd-auth__panel h3,
.dd-auth__panel p {
  margin-top: 0;
}

.dd-auth__header h1 {
  margin-bottom: 2px;
  font-family: inherit;
  font-size: clamp(1.22rem, 2.5vw, 1.55rem);
  line-height: 1.2;
}

.dd-auth__header p:last-child {
  max-width: 470px;
  margin: 0;
  color: var(--muted, #cfc4b4);
  font-size: 0.88rem;
}

.dd-auth__eyebrow {
  margin-bottom: 6px !important;
  color: var(--marigold, #e6b34a) !important;
  font-size: 0.73rem !important;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.dd-auth__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(247, 240, 230, 0.22);
  border-radius: 50%;
  color: var(--ink, #f7f0e6);
  background: rgba(8, 9, 8, 0.7);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.dd-auth__close:hover,
.dd-auth__close:focus-visible {
  border-color: var(--marigold, #e6b34a);
  color: var(--marigold, #e6b34a);
  transform: rotate(3deg);
}

.dd-auth__notice {
  margin: 22px 30px 0;
  padding: 13px 16px;
  border: 1px solid rgba(230, 179, 74, 0.28);
  border-radius: 12px;
  color: var(--ink, #f7f0e6);
  background: rgba(230, 179, 74, 0.09);
  font-size: 0.9rem;
}

.dd-auth__notice[data-kind="error"] {
  border-color: rgba(221, 107, 94, 0.48);
  background: rgba(185, 79, 55, 0.14);
}

.dd-auth__notice[data-kind="success"] {
  border-color: rgba(98, 201, 140, 0.42);
  background: rgba(98, 201, 140, 0.1);
}

.dd-auth__panel {
  padding: 32px 30px 34px;
}

.dd-auth__panel--center {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.dd-auth__panel h2 {
  margin-bottom: 10px;
  font-family: inherit;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.14;
}

.dd-auth__panel h3 {
  margin-bottom: 0;
  font-family: inherit;
  font-size: 1.08rem;
}

.dd-auth__panel > p,
.dd-auth__intro > p:last-child {
  color: var(--muted, #cfc4b4);
  line-height: 1.7;
}

.dd-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 30px;
  padding: 5px;
  border: 1px solid rgba(247, 240, 230, 0.1);
  border-radius: 14px;
  background: rgba(5, 6, 5, 0.45);
}

.dd-auth__tabs button {
  min-height: 46px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  color: var(--muted, #cfc4b4);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.dd-auth__tabs button.is-active {
  color: #16140f;
  background: var(--marigold, #e6b34a);
  box-shadow: 0 7px 20px rgba(230, 179, 74, 0.17);
}

.dd-auth__intro {
  margin-bottom: 24px;
}

.dd-auth__form {
  display: grid;
  gap: 18px;
}

.dd-auth__form label {
  display: grid;
  gap: 8px;
  text-align: left;
}

.dd-auth__form label > span {
  color: var(--muted, #cfc4b4);
  font-size: 0.84rem;
  font-weight: 700;
}

.dd-auth__form input {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid rgba(247, 240, 230, 0.2);
  border-radius: 12px;
  outline: 0;
  color: var(--ink, #f7f0e6);
  caret-color: var(--marigold, #e6b34a);
  background: rgba(5, 6, 5, 0.55);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.dd-auth__form input::placeholder {
  color: rgba(207, 196, 180, 0.48);
}

.dd-auth__form input:focus {
  border-color: var(--marigold, #e6b34a);
  background: rgba(5, 6, 5, 0.8);
  box-shadow: 0 0 0 3px rgba(230, 179, 74, 0.12);
}

.dd-auth__signup-field {
  display: grid;
  gap: 8px;
}

.dd-auth__signup-field > label > span,
.dd-auth__avatar-fieldset legend {
  color: var(--muted, #cfc4b4);
  font-size: 0.84rem;
  font-weight: 700;
}

.dd-auth__username-input {
  display: flex;
  align-items: center;
  min-height: 54px;
  border: 1px solid rgba(247, 240, 230, 0.2);
  border-radius: 12px;
  background: rgba(5, 6, 5, 0.55);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.dd-auth__username-input:focus-within {
  border-color: var(--marigold, #e6b34a);
  background: rgba(5, 6, 5, 0.8);
  box-shadow: 0 0 0 3px rgba(230, 179, 74, 0.12);
}

.dd-auth__username-input > span {
  padding-left: 15px;
  color: var(--marigold, #e6b34a);
  font-weight: 800;
}

.dd-auth__username-input input {
  min-height: 52px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dd-auth__username-input input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dd-auth__signup-field > small,
.dd-auth__field-status,
.dd-auth__avatar-fieldset > p {
  margin: 0;
  color: var(--dim, #948979);
  font-size: 0.76rem;
  line-height: 1.45;
}

.dd-auth__field-status[data-kind="error"] {
  color: #f1b0a6;
}

.dd-auth__field-status[data-kind="success"] {
  color: #8ad9aa;
}

.dd-auth__suggestions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dd-auth__suggestions > span {
  color: var(--dim, #948979);
  font-size: 0.73rem;
  font-weight: 700;
}

.dd-auth__suggestions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dd-auth__suggestions button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(230, 179, 74, 0.28);
  border-radius: 999px;
  color: var(--marigold, #e6b34a);
  background: rgba(230, 179, 74, 0.06);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.dd-auth__suggestions button:hover,
.dd-auth__suggestions button:focus-visible {
  border-color: var(--marigold, #e6b34a);
  background: rgba(230, 179, 74, 0.13);
}

.dd-auth__avatar-fieldset {
  min-width: 0;
  margin: 2px 0 4px;
  padding: 17px;
  border: 1px solid rgba(247, 240, 230, 0.12);
  border-radius: 16px;
  background: rgba(5, 6, 5, 0.3);
}

.dd-auth__avatar-fieldset legend {
  padding: 0 7px;
}

.dd-auth__avatar-fieldset > p {
  margin-bottom: 14px;
}

.dd-auth__avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dd-auth__avatar-option {
  position: relative;
  display: block !important;
  cursor: pointer;
}

.dd-auth__avatar-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dd-auth__avatar-card {
  display: grid;
  gap: 8px;
  height: 100%;
  padding: 7px;
  border: 1px solid rgba(247, 240, 230, 0.13);
  border-radius: 13px;
  color: var(--muted, #cfc4b4);
  background: rgba(13, 14, 12, 0.76);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.dd-auth__avatar-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 9px;
  object-fit: cover;
  object-position: center 18%;
}

.dd-auth__avatar-option:hover .dd-auth__avatar-card {
  border-color: rgba(230, 179, 74, 0.5);
  transform: translateY(-1px);
}

.dd-auth__avatar-option input:focus-visible + .dd-auth__avatar-card,
.dd-auth__avatar-option input:checked + .dd-auth__avatar-card {
  border-color: var(--marigold, #e6b34a);
  color: #17130b;
  background: var(--marigold, #e6b34a);
  box-shadow: 0 0 0 3px rgba(230, 179, 74, 0.14);
}

.dd-auth__primary,
.dd-auth__secondary,
.dd-auth__danger,
.dd-auth__link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 20px;
  border-radius: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease, border-color 150ms ease;
}

.dd-auth__primary {
  border: 1px solid #f3cb77;
  color: #18140c;
  background: var(--marigold, #e6b34a);
  box-shadow: 0 10px 25px rgba(230, 179, 74, 0.17);
}

.dd-auth__primary:hover,
.dd-auth__link-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.dd-auth__primary:disabled {
  cursor: wait;
  filter: grayscale(0.3);
  opacity: 0.58;
}

.dd-auth__secondary {
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid rgba(230, 179, 74, 0.42);
  color: var(--marigold, #e6b34a);
  background: rgba(230, 179, 74, 0.07);
}

.dd-auth__danger {
  width: 100%;
  margin-top: 24px;
  border: 1px solid rgba(221, 107, 94, 0.36);
  color: #f1b0a6;
  background: rgba(185, 79, 55, 0.08);
}

#dd-auth-social {
  width: 100%;
  margin-top: 24px;
}

#dd-auth-social + .dd-auth__danger {
  margin-top: 12px;
}

.dd-auth__text-action {
  display: block;
  min-height: 44px;
  margin: 12px auto 0;
  padding: 10px 12px;
  border: 0;
  color: var(--marigold, #e6b34a);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.dd-auth__privacy {
  margin: 12px 0 0 !important;
  color: var(--dim, #948979) !important;
  font-size: 0.78rem;
  text-align: center;
}

.dd-auth__hero-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 2px auto 22px;
  border: 1px solid rgba(230, 179, 74, 0.4);
  border-radius: 24px;
  color: var(--marigold, #e6b34a);
  background: rgba(230, 179, 74, 0.09);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.dd-auth__hero-icon svg {
  width: 38px;
  height: 38px;
}

.dd-auth__form--code {
  width: min(360px, 100%);
  margin: 24px auto 0;
}

.dd-auth__code {
  font-size: 1.55rem !important;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  text-indent: 0.35em;
}

.dd-auth__enrollment {
  display: grid;
  grid-template-columns: minmax(190px, 230px) 1fr;
  gap: 22px;
  align-items: center;
  margin: 25px 0;
  padding: 22px;
  border: 1px solid rgba(247, 240, 230, 0.12);
  border-radius: 18px;
  background: rgba(5, 6, 5, 0.38);
}

.dd-auth__qr-wrap {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.dd-auth__qr-wrap > span,
.dd-auth__manual > span {
  color: var(--dim, #948979);
  font-size: 0.75rem;
}

.dd-auth__qr {
  display: block;
  width: 210px;
  max-width: 100%;
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}

.dd-auth__manual {
  min-width: 0;
}

.dd-auth__manual strong {
  display: block;
  margin: 4px 0 14px;
}

.dd-auth__secret-row {
  display: grid;
  gap: 8px;
}

.dd-auth__secret-row code {
  display: block;
  overflow-wrap: anywhere;
  padding: 12px;
  border: 1px solid rgba(247, 240, 230, 0.13);
  border-radius: 10px;
  color: var(--ink, #f7f0e6);
  background: rgba(0, 0, 0, 0.28);
  font-size: 0.82rem;
  line-height: 1.55;
}

.dd-auth__copy {
  min-height: 42px;
  border: 1px solid rgba(230, 179, 74, 0.32);
  border-radius: 9px;
  color: var(--marigold, #e6b34a);
  background: rgba(230, 179, 74, 0.06);
  font-weight: 700;
  cursor: pointer;
}

.dd-auth__loading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  color: var(--muted, #cfc4b4);
}

.dd-auth__loading span {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(230, 179, 74, 0.24);
  border-top-color: var(--marigold, #e6b34a);
  border-radius: 50%;
  animation: dd-auth-spin 700ms linear infinite;
}

@keyframes dd-auth-spin {
  to { transform: rotate(360deg); }
}

.dd-auth__account-heading,
.dd-auth__factor-heading,
.dd-auth__security-card,
.dd-auth__factor,
.dd-auth__security-copy {
  display: flex;
  align-items: center;
}

.dd-auth__account-heading,
.dd-auth__factor-heading,
.dd-auth__security-card,
.dd-auth__factor {
  justify-content: space-between;
  gap: 18px;
}

.dd-auth__account-heading h2 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
}

.dd-auth__profile-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.dd-auth__profile-heading > div {
  min-width: 0;
}

.dd-auth__profile-avatar {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  border: 2px solid var(--marigold, #e6b34a);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.dd-auth__account-email {
  margin: 4px 0 0 !important;
  overflow-wrap: anywhere;
  color: var(--dim, #948979);
  font-size: 0.78rem;
}

.dd-auth__verified {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid rgba(98, 201, 140, 0.36);
  border-radius: 999px;
  color: #8ad9aa;
  background: rgba(98, 201, 140, 0.08);
  font-size: 0.76rem;
  font-weight: 800;
}

.dd-auth__verified svg {
  width: 17px;
  height: 17px;
}

.dd-auth__security-card {
  margin: 27px 0 32px;
  padding: 18px;
  border: 1px solid rgba(230, 179, 74, 0.3);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(230, 179, 74, 0.1), rgba(98, 201, 140, 0.06));
}

.dd-auth__security-copy {
  gap: 13px;
}

.dd-auth__security-copy .dd-auth__mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.dd-auth__security-copy strong,
.dd-auth__security-copy span {
  display: block;
}

.dd-auth__security-copy span {
  margin-top: 2px;
  color: var(--muted, #cfc4b4);
  font-size: 0.8rem;
}

.dd-auth__aal {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 8px;
  color: #111;
  background: var(--marigold, #e6b34a);
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.dd-auth__factor-heading {
  margin-bottom: 14px;
}

.dd-auth__factors {
  display: grid;
  gap: 10px;
}

.dd-auth__factor {
  padding: 14px;
  border: 1px solid rgba(247, 240, 230, 0.12);
  border-radius: 14px;
  background: rgba(5, 6, 5, 0.38);
}

.dd-auth__factor-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.dd-auth__factor > div {
  flex: 1;
  min-width: 0;
}

.dd-auth__factor strong,
.dd-auth__factor > div span {
  display: block;
}

.dd-auth__factor > div span {
  margin-top: 2px;
  color: var(--dim, #948979);
  font-size: 0.78rem;
}

.dd-auth__factor button {
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid rgba(221, 107, 94, 0.3);
  border-radius: 9px;
  color: #f1b0a6;
  background: rgba(185, 79, 55, 0.08);
  cursor: pointer;
}

.dd-auth__factor-required {
  color: var(--marigold, #e6b34a);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dd-auth__callout {
  display: grid;
  gap: 4px;
  margin: 22px 0;
  padding: 16px;
  border-left: 3px solid var(--marigold, #e6b34a);
  border-radius: 4px 12px 12px 4px;
  background: rgba(230, 179, 74, 0.07);
}

.dd-auth__callout span {
  color: var(--muted, #cfc4b4);
  font-size: 0.84rem;
}

.dd-auth__panel code {
  color: var(--marigold, #e6b34a);
}

@media (max-width: 760px) {
  .dd-auth {
    align-items: end;
    padding: 0;
  }

  .dd-auth__dialog {
    width: 100%;
    max-height: 92dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
  }

  .dd-auth__header {
    padding: 20px;
  }

  .dd-auth__header p:last-child {
    display: none;
  }

  .dd-auth__identity {
    gap: 12px;
  }

  .dd-auth__header .dd-auth__mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .dd-auth__close {
    width: 44px;
    height: 44px;
  }

  .dd-auth__notice {
    margin: 16px 20px 0;
  }

  .dd-auth__panel {
    padding: 25px 20px calc(30px + env(safe-area-inset-bottom));
  }

  .dd-auth__enrollment {
    grid-template-columns: 1fr;
    padding: 17px;
  }

  .dd-auth__avatar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dd-auth__account-heading,
  .dd-auth__factor-heading {
    align-items: flex-start;
  }

  .dd-auth__verified {
    font-size: 0;
  }

  .dd-auth__verified svg {
    width: 20px;
    height: 20px;
  }

  .dd-auth__security-card {
    align-items: flex-start;
  }

  .dd-auth__security-copy .dd-auth__mark {
    display: none;
  }
}

@media (max-width: 520px) {
  .dd-auth__mark {
    display: none;
  }

  .dd-auth__factor-heading {
    display: grid;
  }

  .dd-auth__factor-heading .dd-auth__secondary {
    width: 100%;
  }

  .dd-auth__avatar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dd-auth__profile-avatar {
    width: 58px;
    height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dd-auth,
  .dd-auth__dialog,
  .dd-auth__primary,
  .dd-auth__close {
    transition: none;
  }
}
