.entry-screen:has(#account-card:not([hidden])) {
  align-items: safe center;
  background:
    linear-gradient(150deg, #302b2168, #25251fc2),
    url("assets/garden-ui/conservatory.webp") center 52% / cover,
    #544b38;
}
.account-card {
  --account-hero-size: clamp(9.5rem, 25dvh, 14.5rem);
  --account-ink: #4d3428;
  --account-muted: #765744;
  --account-line: #cdad88;
  --account-serif: "Songti SC", "Noto Serif CJK SC", SimSun, serif;
  display: grid;
  grid-template-rows: var(--account-hero-size) minmax(0, 1fr);
  width: min(100%, 29rem);
  block-size: min(
    calc(var(--account-hero-size) + 25rem),
    calc(100dvh - max(14px, var(--top)) - max(14px, var(--bottom)))
  );
  margin: auto;
  overflow: hidden;
  border: 1px solid #d6ad73;
  border-top-color: #fff6d9;
  border-radius: 16px 33px 16px 28px;
  background: radial-gradient(ellipse at 14% 0%, #fffaf0, transparent 64%), linear-gradient(148deg, #f9ecd9, #ead2b5);
  box-shadow: inset 0 0 0 2px #fff9e7aa, 0 5px 0 #8b6342, 0 17px 45px #21180eb3;
  color: var(--account-ink);
}
.account-hero {
  position: relative;
  display: grid;
  align-items: start;
  padding: clamp(13px, 3.3dvh, 27px) clamp(12px, 4.4vw, 24px) 10px;
  border-bottom: 1px solid #cba66b;
  background:
    radial-gradient(ellipse 88% 110% at 0 0, #2a231bed, #392d2275 58%, transparent),
    linear-gradient(0deg, #2e282655, transparent 43%),
    url("assets/garden-ui/account-glasshouse.webp") center 48% / cover,
    #554437;
}
.account-hero-copy {
  justify-self: start;
  color: #fff2d2;
  text-shadow: 0 2px 4px #382719, 0 3px 18px #251a12cf;
}
.account-hero-copy::before {
  content: "";
  display: block;
  width: 2rem;
  height: 1px;
  margin-bottom: .65rem;
  background: linear-gradient(90deg, #ffe8b3, #e5bc7562);
}
.account-hero h1 {
  margin: 0;
  font: 850 clamp(1.7rem, 8.5vw, 2.6rem)/1.12 var(--account-serif);
  letter-spacing: .055em;
  white-space: nowrap;
}
.account-hero p { margin: .52rem 0 0; font-size: var(--text-small); font-weight: 740; }
.account-content {
  min-width: 0;
  overflow-y: auto;
  scroll-padding-block: 10px;
  padding: clamp(12px, 3.8vw, 22px);
}
.account-card .account-invite-note {
  margin-bottom: .75rem;
  border: 1px solid #c0ae7d85;
  border-radius: 8px 15px;
  background: #efe3c5;
  color: #5a452d;
}
.account-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-bottom: clamp(.65rem, 2.2dvh, 1rem);
  padding: 4px;
  border: 1px solid #cfb28f;
  border-top-color: #d1b08a;
  border-radius: 10px 16px;
  background: linear-gradient(154deg, #e8d1b4, #f9eedc);
  box-shadow: inset 0 1px 4px #9a72452d;
}
.account-tabs button {
  min-width: 0;
  min-height: 41px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 8px 12px;
  background: transparent;
  color: #654332;
  font-size: var(--text-body);
  font-weight: 800;
}
.account-tabs button[aria-pressed="true"] {
  border-color: #b29156;
  background: radial-gradient(ellipse at 25% 0%, #667956, transparent 70%), linear-gradient(145deg, #3e5745, #273c32);
  box-shadow: inset 0 0 0 1px #f3dc9e46, 0 2px 3px #523d2952;
  color: #fff2d7;
}
.account-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 0 0 .72rem;
  padding: 0;
  list-style: none;
  color: var(--account-muted);
  font-size: var(--text-small);
  font-weight: 750;
}
.account-steps li { display: flex; align-items: center; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid #cfb28b; }
.account-steps li > span {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid #c4a27b;
  border-radius: 50%;
  background: #fff3df;
  color: #694e31;
}
.account-steps li[aria-current="step"] { border-color: #9e7046; color: #654226; font-weight: 850; }
.account-steps li[aria-current="step"] > span { border-color: #906036; background: #93603c; color: #fff7e7; }
.account-steps .is-complete { color: #435d3f; border-color: #98aa83; }
.account-steps .is-complete > span { border-color: #98aa83; background: #dde5c9; color: #435d3f; }
.account-reset-title { margin: 0 0 .75rem; font: 800 var(--text-subheading)/1.2 var(--account-serif); }
#account-form { display: grid; gap: clamp(8px, 1.8dvh, 14px); }
.account-field { display: grid; gap: 5px; min-width: 0; }
#account-form label { font-size: var(--text-body); font-weight: 800; }
#account-form input {
  width: 100%;
  min-width: 0;
  min-height: var(--touch);
  padding: 8px 11px;
  border: 1px solid var(--account-line);
  border-radius: 8px 14px;
  background: #fffaf1;
  box-shadow: inset 0 1px 3px #8156341f;
  color: var(--account-ink);
  font-size: 16px;
}
#account-form input::placeholder { color: #7b6453; font-size: .875rem; }
.account-code-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(7rem, 44%); gap: 7px; }
.captcha-picture {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19px;
  align-items: center;
  gap: 2px;
  min-height: var(--touch);
  padding: 2px 4px 2px 2px;
  overflow: hidden;
  border: 1px solid var(--account-line);
  border-radius: 8px 14px;
  background: #f4e5ca;
  color: #69482e;
  font-size: var(--text-small);
}
.captcha-picture img { display: block; width: 100%; height: auto; border-radius: 5px; }
.captcha-picture .icon { width: 16px; height: 16px; }
.account-password-row { position: relative; }
#account-form .account-password-row input { padding-inline-end: 58px; }
.account-password-row button {
  position: absolute;
  inset: 1px 1px 1px auto;
  min-width: 48px;
  padding-inline: 8px;
  border: 0;
  border-radius: 0 13px 7px 0;
  background: linear-gradient(90deg, transparent, #f5e6cb);
  color: #67462f;
  font-size: var(--text-label);
  font-weight: 800;
}
.account-recipient {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 4px;
  padding-inline: .55rem;
  border: 1px solid #cdb68c8a;
  border-radius: 8px 12px;
  background: #f4e8d3;
  color: var(--account-muted);
  font-size: var(--text-small);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.account-recipient p { min-width: 0; margin: 5px 0; }
.account-recipient button {
  flex: none;
  min-height: 38px;
  padding-inline: 2px;
  border: 0;
  background: transparent;
  color: #704626;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 750;
}
.account-content .game-button {
  width: 100%;
  min-height: max(44px, var(--touch));
  margin-top: 2px;
  border: 1px solid #bf9d60;
  border-top-color: #eed7a1;
  border-radius: 14px 8px;
  background: radial-gradient(ellipse at 16% 0%, #748b63, transparent 68%), linear-gradient(150deg, #4e6750, #2a4738);
  box-shadow: inset 0 0 0 2px #e7ce9a52, 0 3px 0 #67543b, 0 6px 8px #68452335;
  color: #fff6df;
  text-shadow: 0 1px 2px #1c2d22ac;
}
.account-content .game-button:disabled { opacity: .68; }
.account-text-button {
  display: block;
  min-height: 39px;
  margin: 6px auto 0;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6b4b36;
  font-size: var(--text-label);
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.account-card :is(button,input):focus-visible { outline: 2px solid #80563b; outline-offset: 2px; }
@media (min-width: 39rem) and (min-aspect-ratio: 5 / 4) {
  .account-card {
    --account-hero-size: 0px;
    grid-template-columns: minmax(0, .94fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    width: min(100%, 48rem);
  }
  .account-hero {
    padding-top: clamp(16px, 5dvh, 29px);
    border-bottom: 0;
    border-inline-end: 1px solid #cba66b;
    background:
      linear-gradient(180deg, #31291fbb, transparent 47%),
      url("assets/garden-ui/account-glasshouse.webp") 65% center / cover,
      #554437;
  }
  .account-hero h1 { font-size: clamp(1.7rem, 5vw, 2.65rem); }
}
@media (max-width: 38.99rem) and (max-height: 590px) {
  .account-card { --account-hero-size: clamp(6.6rem, 24dvh, 9rem); }
  .account-content { padding-block: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .account-card { animation: account-panel-in .26s ease-out both; }
  @keyframes account-panel-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}
