.login-panel {
  inset: 0 7% 0 auto;
  width: min(660px, 46%);
  height: 100%;
  height: 100dvh;
  max-height: none;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: 0;
  padding: 24px 0;
  transform: none;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  scrollbar-width: thin;
  scrollbar-color: #c19a50 #152331;
  color: #231a0d;
  color-scheme: light;
}

.login-brand { flex: 0 0 auto; width: 88%; margin: 0 auto; }
.login-brand img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 4px #000); }
.login-accessible-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.login-parchment {
  flex: 0 0 auto;
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 38px 9% 34px;
  background: url("../public/assets/ui/login-parchment.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 9px 12px #0009);
}

.login-heading { text-align: center; }
.login-server-badge {
  display: table;
  min-width: 160px;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 5px 22px;
  border: 3px double #ddbc76;
  outline: 1px solid #6f5129;
  background: #4e391c;
  color: #fff0cf;
  font-size: 17px;
  line-height: 1.25;
  text-shadow: 0 1px 2px #000;
  border-radius: 2px;
}
.login-heading h2 { margin: 0; font-size: 36px; line-height: 1.25; text-wrap: balance; }
.login-divider { display: flex; align-items: center; justify-content: center; width: 44%; gap: 7px; margin: 14px auto 0; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; background: #92723d; flex: 1; }
.login-divider span { width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid #735021; background: #bb9654; box-shadow: inset 0 0 0 1px #eddaa6; }
.login-panel .login-parchment label { display: grid; gap: 7px; font-size: 20px; line-height: 1.25; }
.login-parchment input {
  min-width: 0;
  min-height: 52px;
  border: 1px solid #876337;
  border-radius: 6px;
  background: #fff8e53b;
  box-shadow: inset 0 1px 4px #79572a44, 0 1px 1px #fff5cf;
  color: #281e12;
  padding: 10px 16px;
  font-size: 20px;
  line-height: 1.3;
}
.login-parchment input::placeholder { color: #70634e; opacity: 1; }
.login-password-field { display: grid; gap: 7px; }
.login-password-input { position: relative; }
.login-password-input input { padding-right: 56px; }
#toggleLoginPassword {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #58472c;
}
#toggleLoginPassword svg { width: 25px; height: 25px; }
.login-panel #connectButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 16px;
  border: 4px double #e1b65d;
  outline: 1px solid #694b23;
  border-radius: 5px;
  background: #103a5b;
  color: #ffe4a3;
  box-shadow: inset 0 0 0 2px #071c2e, inset 0 0 15px #0008, 0 3px 5px #513b2555;
  font-family: var(--font-uo-heading);
  font-size: 27px;
  text-shadow: 0 2px 2px #000;
}
#connectButton svg { flex: 0 0 32px; width: 32px; height: 32px; }
.login-panel #connectButton:hover { background: #184c71; }
.login-panel #forgotPasswordButton { justify-self: center; min-height: 44px; padding: 6px 2px; color: #102d48; font-size: 20px; font-weight: 400; text-decoration: underline; text-underline-offset: 4px; }
.login-divider-bottom { margin-top: -12px; width: 28%; }
.login-panel :is(input, button):focus-visible { outline: 3px solid #175787; outline-offset: 3px; }
.login-panel .hint { margin: 0; color: #342611; text-align: center; overflow-wrap: anywhere; }

@media (min-width: 1001px) and (max-height: 820px) {
  .login-brand { width: 74%; }
  .login-parchment { gap: 14px; padding-top: 32px; padding-bottom: 30px; }
}
@media (max-width: 1000px) {
  .login-panel { right: 4%; width: min(560px, 55%); }
  .login-heading h2 { font-size: 30px; }
  .login-parchment { gap: 14px; padding-top: 32px; padding-bottom: 30px; }
}
@media (max-width: 600px) {
  .login-panel { inset: 0; width: 100%; padding: max(18px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
  .login-brand { width: min(88%, 380px); margin-bottom: 8px; }
  .login-parchment { gap: 15px; padding: 32px 8% 30px; }
  .login-heading h2 { font-size: 27px; }
  .login-server-badge { min-width: 140px; font-size: 15px; margin-bottom: 13px; }
  .login-panel .login-parchment label { font-size: 18px; }
  .login-parchment input { font-size: 18px; min-height: 50px; }
  .login-panel #connectButton { min-height: 62px; font-size: 24px; }
  .login-panel #forgotPasswordButton { font-size: 18px; }
}
@media (max-width: 360px) {
  .login-brand { width: 82%; }
  .login-heading h2 { font-size: 23px; }
  .login-parchment { gap: 12px; }
}
@media (max-height: 560px) and (min-width: 601px) {
  .login-panel { right: 4%; width: min(480px, 58%); padding: 16px 0; justify-content: flex-start; }
  .login-brand { width: 55%; margin-bottom: 4px; }
  .login-parchment { gap: 10px; padding-top: 30px; }
  .login-heading h2 { font-size: 27px; }
}
