:root {
  --auth-bg: rgba(5, 8, 14, 0.82);
  --auth-panel: #101622;
  --auth-panel-2: #151d2c;
  --auth-line: rgba(255, 255, 255, 0.12);
  --auth-gold: #d4af37;
  --auth-text: #f8fafc;
  --auth-muted: #aab3c2;
}

.auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(212, 175, 55, 0.14), transparent 34%),
    var(--auth-bg);
  backdrop-filter: blur(18px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  width: min(460px, 100%);
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--auth-panel), var(--auth-panel-2));
  color: var(--auth-text);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.44);
  padding: 28px;
}

.auth-card small {
  display: inline-flex;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 999px;
  color: var(--auth-gold);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-card h2 {
  margin: 18px 0 10px;
  color: var(--auth-text);
  font-size: 2rem;
  line-height: 1.05;
}

.auth-card p {
  margin: 0 0 20px;
  color: var(--auth-muted);
  line-height: 1.65;
}

.auth-actions,
.auth-email {
  display: grid;
  gap: 10px;
}

.auth-button,
.auth-email button,
.auth-signout {
  min-height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--auth-text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 14px;
}

.auth-button.primary,
.auth-email button {
  border-color: rgba(212, 175, 55, 0.42);
  background: var(--auth-gold);
  color: #101622;
}

.auth-email .auth-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.22);
  background: #ffffff;
  color: #172033;
}

.auth-email .auth-provider:hover {
  background: #f4f7fb;
}

.auth-provider-mark {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from -35deg, #4285f4 0 25%, #34a853 0 48%, #fbbc05 0 71%, #ea4335 0 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-email {
  margin-top: 14px;
  border-top: 1px solid var(--auth-line);
  padding-top: 14px;
}

.auth-email input {
  min-height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--auth-text);
  font: inherit;
  padding: 0 12px;
}

.auth-hint {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--auth-line);
  content: "";
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.auth-consent input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin-top: 2px;
}

.auth-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--auth-muted);
  font-size: 0.9rem;
}

.auth-delivery-notice {
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--gold, var(--auth-gold)) 72%, var(--text, var(--auth-text)));
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold, var(--auth-gold)) 14%, var(--bg-elevated, var(--auth-panel)));
  color: var(--text, var(--auth-text));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  padding: 14px 16px;
}

.auth-delivery-notice[hidden] {
  display: none;
}

.auth-delivery-notice strong {
  display: block;
  color: inherit;
  font-size: 0.96rem;
  font-weight: 800;
}

.auth-delivery-notice p {
  margin: 6px 0 0;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.5;
}

.auth-config-notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10000;
  width: min(460px, calc(100vw - 36px));
  border: 1px solid rgba(248, 113, 113, 0.62);
  border-radius: 8px;
  background: rgba(69, 10, 10, 0.96);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
  color: #fee2e2;
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 12px 14px;
}

.auth-config-notice[hidden] {
  display: none;
}

.auth-account {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;
  display: flex;
  max-width: min(420px, calc(100vw - 36px));
  align-items: center;
  gap: 10px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: rgba(16, 22, 34, 0.9);
  color: var(--auth-text);
  padding: 10px;
  backdrop-filter: blur(14px);
}

.auth-account[hidden] {
  display: none;
}

.auth-account span {
  overflow: hidden;
  color: var(--auth-muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-signout {
  min-height: 34px;
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .auth-card {
    padding: 22px;
  }

  .auth-card h2 {
    font-size: 1.6rem;
  }

  .auth-account {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .auth-config-notice {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}
