.auth-modal {
  --glass: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .015));
  --line-strong: rgba(224, 229, 228, .50);
  --success: #b6d4c3;
  --heading-font: "Manrope", system-ui, sans-serif;
  color: var(--ink, #f3f0e8);
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  position: fixed;
  inset: 0;
  z-index: 190;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(18, 23, 27, .68);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.auth-modal.is-open {
  display: grid;
}

.auth-card {
  position: relative;
  width: min(500px, calc(100vw - 32px));
  max-height: 92svh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--glass), rgba(32, 38, 42, .9);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  scrollbar-color: #879498 transparent;
  scrollbar-width: thin;
}

.auth-card [hidden] {
  display: none;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(0, 0, 0, .42);
  font-size: 22px;
  font-weight: 600;
}

.auth-card h2 {
  margin: 0;
  padding-right: 30px;
  font-family: var(--heading-font);
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.03em;
}

.auth-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.auth-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 26px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 23, 27, .25);
}

.auth-mode button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
}

.auth-mode button.is-active {
  border-color: var(--line-strong);
  color: #202428;
  background: #E0E5E4;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .035em;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-profile-form input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: rgba(16, 21, 25, .3);
  font-size: 16px;
}

.auth-form input:focus {
  border-color: var(--accent);
}

.auth-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
  text-transform: none;
}

.auth-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.auth-turnstile {
  min-height: 65px;
}

.auth-turnstile[hidden] {
  display: none;
}

.auth-secondary {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: var(--glass), rgba(224, 229, 228, .025);
  font-size: 12px;
  font-weight: 500;
}

.auth-link-button {
  min-height: 36px;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-weight: 600;
  text-align: center;
}

.auth-link-button:hover {
  color: var(--ink);
}

.auth-reset-password-field {
  display: grid;
  gap: 10px;
}

.auth-reset-password-field[hidden] {
  display: none;
}

.auth-user-panel {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(224, 229, 228, .045);
}

.auth-user-panel > span {
  color: var(--muted);
  font-size: 12px;
}

.auth-user-panel > strong {
  overflow-wrap: anywhere;
}

.auth-profile-form {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-profile-form > label:not(.auth-check) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .035em;
}

.auth-profile-form .auth-secondary {
  width: 100%;
}

.auth-security-panel {
  display: grid;
  gap: 9px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-try-on-panel {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-try-on-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.auth-try-on-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-try-on-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-try-on-head strong {
  color: var(--ink);
  font-size: 14px;
}

.auth-try-on-head .auth-secondary {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.auth-security-panel strong {
  color: var(--ink);
  font-size: 14px;
}

.auth-security-panel small,
.auth-try-on-panel small,
.auth-device-list span,
.auth-device-list small {
  color: var(--muted);
  font-size: 12px;
}

.auth-device-list {
  display: grid;
  gap: 7px;
}

.auth-device-list article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: rgba(0, 0, 0, .16);
}

.auth-device-list article strong {
  color: var(--accent);
  font-size: 13px;
}

.auth-secondary.danger {
  border-color: rgba(255, 179, 170, .38);
  color: #ffcbc5;
}

.auth-secondary.danger[hidden] {
  display: none;
}

.auth-message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--accent);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.auth-message[data-tone="error"] {
  color: #ffb3aa;
}

.auth-message[data-tone="success"] {
  color: var(--success);
}
.auth-modal::backdrop { background: transparent; }
.auth-modal .action-primary { min-height: 46px; border: 0; border-radius: 8px; color: #202428; background: #e0e5e4; font: inherit; font-weight: 650; }
.auth-modal .eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 11px; }
.account-entry { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 14px; border: 1px solid rgba(224,229,228,.34); border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.account-help-actions { display: flex; align-items: center; gap: 12px; }
.site-header .account-entry { margin-left: auto; }
@media(max-width:600px) {
  .account-help-actions { gap: 6px; }
  .account-entry { padding: 8px 10px; }
  .auth-card { max-height: 90svh; padding: 26px 20px; }
}
