:root {
  color: #26342a;
  background: #eee9df;
  font: 16px/1.45 system-ui, sans-serif;
}
* { box-sizing: border-box }
body { margin: 0 }
body.login-screen {
  display: grid;
  place-items: center;
  min-height: 100svh;
  background: #000;
}
.login-screen main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: 0;
  width: min(900px, 100%);
  min-height: 900px;
  padding: 16px;
  background: #000;
  border-radius: 20px;
}
.login-screen main::before {
  content: "";
  grid-area: 1 / 1;
  width: 100%;
  aspect-ratio: 2 / 1;
  border: 1px solid #b8b0a1;
  border-radius: 16px;
  background: #eee9df url("./login-background.webp?v=2") center / 120% auto no-repeat;
  box-shadow: 0 8px 24px #3427161a;
}
.login-screen .auth-card {
  grid-area: 1 / 1;
  justify-self: end;
  z-index: 1;
  width: min(100%, 192px);
  padding: 16px;
  background: transparent;
  box-shadow: none;
}
.login-screen .auth-card h1 { font-size: 18px }
.login-screen .auth-card :is(h1, label, [role="status"]) { text-shadow: 0 1px 4px #fff, 0 0 8px #fff }
.login-screen .auth-card input { background: #ffffffa8 }
.login-screen .auth-card input[name="username"] {
  background: #ffffff80;
}
.auth-card {
  width: min(100%, 360px);
  padding: 26px;
  border-radius: 16px;
  background: #fffdf8;
  box-shadow: 0 12px 28px #34271629;
}
h1 { margin: 0 0 16px; font-size: 24px }
form { display: grid; gap: 13px }
label { display: grid; gap: 4px; font-size: 14px; font-weight: 600 }
.password-field { display: grid; gap: 4px }
.password-control { position: relative }
.password-control:has(.login-arrow) input { padding-inline-end: 41px }
.password-control .login-arrow {
  position: absolute;
  inset-inline-end: 3px;
  top: 3px;
  bottom: 3px;
  display: grid;
  place-items: center;
  width: 33px;
  min-height: 0;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}
input, select, button {
  width: 100%;
  padding: 10px 12px;
  min-height: 42px;
  border: 1px solid #bcc5bb;
  border-radius: 8px;
  font: inherit;
}
button { background: #304a39; color: white; font-weight: 700; cursor: pointer }
button:disabled { opacity: .55; cursor: wait }
[hidden] { display: none !important }
[role="status"] { margin: 0; font-size: 13px; color: #6d3024 }
[role="status"]:empty { display: none }
body.account-screen {
  min-height: 100svh;
  background: #000;
  padding: 24px 16px;
}
.account-screen main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: min(900px, 100%);
  min-height: calc(100svh - 48px);
  margin: auto;
}
.account-screen main::before {
  content: "";
  grid-area: 1 / 1;
  aspect-ratio: 2 / 1;
  border: 1px solid #b8b0a1;
  border-radius: 16px;
  background: #eee9df url("./login-background.webp?v=2") center / 120% auto no-repeat;
}
.account-screen .auth-card {
  grid-area: 1 / 1;
  z-index: 1;
  justify-self: end;
  width: min(100%, 350px);
  margin: 16px;
  background: transparent;
  box-shadow: none;
}
.account-screen .auth-card :is(h1, h2, label, a, li, [role="status"]) { text-shadow: 0 1px 4px #fff, 0 0 8px #fff }
.account-screen .auth-card a { color: #253c30 }
.account-screen #role-field select {
  display: block;
  width: 100%;
  min-height: 48px;
  padding-inline: 12px;
  background: #fff;
  color: inherit;
  font-size: 16px;
}
.account-screen ul { padding-inline-start: 20px }
@media (max-width: 640px) {
  .login-screen main {
    min-height: 100svh;
    border-radius: 0;
    padding: 18px 16px max(22px, env(safe-area-inset-bottom));
  }
  .account-screen main { align-content: center }
  .account-screen main::before { grid-row: 1 }
  .account-screen .auth-card {
    grid-area: 2 / 1;
    justify-self: center;
    margin: -12px 0 0;
    padding: 18px;
    color: #fff;
  }
  .account-screen .auth-card :is(h1, h2, label, a, li, [role="status"]) { text-shadow: none }
  .account-screen .auth-card a { color: #d1e4da }
  .account-screen .auth-card [role="status"] { color: #ffc9bb }
  .account-screen #role-field select { color: #26342a }
}
