:root {
  font-family: system-ui, sans-serif;
  line-height: 1.45;
  color: #203b32;
  background: #203b32;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
}

.account-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  justify-items: end;
  padding: max(32px, env(safe-area-inset-top)) clamp(28px, 8vw, 140px)
    max(32px, env(safe-area-inset-bottom));
}

.account-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent 24%, #182d27a8 85%),
    url('/assets/loading-park.webp') center / cover no-repeat;
}

.account-card {
  width: min(100%, 440px);
  padding: clamp(24px, 4vw, 44px);
  background: #fdf8ea;
  border: 1px solid #fffcf1;
  border-radius: 26px;
  box-shadow: 0 20px 70px #14261f61;
}

.account-brand {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 0 0 16px;
  color: #3b6252;
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font: 700 clamp(2rem, 5vw, 2.85rem) / 1.1 Georgia, serif;
  letter-spacing: -.035em;
}
h1:focus { outline: none; }

#account-intro {
  margin: 10px 0 0;
  color: #506257;
  font-size: .98rem;
}

fieldset {
  display: grid;
  gap: 14px;
  min-inline-size: 0;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}
.account-field { display: grid; gap: 5px; }
.account-field label { font-size: .9rem; font-weight: 700; }
.account-field small { color: #506257; }

input, button { font: inherit; }
input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #9aab99;
  border-radius: 10px;
  background: #fffdf7;
  color: #203b32;
  font-size: 1rem;
}

.account-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}
.account-reveal {
  min-width: 82px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid #9aab99;
  border-radius: 10px;
  background: #f3f5e9;
  color: #365e4e;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.account-reveal[aria-pressed="true"] { background: #e3efe4; }

.account-entry {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.account-primary, .account-secondary {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  padding: 10px 16px;
  border: 1px solid #2b5545;
  border-radius: 12px;
  background: #365e4e;
  color: #fffdf7;
  font-weight: 750;
  cursor: pointer;
}
.account-secondary {
  margin-top: 0;
  background: transparent;
  color: #365e4e;
}
.account-secondary:hover:not(:disabled) { background: #e3efe4; }
.account-primary:hover:not(:disabled) { background: #284d40; }
button:disabled { cursor: wait; opacity: .7; }

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 15px;
  margin-top: 12px;
}

.account-actions a, .account-actions button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 3px 0;
  border: 0;
  background: none;
  color: #365e4e;
  font-size: .91rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.account-status {
  margin: 16px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #e3efe4;
  color: #284d40;
  font-size: .9rem;
}
.account-status[data-kind="error"] { background: #fae8dc; color: #7a3628; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #315c49;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .account-shell {
    align-items: end;
    justify-items: center;
    padding: max(140px, 24vh, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }
  .account-art {
    background: linear-gradient(0deg, #182d27 0%, #182d2700 65%),
      url('/assets/loading-squirrel-portrait.webp') center 36% / cover no-repeat;
  }
}
