/* Valar Morghulis — the guild sanctum.
   This intentionally dark account surface does not change the workspace theme preference.
   Art is decorative; static SSR, native forms and keyboard access remain first-class. */
.vmw-auth {
    --vmwa-ink: #0b0d0e;
    --vmwa-stone: #181b1c;
    --vmwa-silver: #d9d6ca;
    --vmwa-gold: #b59a64;
    --vmwa-white: #f0eadb;
    --vmwa-muted: #a7ada9;
    --vmwa-border: #45453c;
    --vmwa-danger: #efaca3;
    --vmwa-ok: #aec9ae;
    --vmwa-radius: 4px;
    --vmwa-font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
    --vmwa-display: var(--vmw-font-display, "Cinzel", "Palatino Linotype", Georgia, serif);
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    color: var(--vmwa-white);
    background: var(--vmwa-ink);
    font-family: var(--vmwa-font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color-scheme: dark;
}
body:has(.vmw-auth) { margin: 0; }
.vmw-auth *, .vmw-auth *::before, .vmw-auth *::after { box-sizing: border-box; }

/* The art stays in the page, not a fixed background, for stable mobile scrolling. */
.vmw-auth-scene { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.vmw-auth-scene img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 42% center; }
.vmw-auth-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgb(5 7 8 / 62%), transparent 24%, transparent 65%, rgb(5 7 8 / 90%)),
        linear-gradient(90deg, rgb(5 7 8 / 35%) 0%, rgb(5 7 8 / 8%) 44%, rgb(5 7 8 / 55%) 100%);
}
.vmw-auth-masthead {
    display: none; /* The desktop hero already carries the guild name. */
    align-items: center;
    flex-direction: column;
    gap: 8px;
    width: min(1440px, 100%);
    margin-inline: auto;
    padding: 30px 56px;
}
.vmw-auth .vmw-auth-wordmark {
    font-family: var(--vmwa-display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--vmwa-silver);
    text-decoration: none;
}
.vmw-auth-masthead-label {
    color: #b2b4aa;
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .19em;
    text-transform: uppercase;
}
.vmw-auth-stage { display: grid; flex: 1 0 auto; align-items: center; width: 100%; padding: 40px 56px 54px; }
.vmw-auth-composition {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 446px);
    align-items: center;
    gap: clamp(48px, 8vw, 142px);
    width: min(1120px, 100%);
    margin: auto;
}
.vmw-auth-intro { padding-bottom: 20px; text-shadow: 0 3px 30px #000, 0 1px 4px #000; }
.vmw-auth-guild-name {
    margin: 0 0 26px;
    font-family: var(--vmwa-display);
    font-size: clamp(3.5rem, 6vw, 5.8rem);
    font-weight: 400;
    line-height: .99;
    letter-spacing: .035em;
    text-transform: uppercase;
    color: var(--vmwa-white);
}
.vmw-auth-intro-rule { display: flex; align-items: center; width: 190px; height: 12px; gap: 10px; }
.vmw-auth-intro-rule::before, .vmw-auth-intro-rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, #aa8e58, transparent); }
.vmw-auth-intro-rule::before { transform: rotate(180deg); }
.vmw-auth-intro-rule > span { width: 5px; height: 5px; transform: rotate(45deg); border: 1px solid var(--vmwa-gold); }
.vmw-auth-motto {
    margin: 22px 0 0;
    color: var(--vmwa-silver);
    font-family: var(--vmwa-display);
    font-size: 1.1rem;
    font-style: italic;
    letter-spacing: .07em;
}

/* Bevels, inset lines and corner fittings supply material without a generic rounded card. */
.vmw-auth-panel {
    position: relative;
    min-width: 0;
    padding: 28px 38px 24px;
    border: 1px solid #5a5547;
    border-radius: var(--vmwa-radius);
    background:
        radial-gradient(ellipse at 50% 0%, rgb(157 136 86 / 11%), transparent 58%),
        repeating-linear-gradient(0deg, transparent 0 3px, rgb(255 255 255 / 1%) 3px 4px),
        linear-gradient(135deg, #222627 0%, #171b1c 38%, #111516 100%);
    box-shadow:
        0 0 0 1px #080a0b,
        0 0 0 4px rgb(12 14 15 / 75%),
        inset 0 1px 0 #676153,
        inset 0 -2px 0 #080b0c,
        0 28px 75px rgb(0 0 0 / 65%);
}
.vmw-auth-panel::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgb(181 154 100 / 16%); pointer-events: none; }
.vmw-auth-panel::after { content: ""; position: absolute; inset: 0 25% auto; height: 1px; background: linear-gradient(90deg, transparent, #c4ab73, transparent); }
.vmw-auth-corner { position: absolute; width: 21px; height: 21px; z-index: 1; border-top: 2px solid #a58d5b; border-left: 2px solid #a58d5b; pointer-events: none; }
.vmw-auth-corner::after { content: ""; position: absolute; inset: 3px auto auto 3px; width: 3px; height: 3px; background: #a58d5b; }
.vmw-auth-corner-tl { top: 9px; left: 9px; }
.vmw-auth-corner-tr { top: 9px; right: 9px; transform: rotate(90deg); }
.vmw-auth-corner-br { right: 9px; bottom: 9px; transform: rotate(180deg); }
.vmw-auth-corner-bl { bottom: 9px; left: 9px; transform: rotate(270deg); }
.vmw-auth-seal { display: grid; place-items: center; margin: 0 auto 14px; }
.vmw-auth-seal img { display: block; width: 164px; height: 164px; object-fit: contain; filter: drop-shadow(0 9px 12px rgb(0 0 0 / 62%)); }
.vmw-auth-pane-body { position: relative; min-width: 0; }
.vmw-auth-head { margin: 0 0 27px; text-align: center; }
.vmw-auth-eyebrow { margin: 0 0 11px; font-size: .6rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--vmwa-gold); }
.vmw-auth-title { margin: 0; font-family: var(--vmwa-display); font-size: 1.75rem; line-height: 1.2; font-weight: 400; letter-spacing: .015em; color: var(--vmwa-white); text-wrap: balance; }
.vmw-auth-title:focus { outline: none; } /* FocusOnNavigate targets the heading, not an action. */
.vmw-auth-sub { margin: 12px auto 0; max-width: 290px; font-size: .83rem; line-height: 1.65; color: var(--vmwa-muted); text-wrap: pretty; }
.vmw-auth-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }

/* Discord is the only bright action. Keep the official mark and its recognisable colour. */
.vmw-auth .vmw-auth-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #89754d !important;
    border-radius: var(--vmwa-radius) !important;
    background: #655435 !important;
    color: #fff !important;
    font-family: var(--vmwa-font);
    font-size: .875rem;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: .005em;
    text-transform: none;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 3px 9px rgb(0 0 0 / 24%) !important;
    transition: background-color .1s ease, border-color .1s ease, box-shadow .1s ease;
}
.vmw-auth .vmw-auth-submit:hover { background: #78643e !important; border-color: #bfa778 !important; }
.vmw-auth .vmw-auth-discord { background: #5865f2 !important; border-color: #7e88f5 !important; }
.vmw-auth .vmw-auth-discord:hover { background: #4752c4 !important; border-color: #a2aaff !important; }
.vmw-auth-discord-mark { display: block; width: 24px; height: 19px; object-fit: contain; flex: 0 0 auto; }
.vmw-auth .vmw-auth-submit:focus-visible, .vmw-auth a:focus-visible { outline: 2px solid #e7d2a1; outline-offset: 4px; }
.vmw-auth .vmw-auth-submit:disabled { opacity: .56; cursor: not-allowed; }
.vmw-auth .vmw-auth-submit.is-busy { opacity: .82; cursor: progress; }
.vmw-auth .vmw-auth-submit-secondary { background: transparent !important; color: var(--vmwa-silver) !important; border-color: var(--vmwa-border) !important; box-shadow: none !important; }
.vmw-auth .vmw-auth-submit-secondary:hover { background: rgb(255 255 255 / 5%) !important; border-color: #8a826d !important; }
.vmw-auth-submit-label { display: inline-block; }
.vmw-auth-spinner { display: none; width: 16px; height: 16px; flex: 0 0 auto; border: 2px solid rgb(255 255 255 / 40%); border-top-color: #fff; border-radius: 50%; animation: vmw-auth-spin .8s linear infinite; }
.vmw-auth-submit.is-busy .vmw-auth-spinner { display: inline-block; }
.vmw-auth-submit.is-busy .vmw-auth-discord-mark { display: none; }
.vmw-auth-session { display: flex; justify-content: center; align-items: flex-start; gap: 6px; margin: 13px 0 0; color: #b8bcb5; font-size: .7rem; line-height: 1.5; text-align: center; }
.vmw-auth-session .rzi { font-size: .86rem; line-height: 1.3; margin-top: 1px; color: #b7a376; flex: 0 0 auto; }
.vmw-auth-footer { margin-top: 25px; padding-top: 21px; border-top: 1px solid #383c36; text-align: center; }
.vmw-auth-footer p { margin: 0; color: var(--vmwa-muted); font-size: .73rem; line-height: 1.65; text-wrap: pretty; }
.vmw-auth-footer p + p { margin-top: 10px; }
.vmw-auth-footer .vmw-auth-shared-device { font-size: .68rem; color: #a9afa8; }
.vmw-auth-panel-signature { display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 23px; color: #9c8b65; }
.vmw-auth-panel-signature span { width: 38px; height: 1px; background: linear-gradient(90deg, transparent, #686049); }
.vmw-auth-panel-signature span:last-child { transform: rotate(180deg); }
.vmw-auth-panel-signature b { font-family: var(--vmwa-display); font-size: .65rem; font-weight: 400; letter-spacing: .2em; }
.vmw-auth-site-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 20px; padding: 18px 56px 23px; color: #a6aaa2; font-size: .6rem; letter-spacing: .12em; }
/* A small parchment maker's mark nods to the game without competing with the guild coin. */
.vmw-auth-game { display: flex; align-items: center; gap: 10px; min-height: 58px; max-width: 100%; padding: 8px 17px 8px 10px; color: #352e24; background: linear-gradient(100deg, #bba481b8, #d1bea0cc 50%, #bda989b8), url("../images/brand/wow-forever-paper.jpg") center 30% / cover; clip-path: polygon(1% 7%, 8% 3%, 19% 6%, 34% 1%, 52% 4%, 69% 2%, 87% 5%, 99% 2%, 100% 90%, 90% 96%, 74% 93%, 57% 99%, 40% 96%, 22% 99%, 9% 94%, 0 98%); }
.vmw-auth-game img { display: block; width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; }
.vmw-auth-game span { font-size: .65rem; font-weight: 700; letter-spacing: .025em; }

/* All account status pages share the frame and retain their full messages and actions. */
.vmw-auth a { color: #dac89f; text-underline-offset: 3px; }
.vmw-auth a:hover { color: #f2e4c5; }
.vmw-auth .vmw-alert { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 18px; padding: 12px; border: 1px solid #5b5145; border-radius: var(--vmwa-radius); background: #242824; color: var(--vmwa-silver); font-size: .79rem; line-height: 1.6; }
.vmw-auth .vmw-alert-icon { flex: 0 0 auto; margin-top: 2px; font-size: 1.1rem; }
.vmw-auth .vmw-alert-text { min-width: 0; overflow-wrap: anywhere; }
.vmw-auth .vmw-alert-danger { border-color: #785148; background: #342724; }
.vmw-auth .vmw-alert-danger .vmw-alert-icon { color: var(--vmwa-danger); }
.vmw-auth .vmw-alert-success { border-color: #506652; background: #243127; }
.vmw-auth .vmw-alert-success .vmw-alert-icon { color: var(--vmwa-ok); }
.vmw-auth-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 18px; padding: 11px 12px; border: 1px solid #62563b; border-radius: var(--vmwa-radius); background: #302c21; color: #ddd0af; font-size: .76rem; line-height: 1.55; }
.vmw-auth-note .rzi { flex: 0 0 auto; font-size: 1rem; margin-top: 2px; }
.vmw-auth-result { display: flex; flex-direction: column; gap: 17px; }
.vmw-auth-result-heading { display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.vmw-auth-result-heading .vmw-auth-result-icon { flex: 0 0 42px; }
.vmw-auth-result-heading .vmw-auth-title { min-width: 0; margin: 0; }
.vmw-auth-result-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--vmwa-border); border-radius: var(--vmwa-radius); color: var(--vmwa-gold); background: #252822; }
.vmw-auth-result-icon .rzi { font-size: 1.4rem; }
.vmw-auth-result-icon.is-danger { color: var(--vmwa-danger); border-color: #785148; background: #342724; }
.vmw-auth-result-icon.is-warn { color: #dbc791; border-color: #62563b; background: #302c21; }
.vmw-auth-result .vmw-auth-title { font-size: 1.6rem; }
.vmw-auth-text { margin: 0; color: var(--vmwa-muted); font-size: .84rem; line-height: 1.7; overflow-wrap: anywhere; }
.vmw-auth-text strong { color: var(--vmwa-white); font-weight: 600; }
.vmw-auth-result > .vmw-auth-text { text-align: center; }
.vmw-auth-status-code { margin: 0; color: var(--vmwa-gold); font-size: .65rem; font-weight: 650; line-height: 1.5; letter-spacing: .13em; text-align: center; text-transform: uppercase; }
.vmw-auth-reference { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 12px; border: 1px solid var(--vmwa-border); border-radius: var(--vmwa-radius); background: rgb(0 0 0 / 15%); color: var(--vmwa-muted); text-align: center; }
.vmw-auth-reference > span { font-size: .65rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.vmw-auth-reference > code { font: .7rem/1.55 var(--vmw-font-mono); color: var(--vmwa-silver); overflow-wrap: anywhere; }
.vmw-auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 7px; }
.vmw-auth-actions form { margin: 0; }
.vmw-auth-result .vmw-alert, .vmw-auth-result .vmw-auth-note { margin: 0; }

@keyframes vmw-auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 1050px) {
    .vmw-auth-masthead { padding: 25px 32px; }
    .vmw-auth-stage { padding: 30px 32px 42px; }
    .vmw-auth-composition { gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); }
    .vmw-auth-guild-name { font-size: clamp(2.35rem, 4.9vw, 4rem); }
    .vmw-auth-site-footer { padding-inline: 32px; }
}
@media (max-width: 780px) {
    .vmw-auth-masthead { display: flex; justify-content: center; padding: 24px 20px 10px; }
    .vmw-auth-wordmark { text-align: center; }
    .vmw-auth-stage { padding: 24px 24px 32px; }
    .vmw-auth-composition { grid-template-columns: minmax(0, 1fr); width: min(446px, 100%); gap: 0; }
    .vmw-auth-intro { display: none; }
    .vmw-auth-scene img { object-position: 38% center; }
    .vmw-auth-scene::after { background: linear-gradient(180deg, rgb(5 7 8 / 48%), rgb(5 7 8 / 25%) 45%, rgb(5 7 8 / 82%)); }
    .vmw-auth-site-footer { justify-content: center; padding: 12px 24px 24px; }
}
@media (max-width: 420px) {
    .vmw-auth-masthead { padding-top: 21px; }
    .vmw-auth .vmw-auth-wordmark { font-size: .9rem; letter-spacing: .09em; }
    .vmw-auth-stage { padding: 18px 16px 24px; }
    .vmw-auth-panel { padding: 23px 24px 21px; }
    .vmw-auth-seal { margin-bottom: 12px; }
    .vmw-auth-seal img { width: 136px; height: 136px; }
    .vmw-auth-head { margin-bottom: 23px; }
    .vmw-auth-title { font-size: 1.6rem; }
    .vmw-auth-result-heading { gap: 10px; }
    .vmw-auth-result .vmw-auth-title { font-size: 1.35rem; }
    .vmw-auth-sub { font-size: .79rem; }
    .vmw-auth .vmw-auth-submit { padding-inline: 12px; font-size: .82rem; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .vmw-auth *, .vmw-auth *::before, .vmw-auth *::after { animation: none !important; transition: none !important; }
    .vmw-auth-spinner { border-color: rgb(255 255 255 / 65%); border-top-color: #fff; }
}
@media (forced-colors: active) {
    .vmw-auth-panel, .vmw-auth .vmw-auth-submit, .vmw-auth .vmw-alert, .vmw-auth-note { border: 1px solid CanvasText !important; }
    .vmw-auth-scene, .vmw-auth-corner, .vmw-auth-panel::before, .vmw-auth-panel::after { display: none; }
}
