/* The signed-out cover and the account panel share the same layout. */
body #coverScreen:not(.is-loading) {
  display: flex;
  padding: clamp(14px, 4vw, 52px);
  background: radial-gradient(ellipse at 5% 0%, #fff1cf, transparent 60%),
              radial-gradient(ellipse at 92% 93%, #cedfcf, transparent 55%), #eef2e7;
}
#coverScreen:not(.is-loading)::after { display: none; }
.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  width: min(100%, 880px);
  flex: none;
  margin: auto;
  overflow: hidden;
  border: 1px solid #bec9b4;
  border-radius: 24px;
  background: #fffcf4;
  color: #253c30;
  box-shadow: 0 3px 0 #c4cbb5, 0 24px 65px -26px #354f3b54;
}
.login-landscape {
  position: relative;
  isolation: isolate;
  min-height: 438px;
  overflow: hidden;
  background: linear-gradient(170deg, #183d2ee8 0%, #234632bf 20%, transparent 58%),
              #afbe8a url("./assets/loading-camp.webp") 43% 50% / cover no-repeat;
}
.login-brand {
  position: absolute;
  z-index: 1;
  top: 35px;
  left: 34px;
  margin: 0;
  color: #fff7df;
  text-align: left;
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 850;
  letter-spacing: .015em;
  line-height: 1.1;
  text-shadow: 0 2px 5px #223b2859;
}
.login-brand span {
  display: block;
  margin-bottom: 7px;
  font: italic 700 1.3em/.96 Georgia, "Times New Roman", serif;
  letter-spacing: -.04em;
  color: #ffdd9c;
}
.login-friends {
  position: absolute;
  inset: 39% 4% 9%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.login-friends img {
  display: block;
  width: 52%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 4px #493e3459);
}
.login-friends img:first-child { align-self: center; transform: rotate(-6deg); }
.login-friends img + img { width: 43%; margin-left: -5%; }
.login-panel { min-width: 0; padding: clamp(26px, 3.6vw, 48px); align-self: center; }
#cloudLoginCard { text-align: left; }
#loginTitle { margin: 0; font-size: clamp(25px, 3vw, 35px); letter-spacing: -.04em; line-height: 1.22; color: #273e31; }
.login-status {
  display: flex; align-items: center; flex-wrap: wrap; column-gap: 9px;
  min-height: 24px; margin: 5px 0 23px; color: #586c5d; font-size: 14px;
}
.login-fields { display: grid; gap: 6px; }
.login-fields label, .login-register-fields label { color: #374b3c; font-size: 15px; font-weight: 700; }
.login-fields label:not(:first-child) { margin-top: 9px; }
#cloudLoginCard input, #cloudLoginCard select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #aab9a3;
  border-radius: 9px;
  background: #fffefa;
  color: #24382e;
  font: inherit;
  font-size: 16px;
}
#cloudLoginCard input::placeholder { color: #6f7c70; }
#cloudLoginCard :focus-visible { outline: 3px solid #3e7458; outline-offset: 3px; }
#cloudLoginCard [hidden] { display: none; }
#cloudAuthHint { margin: 10px 0 0; color: #79491e; font-size: 14px; line-height: 1.5; }
#cloudAuthHint:empty { display: none; }
.login-primary, .login-link, .login-secondary, .login-register summary { font: inherit; cursor: pointer; }
.login-primary {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 20px 0 5px;
  padding: 9px 15px;
  border: 1px solid #2f5c45;
  border-radius: 9px;
  background: #38694e;
  color: #fffdf2;
  font-size: 17px;
  font-weight: 750;
  box-shadow: 0 3px 0 #244a37;
}
.login-primary:hover { background: #2d593f; }
.login-primary:active { transform: translateY(1px); box-shadow: 0 2px 0 #244a37; }
#cloudLoginCard button:disabled { cursor: default; opacity: .55; }
.login-options, .login-actions { display: flex; align-items: flex-start; gap: 5px 12px; }
.login-options { justify-content: space-between; margin-top: 9px; }
.login-actions { flex-wrap: wrap; }
.login-link, .login-register summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #456753;
  font-size: 14px;
  font-weight: 650;
}
.login-link:hover, .login-register summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.login-register { text-align: right; }
.login-register summary { list-style: none; }
.login-register summary::-webkit-details-marker { display: none; }
.login-register summary::after {
  content: "";
  width: 6px; height: 6px;
  margin-left: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.login-register[open] summary::after { transform: translateY(2px) rotate(225deg); }
.login-register-fields { display: grid; grid-template-columns: minmax(70px, 1fr) auto; gap: 4px 8px; text-align: left; }
.login-register-fields label { grid-column: 1 / -1; }
.login-secondary { padding: 0 12px; border: 1px solid #aab9a3; border-radius: 9px; background: #eaf0e0; color: #34573f; }
.login-panel .profile-chooser { grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; margin: 0 0 15px; }
.login-panel .profile-choice { display: flex; justify-content: center; text-align: center; }
body.study-active .login-fields, body.study-active .login-register, body.study-active #cloudLoginButton { display: none; }
@media (max-width: 650px) {
  .login-card { max-width: 440px; grid-template-columns: minmax(0, 1fr); border-radius: 19px; }
  .login-landscape { min-height: 135px; height: clamp(135px, 24vh, 190px); background-image: linear-gradient(90deg, #213e2bdd, #28453269 48%, transparent 76%), url("./assets/loading-camp.webp"); background-position: center, center 44%; }
  .login-brand { top: 50%; left: 19px; transform: translateY(-50%); font-size: clamp(23px, 5.5vw, 31px); }
  .login-friends { inset: 12% 3% 6% 46%; }
  .login-friends img { max-height: 100%; }
  .login-panel { padding: 22px clamp(18px, 5vw, 34px) 14px; }
  .login-status { margin-bottom: 13px; }
}
@media (min-width: 651px) and (max-height: 510px) {
  body #coverScreen:not(.is-loading) { padding: 10px; }
  .login-panel { padding: 16px 28px; }
  .login-landscape { min-height: 300px; }
  .login-status { margin-bottom: 10px; }
}
body:has(#coverScreen:not(.is-hidden):not(.is-loading)) .app-version-badge {
  z-index: 100000;
  color: #465d4f;
  background: #fffdf2e8;
}
