/* One scoped owner for account access. The existing modal owns focus and inert. */
.modal-backdrop:has(.auth-access) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgb(0 0 0 / .72);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.modal:has(> .auth-access) {
  width: min(440px, 100%);
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--pf-line-strong, #3a3d3f);
  border-radius: 8px;
  background: var(--pf-surface, #111213);
  color: var(--pf-ink, #f2f0e9);
  box-shadow: 0 24px 80px rgb(0 0 0 / .5);
  transform: none;
  animation: none;
}
.auth-access { min-width: 0; font-family: var(--pf-sans, sans-serif); }
.modal .auth-access__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 22px 18px 20px 24px;
  border-bottom: 1px solid var(--pf-line, #292b2c);
  background: var(--pf-surface, #111213);
}
.auth-access__eyebrow { display: block; margin-bottom: 6px; color: var(--pf-muted, #aaa9a2); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.auth-access__head h2 { margin: 0; color: var(--pf-ink, #f2f0e9); font-size: 27px; font-weight: 500; letter-spacing: -.045em; line-height: 1.15; }
.modal .auth-access .close-button { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--pf-line, #292b2c); border-radius: 4px; background: transparent; color: var(--pf-text, #cfceca); font-size: 24px; line-height: 1; }
.auth-access__body { min-width: 0; padding: 20px 24px 24px; }
.auth-access .auth-access__back { display:flex; min-height:44px; align-items:center; gap:10px; padding:10px 0; border:0; border-radius:0; background:transparent; color:var(--pf-text,#cfceca); font-size:13px; box-shadow:none; text-align:left; cursor:pointer; }
.auth-access .auth-access__back { margin:-6px 0 12px; }
.auth-access .auth-access__methods-link { display:block; min-height:44px; margin:14px auto 0; padding:8px 12px; border:0; background:transparent; color:var(--pf-text,#cfceca); font-size:12px; text-decoration:underline; text-underline-offset:3px; box-shadow:none; cursor:pointer; }
.auth-access__methods-note { margin:0 0 18px; color:var(--pf-muted,#aaa9a2); font-size:12px; line-height:1.5; }
.auth-access :is(.auth-access__methods-link,.auth-access__back):disabled { opacity:.6; cursor:wait; }
.auth-access :is(button, a, summary, input) { font: inherit; }
.auth-access :is(button, a, summary):focus-visible { outline: 2px solid var(--pf-gold, #d9b55c); outline-offset: 3px; }
.auth-access :is(button, a, summary) { touch-action: manipulation; }
.auth-access :is(p, strong, small, button, label) { overflow-wrap: anywhere; }
.auth-access :is(button, input, summary) { min-height: 44px; }
.auth-access svg { display: block; flex-shrink: 0; width: 20px; height: 20px; }
.auth-access .auth-access__intent { margin: 0 0 17px; padding: 0; border: 0; background: transparent; color: var(--pf-text, #cfceca); font-size: 12px; line-height: 1.6; text-align: left; }
.auth-access .auth-access__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 20px; padding: 0; border: 0; border-bottom: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 0; background: none; }
.modal .auth-access .auth-access__tabs [role="tab"] { position: relative; min-height: 44px; margin: 0 0 -1px; padding: 10px 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--pf-muted, #aaa9a2); font-size: 13px; font-weight: 500; box-shadow: none; }
.modal .auth-access .auth-access__tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--pf-gold, #d9b55c); background: transparent; color: var(--pf-ink, #f2f0e9); box-shadow: none; }
.auth-access__social { display: grid; gap: 10px; min-width: 0; }
.auth-access .auth-provider-shell { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 44px; }
.auth-access .auth-google-button { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: center; overflow: hidden; }
.auth-access__google-loading { display: grid; width: 100%; min-height: 44px; place-items: center; border: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 4px; color: var(--pf-muted, #aaa9a2); font-size: 12px; }
.auth-access .auth-access__social-button { display: grid; grid-template-columns: 20px minmax(0, 1fr) 20px; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 1px solid var(--pf-line-strong,#3a3d3f); border-radius: 4px; background: var(--pf-surface-2,#18191a); color: var(--pf-ink,#f2f0e9); font-size: 14px; font-weight: 500; text-align: center; box-shadow: none; }
.auth-access .auth-access__social-button:disabled { border-color: var(--pf-line-strong, #3a3d3f); background: var(--pf-surface-2, #18191a); color: var(--pf-muted, #aaa9a2); opacity: 1; cursor: not-allowed; }
.auth-access__availability { margin: 0; color: var(--pf-muted, #aaa9a2); font-size: 11px; line-height: 1.5; }
.auth-access__divider { display: flex; align-items: center; gap: 12px; margin-block: 18px; color: var(--pf-muted, #aaa9a2); font-size: 11px; }
.auth-access__divider::before, .auth-access__divider::after { height: 1px; flex: 1; background: var(--pf-line, #292b2c); content: ""; }
.auth-access .auth-access__form { display: grid; gap: 15px; margin: 0; }
.auth-access__form > label, .auth-access__field { display: grid; gap: 7px; color: var(--pf-text, #cfceca); font-size: 12px; font-weight: 500; }
.auth-access .field { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; border: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 4px; background: var(--pf-surface-2, #18191a); color: var(--pf-ink, #f2f0e9); font-size: 16px; font-weight: 400; line-height: 1.4; box-shadow: none; }
.auth-access .field:focus { border-color: var(--pf-gold, #d9b55c); outline: 1px solid var(--pf-gold, #d9b55c); outline-offset: 0; box-shadow: none; }
.auth-access .field[aria-invalid="true"] { border-color: #e4a6a1; }
.auth-access__form small { color: var(--pf-muted, #aaa9a2); font-size: 11px; font-weight: 400; line-height: 1.5; }
.auth-access__password { position: relative; display: flex; min-width: 0; }
.auth-access__password .field { padding-right: 52px; }
.auth-access .auth-access__password-toggle { position: absolute; inset: 1px 1px 1px auto; display: grid; width: 44px; padding: 0; place-items: center; border: 0; border-radius: 3px; background: transparent; color: var(--pf-muted, #aaa9a2); font-size: 11px; box-shadow: none; }
.auth-access__password-toggle[aria-pressed="true"] { color: var(--pf-gold, #d9b55c); }
.auth-access .auth-access__submit { width: 100%; min-height: 48px; margin-top: 3px; padding: 12px 14px; border: 1px solid var(--pf-gold, #d9b55c); border-radius: 4px; background: var(--pf-gold, #d9b55c); color: #17150e; font-size: 13px; font-weight: 650; line-height: 1.5; box-shadow: none; white-space: normal; }
.auth-access__submit:disabled { cursor: wait; opacity: .65; }
.auth-access__error { margin: 0 0 16px; padding: 11px 12px; border: 1px solid #855c58; border-radius: 4px; background: #281d1d; color: #f2c5c1; font-size: 12px; line-height: 1.6; }
.auth-access__error[hidden] { display: none; }
.auth-access__status { margin: 0; color: var(--pf-text, #cfceca); font-size: 12px; line-height: 1.6; }
.auth-access__status:not(:empty) { margin-bottom: 14px; }
.auth-access__referral-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.auth-access__referral-heading em { color: var(--pf-muted, #aaa9a2); font-size: 11px; font-style:normal; font-weight: 400; }
.auth-access__wallets { margin: 0 0 16px; padding: 0; }
.auth-access .auth-access__wallet { display: grid; grid-template-columns: 28px minmax(0, 1fr) 16px; gap: 11px; width: 100%; min-height: 64px; align-items: center; padding: 10px 12px; border: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 4px; background: var(--pf-surface-2, #18191a); color: var(--pf-ink, #f2f0e9); box-shadow: none; text-align: left; cursor: pointer; list-style: none; }
.auth-access__wallet-mark svg { width: 28px; height: 28px; }
.auth-access__wallet > span:nth-child(2) { display: grid; gap: 4px; }
.auth-access .auth-access__wallet strong { font-size: 14px; font-weight: 600; }
.auth-access .auth-access__wallet small { color: var(--pf-muted, #aaa9a2); font-size: 10px; font-weight: 400; line-height: 1.45; }
.auth-access__wallet > svg { width: 16px; height: 16px; color: var(--pf-muted, #aaa9a2); }
.auth-access .auth-phantom-button { min-height: 64px; border-color: #847aab; background: #292537; }
.auth-access .auth-phantom-button:hover { border-color: #b8aaf1; background: #322c45; }
.auth-access .auth-phantom-button strong { font-size: 14px; }
.auth-access .auth-phantom-button:disabled { cursor: wait; opacity: .7; }
.auth-access .auth-access__secondary { width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 4px; background: transparent; color: var(--pf-ink, #f2f0e9); font-size: 12px; }
.auth-access__wallet-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-access__wallet-options button { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 4px; background: transparent; color: var(--pf-ink, #f2f0e9); font-size: 12px; text-align: left; }
.auth-access__wallet-options span { color: var(--pf-muted, #aaa9a2); font-size: 10px; }
.auth-access__safety, .auth-access__footer { color: var(--pf-muted, #aaa9a2); font-size: 12px; line-height: 1.6; }
.auth-access__safety { margin: 10px 0 0; }
.auth-access__footer { margin: 17px 0 0; }
@media (max-width: 600px) {
  .modal-backdrop:has(.auth-access) { align-items: flex-end; padding: 12px 0 0; }
  .modal:has(> .auth-access) { width: 100%; max-height: calc(100dvh - 12px); border-inline: 0; border-bottom: 0; border-radius: 12px 12px 0 0; }
  .modal .auth-access__head { padding: 18px 14px 17px 20px; }
  .auth-access__head h2 { font-size: 25px; }
  .auth-access__body { padding: 17px 20px max(22px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .modal .auth-access__head { padding-inline: 16px 10px; }
  .auth-access__body { padding-inline: 16px; }
}
@media (max-height: 650px) {
  .modal .auth-access__head { padding-block: 12px 11px; }
  .auth-access__body { padding-top: 12px; }
  .auth-access .auth-access__tabs { margin-bottom: 12px; }
  .auth-access__divider { margin-block: 10px; }
  .auth-access .auth-access__form { gap: 12px; }
}
@media (max-height: 600px) and (min-width: 601px) {
  .modal-backdrop:has(.auth-access) { padding: 12px; }
  .modal:has(> .auth-access) { max-height: calc(100dvh - 24px); }
}

/* Privy sign-in: alternate-methods entry and dedicated email-code view. */
.auth-access__privy { margin: 0 0 16px; }
.auth-access .auth-access__privy-button { min-height: 64px; border-color: var(--pf-gold, #d9b55c); background: var(--pf-surface-2, #18191a); }
.auth-access .auth-access__privy-button:hover { border-color: #e8c96d; background: #1f1e19; }
.auth-access .auth-access__privy-button strong { font-size: 14px; }
.auth-access__privy-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--pf-gold, #d9b55c); color: #111; }
.auth-access__privy-mark svg { width: 16px; height: 16px; }
.auth-privy-host { min-height: 120px; }
.auth-privy { display: grid; gap: 14px; }
.auth-privy__providers { display: grid; gap: 10px; }
.auth-privy .auth-privy__provider { display: grid; grid-template-columns: 22px minmax(0, 1fr) 16px; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 4px; background: var(--pf-surface-2, #18191a); color: var(--pf-ink, #f2f0e9); font-size: 14px; font-weight: 500; text-align: left; box-shadow: none; cursor: pointer; }
.auth-privy .auth-privy__provider:hover { border-color: var(--pf-gold, #d9b55c); }
.auth-privy .auth-privy__provider svg { width: 20px; height: 20px; }
.auth-privy .auth-privy__provider > svg:last-child { width: 16px; height: 16px; color: var(--pf-muted, #aaa9a2); }
.auth-privy__divider { display: flex; align-items: center; gap: 12px; color: var(--pf-muted, #aaa9a2); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.auth-privy__divider::before, .auth-privy__divider::after { content: ""; flex: 1; height: 1px; background: var(--pf-line, #292b2c); }
.auth-privy__form { display: grid; gap: 12px; }
.auth-privy__form label { display: grid; gap: 6px; }
.auth-privy .auth-privy__code { font-size: 22px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-privy__hint { margin: 0; color: var(--pf-muted, #aaa9a2); font-size: 12px; line-height: 1.6; }
.auth-privy__hint strong { color: var(--pf-ink, #f2f0e9); font-weight: 600; }
.auth-privy__row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.auth-privy .auth-privy__link { min-height: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--pf-text, #cfceca); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; box-shadow: none; cursor: pointer; }
.auth-privy [aria-busy="true"] { opacity: .7; cursor: wait; }
.auth-privy__account { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--pf-line, #292b2c); border-radius: 4px; }
.auth-privy__account strong { font-size: 14px; overflow-wrap: anywhere; }
.auth-privy__account small { color: var(--pf-muted, #aaa9a2); font-size: 12px; }

/* Existing passkey accounts can sign in from the alternate-methods screen. */
.auth-access .auth-access__passkey-button { border-color: var(--pf-gold, #d9b55c); background: linear-gradient(0deg, rgb(217 181 92 / .10), rgb(217 181 92 / .10)), var(--pf-surface-2, #18191a); }
.auth-access .auth-access__passkey-button:hover { background: linear-gradient(0deg, rgb(217 181 92 / .16), rgb(217 181 92 / .16)), var(--pf-surface-2, #18191a); }
.auth-access__passkey-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--pf-gold, #d9b55c); color: #111; }
.auth-access__passkey-mark svg { width: 18px; height: 18px; }
.auth-access__section-label { margin: 18px 0 8px; color: var(--pf-muted, #aaa9a2); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

/* Post-sign-in offer to turn on a passkey: a small card, never a modal. */
.pv-passkey-offer { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; transform: translateX(-50%); display: grid; gap: 12px; width: min(440px, calc(100% - 32px)); padding: 14px 16px; border: 1px solid var(--pf-line-strong, #3a3d3f); border-radius: 10px; background: var(--pf-surface, #111213); color: var(--pf-ink, #f2f0e9); box-shadow: 0 18px 60px rgb(0 0 0 / .55); font-family: var(--pf-sans, sans-serif); }
.pv-passkey-offer__copy { display: grid; gap: 3px; }
.pv-passkey-offer__copy strong { font-size: 14px; }
.pv-passkey-offer__copy span { color: var(--pf-muted, #aaa9a2); font-size: 12.5px; line-height: 1.4; }
.pv-passkey-offer__actions { display: flex; align-items: center; gap: 8px; }
.pv-passkey-offer__actions .gold-button { min-height: 40px; padding-inline: 18px; }
.pv-passkey-offer__actions .button-text { min-height: 40px; }
