.account-page {
  min-height: 100svh;
  background:
    linear-gradient(100deg, #101210f5, #151a11ed),
    url("/static/site-assets/sharingan-moon.jpg") center top/cover fixed;
}

/* Account protection follows the portal's ink, parchment and gold palette. */
.account-page button.text-link {
  background: none;
  border: 0;
  padding: 0;
  font: 600 14px/1.6 Inter, sans-serif;
  color: #e9b77a;
  text-align: left;
}
.account-page .login-card button.text-link { color: #574220; }
.account-page .security-dialog .button.outline { background: #181b16; color: #e8dfc8; border-color: #85714e; }
.security-section {
  margin-top: 64px;
  scroll-margin-top: 30px;
}
.security-section h2 {
  font:
    700 clamp(32px, 4vw, 48px) / 1.1 "Barlow Condensed",
    sans-serif;
  margin-bottom: 16px;
}
.security-section h2 span {
  color: #e9a34c;
}
.security-intro,
.security-row p,
.security-sessions p,
.security-dialog p {
  color: #c1baa9;
  line-height: 1.65;
  max-width: 70ch;
}
.security-intro {
  margin-bottom: 28px;
}
.security-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid #655842;
}
.security-row h3 {
  font:
    600 27px/1.25 "Barlow Condensed",
    sans-serif;
  margin-bottom: 10px;
}
.security-row p {
  margin: 8px 0;
}
.security-detail {
  font-size: 14px;
}
.security-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 14px;
}
.security-actions .button {
  white-space: normal;
  text-align: center;
}
.security-badge {
  display: inline-block;
  vertical-align: middle;
  font:
    600 12px/1.5 Inter,
    sans-serif;
  padding: 3px 9px;
  color: #efbd81;
  background: #382c1d;
  margin-left: 8px;
}
.security-badge.enabled {
  color: #b8d7a3;
  background: #263225;
}
.security-sessions {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.security-sessions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid #655842;
}
.security-sessions li > div {
  min-width: 0;
}
.security-sessions strong {
  font-weight: 600;
}
.security-sessions p {
  font-size: 14px;
  margin: 6px 0 0;
  font-variant-numeric: tabular-nums;
}
.security-sessions button {
  flex-shrink: 0;
}
.security-history {
  border-top: 1px solid #655842;
  padding-top: 20px;
}
.security-history summary {
  cursor: pointer;
  padding-block: 10px;
  color: #e8dfc8;
}
.security-history ol {
  padding-left: 20px;
  color: #c1baa9;
  font-size: 14px;
}
.security-history li {
  margin-block: 12px;
  line-height: 1.6;
}
.security-dialog {
  color-scheme: dark;
  color: #e8dfc8;
  background: #181b16;
  border: 1px solid #85714e;
  border-radius: 12px;
  padding: 32px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  margin: auto;
}
.security-dialog::backdrop {
  background: #080b08dd;
}
.security-dialog h2 {
  font:
    700 32px/1.12 "Barlow Condensed",
    sans-serif;
  margin: 0 0 16px;
}
.security-dialog p {
  margin: 12px 0 20px;
}
.security-dialog label {
  display: block;
  margin: 20px 0 8px;
  font-size: 14px;
  font-weight: 600;
}
.security-dialog input:not([type="checkbox"]) {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border: 1px solid #756b57;
  border-radius: 4px;
  color: #f2ead8;
  background: #101310;
  font:
    16px Inter,
    sans-serif;
  caret-color: #e9a34c;
}
.security-dialog input:focus-visible,
.security-dialog button:focus-visible,
.security-section button:focus-visible,
.security-history summary:focus-visible {
  outline: 2px solid #e9a34c;
  outline-offset: 4px;
}
.security-dialog .check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  line-height: 1.6;
  margin-block: 24px;
}
.check-label input {
  margin-top: 5px;
  accent-color: #e9a34c;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-top: 24px;
}
.security-dialog button,
.security-section button,
.recovery-link {
  min-height: 44px;
}
.security-dialog button:disabled,
.security-section button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.secret-value {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
  font:
    14px/1.9 ui-monospace,
    monospace;
  color: #f2ddb8;
  background: #101310;
  border: 1px solid #655842;
  padding: 16px;
  margin-block: 16px;
}
#authenticator-qr {
  display: block;
  width: min(100%, 250px);
  height: auto;
  margin: 24px auto;
  background: white;
}
.recovery-link {
  margin-top: 18px;
  font-size: 14px;
}
#challenge-form h3 {
  font:
    600 26px "Barlow Condensed",
    sans-serif;
  margin: 20px 0 10px;
}
#challenge-form p {
  color: #5c5545;
  font-size: 14px;
  line-height: 1.6;
}
#challenge-form .text-link {
  margin-top: 20px;
  min-height: 44px;
}
.danger-link {
  color: #e9a99b;
}
#security-status:not(:empty) {
  padding: 14px 0;
  color: #efbd81;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .security-section {
    margin-top: 44px;
  }
  .security-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .security-actions {
    align-items: flex-start;
  }
  .security-sessions li {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .security-dialog {
    padding: 24px 20px;
  }
  .security-dialog .button {
    width: 100%;
  }
  .security-row h3 {
    font-size: 25px;
  }
}
[hidden] {
  display: none !important;
}
.account-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid #ffffff1c;
}
.account-header nav {
  display: flex;
  gap: 26px;
  font-size: 12px;
}
.account-header a:hover {
  color: var(--gold);
}
.account-header-label {
  font-size: 9px;
  color: #a8ad98;
  letter-spacing: 2px;
}
.account-main {
  min-height: calc(100svh - 175px);
  padding-block: 55px;
}
.page-status {
  font-size: 13px;
  color: #c9cbb9;
  margin-bottom: 20px;
  min-height: 22px;
}
.page-status:empty {
  display: none;
}
.login-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 75px;
  align-items: center;
}
.login-story {
  position: relative;
  isolation: isolate;
  min-height: 660px;
  padding-top: 24px;
}
.login-story .eyebrow {
  font-size: 10px;
}
.login-story h1 {
  font: 700 clamp(45px, 5vw, 68px) / 1 var(--heading);
  margin: 23px 0 18px;
  max-width: 600px;
}
.login-story h1 span {
  color: var(--gold);
}
.login-story > p:not(.eyebrow) {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
}
.login-story img {
  width: 590px;
  max-width: 110%;
  height: 370px;
  object-fit: contain;
  position: absolute;
  left: -40px;
  bottom: 20px;
  filter: drop-shadow(0 15px 25px #0008);
}
.story-caption {
  font-size: 8px;
  letter-spacing: 1.7px;
  color: #919981;
  position: absolute;
  bottom: 0;
}
.login-card {
  background: #e8dfc8;
  color: #342d21;
  padding: 40px;
  border: 1px solid #b09868;
  box-shadow:
    0 20px 70px #0003,
    inset 0 0 0 5px #cfbe9344;
  position: relative;
}
.login-card:before,
.login-card:after {
  content: "";
  width: 24px;
  height: 24px;
  border-top: 2px solid #a87b3b;
  border-left: 2px solid #a87b3b;
  position: absolute;
  top: 7px;
  left: 7px;
}
.login-card:after {
  top: auto;
  left: auto;
  bottom: 7px;
  right: 7px;
  transform: rotate(180deg);
}
.login-card-heading > span {
  font: 34px serif;
  position: absolute;
  right: 38px;
  top: 32px;
  color: #9b582c;
}
.login-card .eyebrow {
  color: #845521;
  font-size: 9px;
  letter-spacing: 1.5px;
}
.login-card h2 {
  font-size: 38px;
  margin: 18px 0 10px;
}
.login-card-heading > p:last-child {
  font-size: 12px;
  color: #6d624c;
  max-width: 280px;
}
.login-card form {
  margin-top: 28px;
}
.login-card label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 18px 0 7px;
}
.login-card input {
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid #aa94715c;
  border-radius: 0;
  background: #f8f4e9;
  color: #28261d;
  outline-offset: 2px;
  font-size: 14px;
}
.login-card input::placeholder {
  color: #817966;
}
.login-card :focus-visible {
  outline-color: #88541f;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 81px;
}
.password-field button {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 76px;
  background: transparent;
  border: 0;
  color: #795122;
  font-size: 11px;
  font-weight: 600;
}
.login-card .button {
  width: 100%;
  margin-top: 24px;
  clip-path: none;
  font-size: 13px;
  justify-content: space-between;
}
.login-card .button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.session-note {
  margin-top: 19px;
  font-size: 10px;
  line-height: 1.8;
  color: #71664f;
}
.account-help {
  border-top: 1px solid #9d875840;
  margin-top: 23px;
  padding-top: 18px;
}
.account-help strong {
  font-size: 12px;
}
.account-help p {
  font-size: 11px;
  margin-top: 5px;
  color: #71664f;
  line-height: 1.8;
}
.form-message {
  font-size: 12px;
  margin-top: 14px;
  padding: 11px 14px;
  line-height: 1.7;
}
.login-card .error {
  background: #a6322510;
  border-left: 3px solid #a84b36;
  color: #7d271c;
}
.profile-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}
.profile-heading h1 {
  font: 700 clamp(38px, 4.5vw, 62px) / 1.1 var(--heading);
  margin: 17px 0 13px;
  overflow-wrap: anywhere;
}
.profile-heading h1 span {
  color: var(--gold);
}
.profile-heading > div > p:last-child {
  font-size: 13px;
  color: var(--muted);
}
.profile-heading button {
  flex-shrink: 0;
}
.profile-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 38px 0 50px;
  border: 1px solid #b79b5738;
  background: #1c2318bb;
}
.profile-summary p {
  padding: 23px 26px;
  overflow-wrap: anywhere;
}
.profile-summary p + p {
  border-left: 1px solid #b79b5725;
}
.profile-summary small {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1.1px;
  display: block;
}
.profile-summary strong {
  font-size: 22px;
  display: block;
  color: #ebd6b0;
  margin-top: 6px;
}
.character-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 23px;
}
.character-heading h2 {
  font-size: 38px;
}
.character-heading button {
  background: none;
  border: 0;
  color: var(--gold);
  min-height: 44px;
}
.account-characters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.account-character {
  border: 1px solid #b79b573a;
  background: linear-gradient(130deg, #2d3422, #171e13);
  padding: 25px;
  position: relative;
  overflow: hidden;
}
.account-character:before {
  content: "忍";
  position: absolute;
  right: 10px;
  top: 35px;
  font: 130px serif;
  color: #d7b06c09;
  pointer-events: none;
}
.character-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.character-top > span:first-child {
  font-size: 9px;
  color: #aeb99e;
  letter-spacing: 1.2px;
}
.character-state {
  font-size: 10px;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #a9b19f;
}
.character-state:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7e8970;
}
.character-state.online {
  color: #b4d191;
}
.character-state.online:before {
  background: #b4d191;
}
.account-character h3 {
  font: 600 30px/1.1 var(--heading);
  margin: 23px 0 10px;
  color: #e9d5af;
  overflow-wrap: anywhere;
}
.character-vocation {
  font-size: 12px;
  color: var(--muted);
  min-height: 25px;
}
.character-stats {
  display: flex;
  gap: 35px;
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid #b79b5733;
}
.character-stats small {
  display: block;
  font-size: 9px;
  color: #a1ac92;
}
.character-stats strong {
  display: block;
  font: 500 27px var(--heading);
  color: #e4d5b4;
}
.account-notice {
  border: 1px solid #b79b5744;
  padding: 25px;
  font-size: 13px;
  color: var(--muted);
}
.profile-bottom {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 50px;
  margin-top: 38px;
  border-top: 1px solid #b79b5728;
  padding-top: 30px;
}
.profile-bottom h3 {
  font: 600 27px var(--heading);
  margin-bottom: 10px;
}
.profile-bottom p {
  font-size: 12px;
  color: var(--muted);
  max-width: 410px;
  margin-bottom: 10px;
}
.profile-bottom button {
  background: none;
  border: 0;
  color: var(--gold);
  padding: 12px 0;
  margin-top: 5px;
}
.profile-bottom button:disabled,
.profile-heading button:disabled,
.character-heading button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.account-wiki {
  padding: 25px;
  border: 1px solid #b79b5744;
  background: #202719;
}
.account-wiki small {
  font-size: 8px;
  letter-spacing: 1.4px;
  color: var(--gold);
}
.account-wiki h3 {
  font-size: 30px;
  margin: 12px 0 20px;
}
.account-wiki > span {
  font-size: 12px;
  color: #d1bb90;
}
.profile-view .error,
#profile-error {
  background: #48221d;
  border-left: 3px solid #e99172;
  color: #f4cbbb;
  margin-bottom: 20px;
}
.account-footer {
  border-top: 1px solid #ffffff1c;
  padding-block: 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 9px;
  color: #9aa38d;
}
.account-footer a {
  color: var(--gold);
}
@media (max-width: 1000px) {
  .login-layout {
    gap: 35px;
    grid-template-columns: 1fr 1fr;
  }
  .login-card {
    padding: 30px;
  }
  .login-card h2 {
    font-size: 31px;
  }
  .login-card-heading > span {
    right: 28px;
    top: 23px;
    font-size: 28px;
  }
  .login-story {
    min-height: 620px;
  }
  .login-story img {
    max-width: 125%;
    left: -35px;
    bottom: 20px;
    height: 330px;
  }
  .account-header-label {
    display: none;
  }
  .account-characters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-summary p {
    padding: 20px;
  }
  .profile-summary small {
    font-size: 8px;
  }
}
@media (max-width: 700px) {
  .account-header {
    min-height: 80px;
    gap: 18px;
  }
  .account-header .brand img {
    width: 135px;
  }
  .account-header nav {
    gap: 15px;
    font-size: 10px;
  }
  .account-main {
    padding-block: 30px;
  }
  .login-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .login-story {
    min-height: 210px;
    padding-top: 5px;
    padding-right: 90px;
    overflow: hidden;
  }
  .login-story h1 {
    font-size: 41px;
    position: relative;
    z-index: 1;
    max-width: 250px;
    margin-block: 17px 12px;
  }
  .login-story > p:not(.eyebrow) {
    font-size: 12px;
    max-width: 220px;
    position: relative;
    z-index: 1;
  }
  .login-story img {
    height: 200px;
    width: 260px;
    max-width: none;
    left: auto;
    right: -90px;
    bottom: 0;
    opacity: 0.4;
    z-index: -1;
  }
  .story-caption {
    display: none;
  }
  .login-story .eyebrow {
    font-size: 8px;
  }
  .login-card {
    padding: 30px 25px;
  }
  .login-card h2 {
    font-size: 32px;
  }
  .login-card-heading > span {
    right: 24px;
  }
  .login-card input {
    font-size: 16px;
  }
  .session-note {
    font-size: 11px;
  }
  .account-help p {
    font-size: 12px;
  }
  .account-footer {
    font-size: 8px;
  }
  .profile-heading {
    display: block;
  }
  .profile-heading h1 {
    font-size: 40px;
  }
  .profile-heading .button {
    margin-top: 20px;
    min-height: 44px;
    font-size: 11px;
  }
  .profile-summary {
    grid-template-columns: 1fr 1fr;
    margin-block: 26px 32px;
  }
  .profile-summary p:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #b79b5725;
  }
  .profile-summary p:nth-child(4) {
    border-top: 1px solid #b79b5725;
  }
  .profile-summary strong {
    font-size: 19px;
  }
  .character-heading h2 {
    font-size: 30px;
  }
  .character-heading button {
    font-size: 11px;
  }
  .account-characters {
    grid-template-columns: 1fr;
  }
  .profile-bottom {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .profile-bottom p {
    font-size: 12px;
  }
  .profile-bottom h3 {
    font-size: 25px;
  }
  .account-header nav a:last-child {
    display: none;
  }
  .character-heading {
    gap: 12px;
  }
}
