@font-face {
  font-family: "DynaPuff";
  src: url("/media/fonts/DynaPuff-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

html:has(body.account-page),
body.account-page {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  max-width: 100%;
}

body.account-page {
  color: #fff;
  background: #282828;
  font-family: "DynaPuff", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.account-shell {
  box-sizing: border-box;
  width: 100%;
  min-height: 100dvh;
  background: #282828;
  display: grid;
  grid-template-rows: auto 1fr;
}

/* Footer is mobile-only on Register/Login; desktop keeps header+main. */
.account-shell--foot {
  grid-template-rows: auto 1fr;
}

.account-foot {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem clamp(1.5rem, 4vw, 4.5rem) 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.account-foot-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.account-foot-logo img {
  display: block;
  width: clamp(6.5rem, 12vw, 8.5rem);
  height: auto;
  mix-blend-mode: lighten;
}

.account-top-btn {
  margin: 0;
  padding: 0.65rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.account-top-btn:hover,
.account-top-btn:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.25rem clamp(1.5rem, 4vw, 4.5rem) 0;
  border: 0;
  background: transparent;
  position: relative;
  z-index: 5;
}

.account-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  position: relative;
  z-index: 6;
}

.account-logo img {
  display: block;
  width: clamp(11rem, 18vw, 17.5rem);
  height: auto;
  mix-blend-mode: lighten;
}

.account-world {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(249, 215, 117, 0.6);
  border-radius: 999px;
  color: #f9d775;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.account-menu-toggle {
  display: none;
  position: relative;
  z-index: 6;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.account-menu-toggle-bar {
  display: block;
  width: 1.55rem;
  height: 0.18rem;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.account-shell.is-menu-open .account-menu-toggle-bar:nth-child(1) {
  transform: translateY(0.58rem) rotate(45deg);
}

.account-shell.is-menu-open .account-menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.account-shell.is-menu-open .account-menu-toggle-bar:nth-child(3) {
  transform: translateY(-0.58rem) rotate(-45deg);
}

.account-nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: clamp(1.25rem, 3vw, 2.75rem);
}

.account-nav a,
.account-nav-item {
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.account-nav a:hover,
.account-nav a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.account-nav a[aria-current="page"] {
  color: #f9d775;
}

.account-nav-item {
  opacity: 0.5;
  cursor: default;
}

.account-main {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 3.85rem clamp(1.5rem, 4vw, 4.5rem) 4.5rem;
}

/* Desktop Register/Login: center form+hero in the full viewport (header overlays). */
@media (min-width: 901px) {
  .account-shell--foot {
    position: relative;
  }

  .account-shell--foot .account-main {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
  }
}

.account-main h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.account-main h2 {
  margin: 2rem 0 1rem;
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 600;
}

.account-main h3 {
  margin: 1.25rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.account-main > p {
  margin: 0 0 1.1rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  line-height: 1.55;
  opacity: 0.92;
  max-width: 40rem;
}

.account-panel {
  box-sizing: border-box;
  max-width: 28rem;
  margin: 0;
  padding: 2rem 1.65rem 2.15rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.04);
}

/* Experimental Register hero — delete with the figure in account/index.php to revert. */
.account-register-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 100px;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.account-register-layout--login {
  gap: 50px;
}

.account-register-copy {
  flex: 0 1 28rem;
  min-width: 0;
}

.account-register-copy h1 {
  margin: 0 0 1.15rem;
}

.account-register-hero {
  --creator-frames: 10;
  --creator-duration: 1.25s;
  --creator-height: min(19.6rem, 50.4vh, 40.6vw);
  --creator-aspect-w: 133;
  --creator-aspect-h: 319;
  box-sizing: border-box;
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  height: var(--creator-height);
  width: calc(var(--creator-height) * var(--creator-aspect-w) / var(--creator-aspect-h));
  margin: 0.5rem 0 0;
  padding: 0;
  line-height: 0;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
  transform: scaleX(-1);
}

.account-register-hero--login {
  --creator-frames: 4;
  --creator-duration: 0.7s;
  --creator-aspect-w: 178;
  --creator-aspect-h: 268;
  margin-top: calc(0.5rem + 50px);
}

.account-register-hero-sheet {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  width: auto;
  max-width: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: account-creator-cast var(--creator-duration) steps(var(--creator-frames)) infinite;
  will-change: transform;
}

@keyframes account-creator-cast {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-100%, 0, 0);
  }
}

.account-form {
  display: grid;
  gap: 1.65rem;
  margin: 0;
}

.account-form label {
  display: grid;
  gap: 0.65rem;
  font-size: 0.98rem;
  font-weight: 500;
}

.account-form input,
.account-form select {
  box-sizing: border-box;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font: inherit;
}

.account-form select {
  padding-right: 1.65rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1.1 1.1 6 6 10.9 1.1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.75rem 0.5rem;
}

.account-form input:focus-visible,
.account-form select:focus-visible {
  outline: 2px solid #f9d775;
  outline-offset: 2px;
}

.account-form select option {
  color: #282828;
}

.account-alert,
.account-status {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.45rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.account-alert {
  background: rgba(255, 100, 100, 0.14);
  border: 1px solid rgba(255, 140, 140, 0.35);
}

.account-alert p {
  margin: 0;
}

.account-alert ul {
  margin: 0.45rem 0 0;
  padding-left: 1.15rem;
}

.account-alert li + li {
  margin-top: 0.25rem;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.65rem;
}

.account-form-full {
  grid-column: 1 / -1;
}

.account-email-card {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(249, 215, 117, 0.35);
  border-radius: 0.45rem;
  background: rgba(249, 215, 117, 0.08);
}

.account-email-card p {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.account-email-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.account-email-form input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font: inherit;
}

.account-email-verified {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  opacity: 0.72;
}

.account-note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.78;
}

.account-form input[aria-invalid="true"],
.account-form select[aria-invalid="true"] {
  border-color: rgba(255, 140, 140, 0.75);
}

@media (max-width: 700px) {
  .account-form-grid {
    grid-template-columns: 1fr;
  }
}

.account-status {
  background: rgba(249, 215, 117, 0.12);
  border: 1px solid rgba(249, 215, 117, 0.35);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.account-button {
  margin: 0;
  padding: 0.7rem 1.15rem;
  border: 0;
  border-radius: 0.45rem;
  background: #f9d775;
  color: #282828;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-button:hover,
.account-button:focus-visible {
  filter: brightness(1.05);
}

.account-button.secondary {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.account-panel > .account-switch {
  margin: 1.075rem 0 0;
  font-size: 0.98rem;
  line-height: 1.45;
  opacity: 0.95;
}

.account-switch a {
  color: #f9d775;
  text-decoration: none;
}

.account-switch a:hover,
.account-switch a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.account-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}

.account-toolbar a {
  color: #f9d775;
  text-decoration: none;
}

.account-toolbar a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.character-list {
  padding: 0;
  list-style: none;
  margin: 0;
  max-width: 40rem;
}

.character-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.85rem 0;
}

.character-list a {
  color: #f9d775;
  text-decoration: none;
  font-weight: 600;
}

.character-list a:hover {
  text-decoration: underline;
}

.character-list span {
  opacity: 0.75;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.metric-grid div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.45rem;
  padding: 0.75rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
}

.metric-grid dt {
  margin: 0 0 0.35rem;
  opacity: 0.75;
  font-size: 0.9rem;
}

.metric-grid dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.portrait {
  max-width: min(100%, 16rem);
  height: auto;
  image-rendering: pixelated;
  margin: 0 0 1rem;
}

.account-main section > ul {
  padding-left: 1.15rem;
  margin: 0 0 1rem;
}

.account-main section li {
  margin: 0.35rem 0;
}

.account-main section a {
  color: #f9d775;
  text-decoration: none;
}

.account-main section a:hover {
  text-decoration: underline;
}

@media (min-width: 1100px) {
  .account-main {
    padding-top: 4.35rem;
    padding-bottom: 5rem;
  }

  .account-shell--foot .account-main {
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 900px) {
  .account-top {
    padding: 1rem 1.15rem 0;
    gap: 1rem;
  }

  .account-logo img {
    width: min(12.5rem, 58vw);
  }

  .account-menu-toggle {
    display: inline-flex;
  }

  .account-nav {
    display: none;
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 1.15rem;
    left: auto;
    width: min(15.5rem, calc(100vw - 2.3rem));
    margin: 0;
    padding: 0.85rem 1rem;
    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: #fff;
    border-radius: 0.55rem;
    box-shadow: 0 0.65rem 1.6rem rgba(0, 0, 0, 0.35);
  }

  .account-shell.is-menu-open .account-nav {
    display: flex;
  }

  .account-nav a,
  .account-nav-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.35rem;
    color: #282828;
    font-size: 1.2rem;
    line-height: 1.2;
    opacity: 1;
    border-bottom: 1px solid rgba(40, 40, 40, 0.08);
    white-space: normal;
  }

  .account-nav-item {
    opacity: 0.45;
  }

  .account-nav a:last-child,
  .account-nav-item:last-child {
    border-bottom: 0;
  }

  .account-nav a:hover,
  .account-nav a:focus-visible {
    text-decoration: none;
    background: rgba(40, 40, 40, 0.06);
    border-radius: 0.35rem;
  }

  .account-nav a[aria-current="page"] {
    color: #282828;
    text-decoration: none;
    background: rgba(40, 40, 40, 0.06);
    border-radius: 0.35rem;
  }

  .account-main {
    padding: 1.85rem 1.15rem 2.75rem;
  }

  .account-shell--foot {
    grid-template-rows: auto 1fr auto;
  }

  .account-foot {
    display: flex;
    padding: 1.35rem 1.15rem 1.85rem;
  }

  .account-top-btn {
    padding: 0.6rem 0.95rem;
  }

  .account-main h1 {
    font-size: clamp(1.55rem, 7vw, 2rem);
  }

  .account-panel {
    padding: 1.65rem 1.15rem 1.85rem;
  }

  .account-register-layout {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .account-register-copy {
    flex-basis: auto;
  }

  .account-register-hero {
    --creator-height: min(15.456rem, 53.13vw);
    order: -1;
    align-self: center;
    /* Match Emp-on-Information: sit above the title with even breathing. */
    margin: 0 auto 1.85rem;
  }

  .account-register-hero--login {
    --creator-height: min(13.44rem, 46.2vw);
  }
}

@media (max-width: 480px) {
  .account-top {
    padding: 1rem 1rem 0;
  }

  .account-nav {
    right: 1rem;
    width: min(15.5rem, calc(100vw - 2rem));
  }

  .account-main {
    padding: 1.65rem 1rem 2.5rem;
  }

  .account-foot {
    /* Match .account-top horizontal inset so logo/button align with the header. */
    padding: 1.2rem 1rem 1.65rem;
  }

  .account-foot-logo img {
    width: min(6.25rem, 42vw);
  }
}
