.account-entry, .account-dialog, #account-reload {
  color: #eef2f1;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.account-entry [hidden], .account-dialog [hidden], #account-reload[hidden], #app[hidden], .account-entry[hidden] {
  display: none;
}
.account-entry {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 5vw, 28px);
  box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 8%, #19362d, #0b0f10 68%);
}
.account-card, .account-dialog {
  background: #121a17;
  border: 1px solid #34433c;
  border-radius: 16px;
  box-sizing: border-box;
  width: min(100%, 420px);
  padding: clamp(20px, 5vw, 34px);
}
.account-card { box-shadow: 0 20px 60px #04080655; }
.account-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c5d4cc;
  font-size: 14px;
  font-weight: 600;
}
.account-logo { border-radius: 9px; flex: none; }
.account-card h1 { margin: 26px 0 22px; font-size: 30px; line-height: 1.2; font-weight: 650; }
.account-dialog h2 { margin: 0; font-size: 19px; }
.account-dialog h3 { margin: 0 0 10px; font-size: 15px; }
.account-entry p, .account-dialog p { margin: 8px 0 14px; color: #b6c5bd; }
.account-entry label, .account-dialog label { display: block; margin: 12px 0 5px; }
.account-entry label { color: #dce8e0; font-weight: 550; }
.account-entry input, .account-dialog input {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #4a5c52;
  border-radius: 8px;
  background: #0e1512;
  color: #eef2f1;
  font: inherit;
  font-size: 16px;
}
.account-entry input { min-height: 46px; }
.account-password {
  display: grid;
  grid-template: "label helper" "control control" / 1fr auto;
  align-items: baseline;
  row-gap: 5px;
  margin-top: 12px;
}
#entry-password-label { grid-area: label; margin: 0; }
#entry-password { grid-area: control; }
.account-password button { grid-area: helper; }
#entry-code { margin-top: 5px; }
.account-code-row { display: flex; gap: 8px; }
.account-code-row input { min-width: 0; }
.account-code-row button { flex-shrink: 0; }
.account-entry button, .account-dialog button, #account-reload button {
  padding: 8px 12px;
  min-height: 36px;
  background: #1c2b24;
  color: #eef2f1;
  border: 1px solid #4a5c52;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}
.account-entry .account-primary, .account-dialog .account-primary {
  color: #09201a;
  background: #54d7b4;
  border-color: #54d7b4;
  font-weight: 650;
}
#entry-submit { width: 100%; min-height: 46px; margin: 22px 0 0; }
#registration-send.account-primary { width: 100%; min-height: 46px; margin-top: 18px; }
.account-entry-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #34433c;
  color: #b6c5bd;
}
.account-entry .account-text-button {
  padding: 0 2px;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #7ce0c3;
  font-weight: 600;
}
.account-entry .account-text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.account-entry :focus-visible, .account-dialog :focus-visible, #account-reload :focus-visible {
  outline: 2px solid #54d7b4;
  outline-offset: 2px;
}
.account-entry button:disabled, .account-dialog button:disabled { opacity: .6; cursor: wait; }
.account-entry .account-error, .account-dialog .account-error { color: #ffa49b; }
.account-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.account-dialog {
  width: min(calc(100% - 32px), 460px);
  max-height: calc(100% - 32px);
  margin: auto;
  overflow: auto;
}
.account-dialog::backdrop { background: #050908c9; }
.account-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.account-section { margin-top: 15px; padding-top: 15px; border-top: 1px solid #34433c; }
#recovery-value {
  display: block;
  padding: 12px;
  background: #0e1512;
  border-radius: 8px;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
#account-reload {
  position: fixed;
  z-index: 9999;
  inset: auto 12px max(12px, env(safe-area-inset-bottom));
  margin: auto;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #172722;
  border: 1px solid #54d7b4;
  border-radius: 12px;
}
.account-trigger { white-space: nowrap; }
@media (max-width: 480px) { .top-right .local-top { display: none; } }
