/* Account is its own home row, never part of the language/audio top bar. */
.auth-account-bar { width: 100%; min-width: 0; }
.auth-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 9px 16px;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 16px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(10, 30, 80, .2);
}
.auth-entry:hover { background: rgba(255, 255, 255, .24); }
.auth-entry:active { transform: translateY(2px); }
.auth-entry-label { min-width: 0; overflow-wrap: anywhere; }
.auth-account-icon { flex: none; }
.auth-optional {
  flex: none;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(8, 22, 58, .3);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

/* The host modal still owns its backdrop/animation. No global modal overrides. */
.auth-modal {
  max-width: 420px;
  padding: 22px 20px 18px;
  text-align: start;
  overflow-wrap: anywhere;
}
.auth-modal h2 {
  padding-inline-end: 46px;
  margin-block: 4px 20px;
  text-align: start;
  line-height: 1.15;
}
.auth-close {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink, #2a1e3f);
  border-radius: 14px;
  padding: 0;
  background: #fff;
  color: var(--ink, #2a1e3f);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink, #2a1e3f);
}
.auth-content { min-width: 0; }
.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 3px solid var(--ink, #2a1e3f);
  border-radius: 15px;
  padding: 11px 14px;
  background: #fff;
  color: var(--ink, #2a1e3f);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  box-shadow: 0 4px 0 var(--ink, #2a1e3f);
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.auth-button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink, #2a1e3f); }
.auth-primary { background: var(--sun, #ffd23a); }
.auth-secondary { margin-block-start: 14px; background: #eef6fc; box-shadow: 0 3px 0 var(--ink, #2a1e3f); }

/* Readable, white-background Google branding, with the official coloured G. */
.auth-google {
  border: 1px solid #747775;
  border-radius: 6px;
  min-height: 48px;
  background: #fff;
  color: #1f1f1f;
  font-family: Arial, Roboto, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .2px;
  box-shadow: none;
}
.auth-google:hover:not(:disabled) { background: #f8faff; border-color: #1f1f1f; }
.auth-google:active:not(:disabled) { box-shadow: none; transform: none; background: #edf2fa; }
.auth-google-g { flex: none; width: 20px; height: 20px; }
.auth-google span { min-width: 0; }
.auth-button:disabled, .auth-text-button:disabled {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
  transform: none;
}
.auth-modal .auth-provider-note {
  margin-block: 9px 0;
  font-size: 13px;
  line-height: 1.4;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block: 18px;
  color: var(--ink-soft, #5a6b85);
  font-size: 14px;
  font-weight: 700;
}
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: #d8dbe1; flex: 1; }
.auth-form { display: flex; flex-direction: column; gap: 12px; margin: 0; min-width: 0; }
.auth-form label { font-size: 14px; font-weight: 800; line-height: 1.4; }
.auth-input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 12px;
  border: 2px solid #a8b4c7;
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #2a1e3f);
  font: inherit;
  font-size: 16px; /* Prevent iOS focus zoom. */
  line-height: 1.35;
  direction: ltr;
  text-align: start;
}
.auth-input:disabled { background: #eef1f5; color: #626d7f; cursor: not-allowed; }
.auth-input[aria-invalid="true"] { border-color: #b52642; }
.auth-code-input { text-align: center; letter-spacing: .32em; font-variant-numeric: tabular-nums; font-weight: 800; }
.auth-modal .auth-code-sent { font-size: 14px; margin-block-end: 18px; unicode-bidi: plaintext; }
.auth-text-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 8px;
  margin-block-start: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink, #2a1e3f);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.auth-text-button:hover { background: rgba(36, 146, 224, .07); }
.auth-modal .auth-status {
  margin-block: 15px 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff0f3;
  color: #9a1734;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.auth-modal .auth-status[hidden] { display: none; }
.auth-modal .auth-progress-note {
  margin-block: 20px 0;
  padding-block-start: 14px;
  border-block-start: 1px solid #d8dbe1;
  font-size: 12px;
  line-height: 1.5;
  text-align: start;
}
.auth-guest { margin-block-start: 6px; }
.auth-details { margin: 0 0 20px; }
.auth-details > div { padding: 11px 12px; border-radius: 12px; background: #eef6fc; margin-block-end: 10px; }
.auth-details dt { color: var(--ink-soft, #5a6b85); font-size: 13px; font-weight: 700; margin-block-end: 4px; }
.auth-details dd { margin: 0; font-size: 16px; font-weight: 800; overflow-wrap: anywhere; line-height: 1.4; }
.auth-details bdi { unicode-bidi: isolate; }
.auth-entry:focus-visible, .auth-button:focus-visible, .auth-close:focus-visible,
.auth-input:focus-visible, .auth-text-button:focus-visible { outline: 3px solid var(--blue, #1b6fd0); outline-offset: 3px; }
.auth-entry:focus-visible { outline-color: var(--sun, #ffd23a); }

@media (max-width: 390px) {
  .auth-modal { padding-inline: 16px; }
  .auth-entry { padding-inline: 12px; }
  .auth-button { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-button { transition: none; }
}
