body.account-page::before { content: none; }
.account-topline { justify-content: flex-end; min-height: 41px; }
.account-topline > div { display: flex; align-items: center; gap: 16px; }
.account-header { background: #fff; border-bottom: 1px solid var(--line); }
.account-nav[hidden], .account-shell [hidden], .account-characters [hidden] { display: none; }
.account-nav a[aria-current="page"] { color: #8f392f; text-decoration: underline; text-underline-offset: 3px; }
.account-nav button {
  border: 0;
  padding: 0;
  font: inherit;
  background: none;
  color: #625b52;
}
.account-nav button:hover { text-decoration: underline; text-underline-offset: 3px; }

.account-shell {
  width: calc(100% - 40px);
  max-width: 960px;
  min-height: 0;
  margin: 0 auto 56px;
  padding-top: clamp(26px, 4vw, 48px);
}
.account-shell[data-view="register"] { max-width: 720px; }
.account-heading {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.account-card {
  min-width: 0;
  padding: clamp(18px, 3.5vw, 30px);
  border: 1px solid #ded7cb;
  border-top: 3px solid #ad9362;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px #483b2910;
}
.account-card h2 { margin: 0 0 18px; font-size: 21px; line-height: 1.3; }
.account-note { margin: 0; color: #60584e; font-size: 14px; }
.account-register-note { margin-bottom: 20px; }
.account-card .button { min-height: 42px; padding: 8px 15px; border-radius: 4px; font-size: 15px; }
.account-card .button:focus-visible, .account-nav :focus-visible, .account-header .brand:focus-visible {
  outline: 2px solid #947643;
  outline-offset: 3px;
}
.account-notice { max-width: 620px; margin-bottom: 22px; }
.account-notice p { margin: 0; font-size: 16px; }
.account-notice .button { margin-top: 18px; }
.account-notice p[data-error="true"], .account-feedback[data-error="true"], .account-note[data-error="true"] { color: #9c302a; }

.account-form { display: grid; gap: 15px; }
.account-register-form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.account-wide { grid-column: 1 / -1; }
.account-form label { display: grid; gap: 6px; min-width: 0; color: #50483f; font-size: 14px; font-weight: 700; }
.account-form input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #cec5b7;
  border-radius: 4px;
  background: #fdfcf9;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
}
.account-form input:focus {
  outline: 2px solid #ad9362;
  outline-offset: 1px;
  background: #fff;
}
.account-form > button[type="submit"] { justify-self: start; }
.account-register-form > button[type="submit"] { justify-self: end; }
.account-feedback { margin: 0; color: #46633f; font-size: 14px; }
.account-feedback:empty, #account-character-status:empty { display: none; }
.account-card-footer { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e8e1d7; font-size: 14px; }
.account-card-footer a { color: #8f392f; text-decoration: underline; text-underline-offset: 3px; }

.account-captcha {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 12px 16px;
  padding: 14px;
  border: 1px solid #e0d6c4;
  border-radius: 5px;
  background: #f5f1e9;
}
.account-captcha-picture { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.account-captcha-picture img { max-width: 100%; height: auto; border: 1px solid #c6bdad; border-radius: 4px; }
#settings-section .account-captcha { grid-template-columns: minmax(0, 1fr); }
.account-captcha .account-feedback { grid-column: 1 / -1; }

.account-characters { margin-bottom: 20px; }
.account-characters h3 { margin: 0 0 10px; font-size: 17px; }
.account-characters .table-wrap { margin: 0; }
.account-characters table { width: 100%; min-width: 0; table-layout: fixed; }
.account-characters th, .account-characters td { padding: 11px 13px; font-size: 14px; overflow-wrap: anywhere; white-space: normal; }
.account-characters th { background: #f3eee4; color: #52483a; }
.account-characters :is(th, td):is(:first-child, :nth-child(3)) { width: 5rem; text-align: center; }
.account-characters td:nth-child(2) { font-weight: 700; }
.account-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items: start; gap: 20px; }

.account-summary { max-width: 580px; margin: 0 auto; padding-top: clamp(26px, 4vw, 48px); }
.account-summary .account-identity { margin: 5px 0 22px; overflow-wrap: anywhere; font-size: 25px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 600px) {
  .account-shell { width: calc(100% - 28px); margin-bottom: 36px; }
  .account-header header { min-height: 0; }
  .account-header .brand-logo { width: 145px; height: 101px; }
  .account-register-form, .account-captcha { grid-template-columns: minmax(0, 1fr); }
  .account-register-form > button[type="submit"] { width: 100%; }
  .account-characters th, .account-characters td { padding: 9px 5px; font-size: 13px; }
  .account-characters :is(th, td):is(:first-child, :nth-child(3)) { width: 3.25rem; }
}
