.auth-panel {
    width: min(100%, 560px);
    margin: 64px auto 40px;
    padding: 40px clamp(20px, 4vw, 40px) 28px;
    overflow-wrap: anywhere;
}
.auth-panel--wide {
    max-width: 720px;
    width: 100%;
}
.auth-panel::before {
    display: block;
    width: 64px;
    height: 64px;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: url('../assets/images/emblem-small.png') center / contain no-repeat;
}
.auth-panel h1 {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 16px;
}
.auth-intro {
    margin-block: 12px 24px;
    color: var(--muted);
}
.account-form, .form-field {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.account-form {
    gap: 20px;
}
.form-field label {
    color: var(--gold);
}
.form-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}
.form-field select {
    font: inherit;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .5rem .7rem;
    border: 1px solid #8b7d69;
    border-radius: 3px;
    color: var(--text);
    background: #080a0a;
}
.form-field option {
    background: #080a0a;
}
.field-hint {
    color: var(--muted);
    font-size: 1rem;
}
.field-error {
    color: #ffad99;
    font-size: 1rem;
}
[aria-invalid='true'] {
    border-color: #ffad99 !important;
}
.form-error, .pending-notice, .name-preview {
    padding: 12px 16px;
    background: #211a11;
    border-left: 3px solid #c8a477;
}
.form-error {
    color: #ffcebf;
    background: #32120e;
    border-color: #f1856c;
}
.pending-notice {
    margin-block: 16px;
}
.account-form .pending-notice {
    margin: 0;
}
/* Messages float at the top of the page (no layout shift) above everything, incl. the header art. */
.flash {
    position: absolute;
    z-index: 30;
    top: 14px;
    left: 50%;
    width: max-content;
    max-width: min(720px, 90%);
    margin: 0;
    transform: translateX(-50%);
    border: 3px double;
    box-shadow: inset 0 0 0 3px #090908, 0 10px 28px #000c;
    cursor: pointer;
    transition: opacity .35s ease, transform .35s ease;
}
.flash + .flash {
    top: 84px; /* a second message stacks below the first */
}
.flash.is-hiding {
    opacity: 0;
    transform: translate(-50%, -10px);
}
.flash--success {
    border-color: #9db984;
    color: #e1efcf;
}
.flash--error {
    border-color: #ed9b82;
    color: #ffcebf;
}
.account-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-block: 24px;
}
.account-details dt {
    color: var(--muted);
    font-size: 1rem;
}
.account-details dd {
    margin: 4px 0 0;
}
.account-section {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 24px;
}
.account-section h2 {
    margin-bottom: 20px;
}
.character-list li {
    padding-block: 12px;
    border-bottom: 1px solid #393126;
}
.character-list .badge {
    margin-left: 8px;
}
.character-detail {
    display: block;
    color: var(--muted);
}
.account-logout {
    margin-top: 28px;
}
/* Standard WoW class colours on near-black. */
.wow-class--warrior {
    --class-color: #c79c6e;
    color: var(--class-color);
}
.wow-class--paladin {
    --class-color: #f58cba;
    color: var(--class-color);
}
.wow-class--hunter {
    --class-color: #abd473;
    color: var(--class-color);
}
.wow-class--rogue {
    --class-color: #fff569;
    color: var(--class-color);
}
.wow-class--priest {
    --class-color: #ffffff;
    color: var(--class-color);
}
.wow-class--shaman {
    /* #0070de brightened for AA contrast on near-black */
    --class-color: #3d9bff;
    color: var(--class-color);
}
.wow-class--mage {
    --class-color: #69ccf0;
    color: var(--class-color);
}
.wow-class--warlock {
    --class-color: #9482c9;
    color: var(--class-color);
}
.wow-class--druid {
    --class-color: #ff7d0a;
    color: var(--class-color);
}
/* Header account links live in layout.css. */
@media (max-width: 599px) {
    .form-columns, .account-details {
        grid-template-columns: minmax(0, 1fr);
    }
    .auth-panel {
        margin-top: 56px;
    }
}

.form-field input {
    border-color: #8b7d69;
}
.form-field select.wow-class {
    color: var(--class-color);
}

/* "Change name" + "Change password" buttons; the chosen editor unfolds below them. */
.account-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
}
.account-actions .member-name {
    margin: 0;
}
.account-actions .button .icon {
    flex-shrink: 0;
}
.account-actions .button[aria-expanded='true'] {
    color: #ffe3b0;
    border-color: #b2583c;
    background: linear-gradient(#4a1510, #2a0a07);
}
.name-editor {
    margin-top: 18px;
    padding: 18px 20px 20px;
    border: 1px solid #6b4b3166;
    background: #0d0c0bcc;
}

/* Discord link */
.discord-link h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}
.discord-link h2 .icon {
    color: #8b9bff;
}
.discord-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #4d56a855;
    background: linear-gradient(90deg, #1d2140aa, #0d0c0bcc);
}
.discord-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #5865f2;
    flex-shrink: 0;
}
.discord-avatar--empty {
    display: grid;
    place-items: center;
    color: #8b9bff;
}
.discord-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.discord-card__text strong {
    color: #f3e6cf;
    font-size: 1.1rem;
}
.discord-ok {
    color: #9fd08a;
    font-size: .92rem;
}
.discord-warning {
    color: #e8c070;
    font-size: .92rem;
}
.button--discord {
    border-color: #7984f5;
    background: linear-gradient(#5865f2, #3c45a5);
    box-shadow: inset 0 0 0 2px #262c6b, 0 2px 5px #000;
    color: #fff;
}
.button--discord:hover {
    background: linear-gradient(#6d78f7, #4550b8);
    color: #fff;
}

/* Honeypot for spam bots: invisible to people, bots fill it in. */
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- switch (event reminders) ---------- */
.reminder-toggle {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #5a473244;
    background: #0d0c0b99;
}
.switch {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
}
.switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.switch__track {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 24px;
    margin-top: 2px;
    border: 1px solid #625b4e;
    border-radius: 12px;
    background: #1a1816;
    transition: background .2s, border-color .2s;
}
.switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #8a8275;
    transition: transform .2s, background .2s;
}
.switch input:checked + .switch__track {
    background: linear-gradient(90deg, #5e130c, #8b1a10);
    border-color: #bc6444;
}
.switch input:checked + .switch__track::after {
    transform: translateX(22px);
    background: var(--gold);
}
.switch input:focus-visible + .switch__track {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.switch__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.switch__text strong {
    color: #f3e6cf;
}
.switch__text .muted {
    font-size: .92rem;
}

/* ---------- recruitment ---------- */
.recruitment h1 {
    display: flex;
    align-items: center;
    gap: 10px;
}
.recruitment-steps ol {
    margin: 0 0 18px;
    padding-left: 1.4rem;
    line-height: 1.7;
}
.recruitment-steps h2,
.application-form h2 {
    margin: 22px 0 10px;
    color: var(--gold);
    font: 600 1.15rem/1.3 var(--heading-font);
}
.pending-notice--ok {
    border-color: #9db98488;
}
.application-form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}
.application-form legend {
    margin-bottom: 8px;
}
.day-picker__days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.day-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.day-chip span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #625b4e;
    background: #151413;
    color: var(--muted);
    font: 600 .8rem/1 var(--heading-font);
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.day-chip input:checked + span {
    background: linear-gradient(180deg, #7a150f, #4d0d09);
    border-color: #bc6444;
    color: #ffe6b8;
}
.day-chip input:focus-visible + span {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
