.nav-member-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid rgba(37, 99, 235, .28);
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  transition: .2s ease;
}
.nav-member-btn:hover {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, .45);
}
.nav-member-user,
.nav-cta .nav-member-user,
.nav-mobile .nav-member-user {
  display: none !important;
  align-items: center;
  gap: 8px;
}
.nav-member-user.is-on,
.nav-cta .nav-member-user.is-on,
.nav-mobile .nav-member-user.is-on {
  display: inline-flex !important;
}
.nav-member-guest.is-off { display: none !important; }
.nav-cta .nav-member-chip,
.nav-mobile .nav-member-chip,
.nav-member-chip {
  display: inline-flex !important;
  align-items: stretch;
  min-height: 36px;
  border-radius: 10px !important;
  overflow: hidden;
  background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  box-shadow: 0 8px 18px -12px rgba(37, 99, 235, .55) !important;
  border: 0 !important;
}
.nav-cta .nav-member-name,
.nav-mobile .nav-member-name,
.nav-member-name {
  display: inline-flex !important;
  align-items: center;
  max-width: 120px;
  min-height: 36px;
  padding: 0 12px !important;
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.nav-cta .nav-member-name:hover,
.nav-mobile .nav-member-name:hover,
.nav-member-name:hover {
  background: rgba(255, 255, 255, .14) !important;
  color: #fff !important;
}
.nav-cta .nav-member-sep,
.nav-mobile .nav-member-sep,
.nav-member-sep {
  width: 1px;
  align-self: stretch;
  margin: 8px 0;
  background: rgba(255, 255, 255, .5) !important;
}
.nav-cta .nav-member-exit,
.nav-mobile .nav-member-exit,
.nav-member-exit {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  cursor: pointer;
}
.nav-cta .nav-member-exit:hover,
.nav-mobile .nav-member-exit:hover,
.nav-member-exit:hover {
  background: rgba(255, 255, 255, .14) !important;
  color: #fff !important;
}

.member-auth-modal[hidden] { display: none; }
.member-auth-modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 20px;
}
.member-auth-backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 20, 36, .58);
}
.member-auth-panel {
  position: relative; z-index: 1;
  width: min(420px, 100%);
  padding: 42px 26px 24px;
  border-radius: 24px;
  border: 1px solid rgba(220, 230, 245, .95);
  background: linear-gradient(160deg, #fff 0%, #f7fbff 100%);
  box-shadow: 0 28px 70px -20px rgba(16, 28, 52, .55);
}
.member-auth-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 3;
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.member-auth-close::before,
.member-auth-close::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: #64748b;
}
.member-auth-close::before { transform: rotate(45deg); }
.member-auth-close::after { transform: rotate(-45deg); }
.member-auth-close:hover { background: #e2e8f0 !important; }
.member-auth-close:hover::before,
.member-auth-close:hover::after { background: #0f172a; }
.member-auth-panel h2 {
  margin: 0 0 6px; font-size: 22px; font-weight: 750; color: #0f172a;
}
.member-auth-panel .sub {
  margin: 0 0 18px; color: #64748b; font-size: 13px; line-height: 1.6;
}
.member-auth-form { display: none; grid-gap: 12px; }
.member-auth-form.active { display: grid; }
.member-auth-form > label {
  display: grid; gap: 6px;
  font-size: 13px; font-weight: 650; color: #334155;
}
.member-auth-form > label input {
  min-height: 44px; padding: 0 12px;
  border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
  font: inherit;
}
.member-auth-form > label input:focus {
  outline: none; border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37,99,235,.14);
}
.member-auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 28px;
}
.member-auth-row-end { justify-content: flex-end; }
.member-auth-check {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.member-auth-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2563eb;
}
.member-auth-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.member-auth-link:hover { color: #1d4ed8; text-decoration: underline; }
.member-auth-captcha-row {
  display: grid;
  grid-template-columns: minmax(128px, 0.95fr) minmax(0, 1.05fr);
  gap: 10px;
  align-items: stretch;
}
.member-auth-captcha-board {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px 0 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background:
    radial-gradient(circle at 20% 28%, rgba(37,99,235,.12), transparent 42%),
    radial-gradient(circle at 80% 72%, rgba(79,70,229,.1), transparent 40%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, transform .15s ease, box-shadow .2s;
}
.member-auth-captcha-board:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -10px rgba(37,99,235,.45);
}
.member-auth-captcha-board:active { transform: none; }
.member-auth-captcha-eq {
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  font-style: italic;
}
.member-auth-captcha-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255,255,255,.85);
  flex: none;
}
.member-auth-captcha-board.is-loading .member-auth-captcha-eq { opacity: .55; }
.member-auth-captcha-board.is-loading .member-auth-captcha-refresh {
  animation: memberCaptchaSpin .8s linear infinite;
}
@keyframes memberCaptchaSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .member-auth-captcha-board,
  .member-auth-captcha-board.is-loading .member-auth-captcha-refresh {
    transition: none;
    animation: none;
  }
}
.member-auth-captcha-row input {
  width: 100%;
  min-width: 0;
  text-align: center;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.member-auth-submit {
  min-height: 44px; margin-top: 4px; border: 0; border-radius: 999px;
  color: #fff; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}
.member-auth-submit:disabled { opacity: .6; cursor: not-allowed; }
.member-auth-msg {
  min-height: 18px; margin: 0; color: #dc2626; font-size: 12px;
}
.member-auth-msg.ok { color: #059669; }

.nav-mobile .nav-member-btn {
  width: 100%; margin-top: 8px;
}
.nav-mobile .nav-member-user {
  width: 100%;
  margin-top: 8px;
}
.nav-mobile .nav-member-chip {
  width: 100%;
}
.nav-mobile .nav-member-name {
  max-width: none;
  flex: 1;
}
