/* Page, controls and navigation share one black; colour belongs to neon artwork. */
body.account-page { height: 100svh; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--ks-background); }
.account-cosmos { --orbit-diameter: 38rem; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 0; padding: .75rem; isolation: isolate; overflow: clip; }
.account-cosmos:focus { outline: none; }
.auth-orbit { position: absolute; width: var(--orbit-diameter); aspect-ratio: 1; border-radius: 50%; pointer-events: none; z-index: -1; }
.auth-orbit::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #63243640 0deg, #b8526a9a 70deg, #d197b0c9 145deg, #c4a9dfc2 205deg, #8065a780 280deg, #472a6933 330deg, #63243640 360deg); mask-image: radial-gradient(circle, transparent calc(70.71% - 2px), black calc(70.71% - 1px), black 70.71%, transparent calc(70.71% + 1px)); animation: orbit-light var(--ks-ring-period) linear infinite; }
@keyframes orbit-light { to { transform: rotate(360deg); } }
.auth-card, .platform-panel { position: relative; width: min(100%, 24rem); padding: .75rem 1rem; background: transparent; border: 0; box-shadow: none; }
.account-cosmos h1 { margin: 0 0 .65rem; text-align: center; font-size: clamp(1.5rem, 3vw, 1.85rem); letter-spacing: -.04em; font-weight: 500; line-height: 1.18; }
.auth-intro { margin: 0 0 .75rem; text-align: center; font-size: .75rem; color: #b9afc4; line-height: 1.5; }
.auth-card form { display: flex; flex-direction: column; }
.form-fields { display: grid; gap: .3rem; }
.form-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .35rem; min-width: 0; }
.form-field label { grid-column: 1; grid-row: 1; }
.form-field input { grid-column: 1 / -1; grid-row: 2; }
.auth-card label { font-size: .72rem; line-height: 1.4; color: #e5dfeb; }
.auth-card input { width: 100%; min-width: 0; height: 2.65rem; flex-shrink: 0; border: 1px solid #756282; border-radius: 0; background: var(--ks-background); color: var(--ks-white); font: inherit; font-size: 1rem; padding: .5rem .7rem; }
.auth-card input::placeholder { color: #887c95; }
.auth-card input:focus-visible { border-color: #c4a9df; outline: 2px solid #8065a780; outline-offset: 2px; }
.auth-card input[aria-invalid="true"] { border-color: #d1849a; }
.field-note { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; height: 1rem; margin: 0; color: #aaa1b5; font-size: .65rem; line-height: 1rem; }
.field-note.is-error { color: #e0a7b5; }
.recovery-link { align-self: flex-end; font-size: .68rem; margin: .15rem 0 .35rem; color: #c4a9df; }
.form-message { height: 3.5rem; flex-shrink: 0; margin: .4rem 0 0; overflow-y: auto; font-size: .72rem; line-height: 1.45; color: #e0a7b5; overflow-wrap: anywhere; text-align: center; }
.form-message[data-success] { color: #d4c3eb; }
.primary-button { display: flex; justify-content: center; align-items: center; width: 100%; margin-top: .35rem; min-height: 2.6rem; padding: .6rem 1rem; border: 1px solid #92729e; color: #f5f3fa; background: linear-gradient(110deg, #721c3c88, #57228dbb); cursor: pointer; font: inherit; font-size: .8rem; text-align: center; }
.primary-button:hover { border-color: #d197b0; background: linear-gradient(110deg, #721c3cbb, #57228ddd); }
.primary-button:disabled, .text-button:disabled { opacity: .6; cursor: wait; }
button:focus-visible { outline: 2px solid #bd9aef; outline-offset: 5px; }
.auth-switch { text-align: center; font-size: .68rem; color: #aaa1b5; line-height: 1.5; margin: .2rem 0 0; }
.auth-switch a, .auth-policy a { color: #d5bddf; text-decoration: underline; text-underline-offset: 3px; }
.auth-policy { margin: .4rem 0 0; text-align: center; font-size: .6rem; line-height: 1.5; color: #aaa1b5; }
.platform-panel { width: min(100%, 30rem); }
.platform-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-top: 1.2rem; }
.platform-option { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .5rem; min-width: 0; min-height: 5rem; padding: .6rem; border: 1px solid #39323f; background: var(--ks-background); font: inherit; font-size: 1.15rem; font-weight: 500; color: #82798b; text-align: center; }
.platform-option:disabled { cursor: not-allowed; }
.platform-state { font-size: .6rem; font-weight: 400; white-space: nowrap; }
.platform-option--active { color: #f5f3fa; border-color: #9673a7; background: linear-gradient(140deg, #721c3c55, #57228d77); }
.platform-option--active:hover { border-color: #d197b0; }
.text-button { display: block; margin: .6rem auto 0; background: transparent; border: 0; color: #b9afc4; font: inherit; font-size: .75rem; cursor: pointer; padding: .4rem .8rem; text-align: center; }
.platform-panel .form-message { margin-top: .3rem; height: 2.6rem; }
@media(max-height: 700px) {
  body.account-page { --header-height: 4rem; --footer-height: 5.5rem; }
  .account-page .site-header { height: var(--header-height); min-height: var(--header-height); padding-block: .4rem; }
  .account-page .site-footer { padding-block: .5rem; }
  .account-cosmos { padding-block: .35rem; }
  .auth-card { padding-block: .25rem; }
  .account-cosmos h1 { font-size: 1.4rem; margin-bottom: .4rem; }
  .auth-card input { height: 2.3rem; }
  .form-field { gap: .1rem; }
  .form-fields { gap: .15rem; }
  .form-message { height: 2.8rem; font-size: .68rem; }
  .primary-button { min-height: 2.3rem; padding-block: .4rem; }
}
@media(max-height: 600px) and (min-width: 600px) {
  body.account-page { --header-height: 3rem; --footer-height: 2.75rem; }
  .account-page .site-header .brand-mark { width: 2rem; height: 2rem; }
  .account-page .brand-name { font-size: .8rem; }
  .account-page .brand-name span { font-size: .45rem; margin-top: .2rem; }
  .account-page .contact-link { padding: .4rem .7rem; font-size: .7rem; }
  .account-page .site-footer { min-height: var(--footer-height); padding-block: .2rem; font-size: .65rem; }
  .account-page .footer-email { font-size: .6rem; }
  .account-page .footer-policy { font-size: .55rem; }
  .account-page .footer-brand { font-size: .65rem; }
  .account-cosmos { padding: .25rem .75rem; }
  .auth-card { width: min(100%, 32rem); padding-block: .2rem; }
  .account-cosmos h1 { font-size: 1.3rem; }
  .form-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem .75rem; }
  form[data-action="register"] .form-field:first-child, form[data-action="forgot-password"] .form-field { grid-column: 1 / -1; }
  .auth-card label { font-size: .65rem; }
  .auth-card input { height: 2rem; }
  .field-note { height: .8rem; font-size: .6rem; line-height: .8rem; }
  .form-message { height: 2rem; font-size: .65rem; margin-top: .2rem; }
  .primary-button { min-height: 2rem; padding-block: .35rem; margin-top: .25rem; }
  .auth-switch { font-size: .62rem; }
  .auth-policy { font-size: .55rem; margin-top: .2rem; }
  .auth-intro { font-size: .68rem; margin-bottom: .4rem; }
  .platform-options { margin-top: .6rem; }
  .platform-option { min-height: 4rem; }
}
/* Only genuinely insufficient space (for example text zoom) permits page flow. */
body.account-page[data-form-overflow] { height: auto; grid-template-rows: auto auto auto; }
@media(max-width: 279px), (max-height: 340px) { body.account-page { height: auto; grid-template-rows: auto auto auto; } }
@media(prefers-reduced-motion: reduce) { .auth-orbit::before { animation: none; } }
body.account-page[data-form-overflow] .form-field { grid-template-columns: minmax(0, 1fr); }
body.account-page[data-form-overflow] .field-note { grid-column: 1; grid-row: 3; height: auto; min-height: 1rem; text-align: left; white-space: normal; }
