#header .rp-auth-actions {
  position: relative;
  isolation: isolate;
  order: 4;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 46px;
  padding-inline: 4px;
  margin-inline-start: 12px;
}
#header .rp-auth-actions::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  pointer-events: none;
}
#header .rp-auth-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--default-font, sans-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  color: #234751;
  background: transparent;
  box-shadow: none;
  transition: color .15s ease, background-color .15s ease;
}
/* Preserve a 44px hit area without enlarging the visible button. */
#header .rp-auth-button::after { content: ""; position: absolute; inset: -7px 0; }
#header .rp-auth-login:hover,
#header .rp-auth-login[aria-expanded="true"] {
  color: #075665;
  background: #e4f0f3;
}
#header .rp-auth-register {
  padding-inline: 12px;
  color: #fff;
  background: color-mix(in srgb, var(--accent-color, #008cad), #051e23 12%);
}
#header .rp-auth-register:hover {
  color: #fff;
  background: color-mix(in srgb, var(--accent-color, #008cad), #051e23 24%);
}
#header .rp-auth-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  font-size: 11px;
  color: #647e85;
  transition: transform .15s ease;
}
#header .rp-auth-login[aria-expanded="true"] .rp-auth-chevron { transform: rotate(180deg); }
#header .rp-auth-button:focus-visible,
.rp-login-dialog :is(a, button):focus-visible { outline: 3px solid #087386; outline-offset: 3px; }
/* Keep the viewport width unchanged when the dialog locks page scrolling. */
html { scrollbar-gutter: stable; }
html.rp-login-open { overflow: hidden; }
.rp-login-dialog {
  position: fixed;
  inset: auto;
  top: var(--rp-login-top, 90px);
  left: var(--rp-login-left, 16px);
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(var(--rp-login-viewport-height, 100dvh) - var(--rp-login-top, 90px) - 16px);
  margin: 0;
  padding: 20px;
  border: 1px solid #dbe5e7;
  border-radius: 8px;
  background: #fff;
  color: #193b43;
  box-shadow: 0 12px 36px rgba(3, 16, 19, .18);
  font-family: var(--default-font, sans-serif);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rp-login-dialog:not([open]) { display: none; }
.rp-login-dialog::backdrop { background: rgba(3, 16, 19, .08); }
.rp-login-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rp-login-heading h2 { font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: 0; margin: 0; color: #193b43; }
.rp-login-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #64777c;
  background: transparent;
  font-size: 17px;
}
.rp-login-close:hover { color: #193b43; background: #f0f5f6; }
.rp-login-close:disabled { opacity: .45; }
.rp-login-body { min-width: 0; }
.rp-login-body > [role="status"] { min-height: 190px; display: grid; place-items: center; color: #64777c; margin: 0; }
.rp-login-dialog .member-form label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 600; color: #324b51; }
.rp-login-dialog .member-form .form-control {
  height: 46px;
  min-height: 46px;
  border: 1px solid #d2dddf;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fafcfc;
  color: #193b43;
  font-size: 16px;
  box-shadow: none;
}
.rp-login-dialog .member-form .form-control:focus { border-color: #087386; background: #fff; box-shadow: 0 0 0 3px rgba(8, 115, 134, .1); }
.rp-login-dialog .member-password-label { gap: 12px; }
.rp-login-dialog .member-password-label a { font-size: 12px; white-space: nowrap; }
.rp-login-dialog .member-password-field input { padding-right: 46px !important; }
.rp-login-dialog .member-password-toggle { top: 1px; right: 1px; }
.rp-login-dialog .member-form > button {
  min-height: 44px;
  border: 1px solid #086779;
  border-radius: 6px;
  background: #086779;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.rp-login-dialog .member-form > button:hover { background: #075262; }
.rp-login-dialog .member-form > button:disabled { opacity: .6; }
.rp-login-dialog .member-auth-links { display: block; font-size: 12px; line-height: 1.5; }
.rp-login-dialog a { color: #086779; }
.rp-login-dialog .alert { padding: 12px; border-radius: 6px; font-size: 13px; overflow-wrap: anywhere; }
.rp-login-recovery { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rp-login-retry { border: 1px solid #c5d8dd; border-radius: 6px; padding: 9px 12px; color: #086779; background: #fff; }
@media (max-width: 1200px) {
  #header .rp-auth-actions { margin-inline-end: 10px; }
}
@media (max-width: 575.98px) {
  #header .header-container.has-guest-auth { column-gap: 6px; }
  #header .rp-auth-actions { margin-inline-start: 0; }
}
@media (max-width: 359.98px) {
  #header .rp-auth-actions { gap: 2px; padding-inline: 3px; margin-inline-end: 6px; }
  #header .rp-auth-button { gap: 3px; padding-inline: 2px; }
  #header .rp-auth-register { padding-inline: 6px; }
}
@media (max-width: 767.98px) {
  .rp-login-dialog {
    top: auto;
    left: 0;
    bottom: var(--rp-login-bottom, 0px);
    width: 100%;
    max-width: 100%;
    max-height: calc(var(--rp-login-viewport-height, 100dvh) - 12px);
    padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
    border-radius: 12px 12px 0 0;
  }
  .rp-login-dialog::backdrop { background: rgba(3, 16, 19, .35); }
}
@media (prefers-reduced-motion: reduce) {
  #header .rp-auth-button,
  #header .rp-auth-chevron { transition: none; }
}
