/* Scoped to authentication and world selection; leaves the in-game UI untouched. */
body:has(.auth) .auth-form .world-picker{margin:18px 0 20px;padding:16px;border-radius:12px;background:#fff9ec;border:1px solid #c39c6b;color:#173c56;box-shadow:0 3px 12px #213a4715;font-family:system-ui,sans-serif}
body:has(.auth) .world-picker label{color:#28445a;font-size:12px;font-weight:750;margin:0 0 7px;letter-spacing:.02em}
body:has(.auth) .world-picker select,body:has(.auth) .world-picker input[type=search]{width:100%;min-width:0;min-height:44px;background:#fffdf9;color:#173c56;border:1px solid #8d795e;border-radius:8px;padding:10px 11px;font:500 13px/1.4 system-ui,sans-serif;opacity:1}
body:has(.auth) .world-picker select option{background:#fffdf9;color:#173c56}
body:has(.auth) .world-picker select option:disabled{color:#686968;background:#f1ede6}
body:has(.auth) .world-picker select:disabled{color:#555e68;background:#eeebe5}
body:has(.auth) .world-picker input[type=search]::placeholder{color:#596a73;opacity:1}
body:has(.auth) .world-picker :is(select,input,button):focus-visible{outline:3px solid #156d91;outline-offset:2px}
body:has(.auth) .world-picker-tools{display:grid;grid-template-columns:minmax(130px,1fr) minmax(125px,1fr);gap:9px;margin-bottom:13px}
body:has(.auth) .world-picker-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;flex-wrap:wrap}
body:has(.auth) .world-picker :is(#world-help,.world-picker-result){color:#435967;font-size:12px;line-height:1.45}
body:has(.auth) .world-picker .world-more{padding:5px 10px;min-height:30px;font-size:12px;color:#134c69;border:1px solid #927345;border-radius:6px;background:#fffcf5}
body:has(.auth) .world-picker-result{margin:8px 0 0;min-height:0}
body:has(.auth) .world-picker-result:empty{display:none}
body:has(.auth) .world-picker .world-more[hidden]{display:none}
body:has(.auth) .auth-form .errorlist,body:has(.auth) .auth-form form .errorlist li{color:#992526;font-size:12px}
body:has(.auth) .auth-form a{font-weight:650}
@media(max-width:420px){body:has(.auth) .world-picker-tools{grid-template-columns:1fr}body:has(.auth) .auth-form .world-picker{padding:12px}}

/* Login/chooser polish: scoped here only; the in-world interface is unchanged. */
body:has(.auth) .world-picker [hidden]{display:none!important}
body:has(.auth) .world-picker--locked .world-picker-tools{grid-template-columns:1fr}
body:has(.auth) .auth-form .world-picker .world-selection{margin-top:1px}
body:has(.auth) .auth-form form label[for=id_username],
body:has(.auth) .auth-form form label[for=id_password]{color:#28445a;font:750 12px/1.45 system-ui,sans-serif;letter-spacing:.02em}
body:has(.auth) .auth-form #id_username,
body:has(.auth) .auth-form #id_password{background:#fffdf9;color:#173c56;border:1px solid #a58a68;border-radius:8px;min-height:46px;padding:11px 13px;font:500 14px/1.4 system-ui,sans-serif;opacity:1;color-scheme:light;caret-color:#173c56;box-shadow:0 1px 2px rgba(23,60,86,.07)}
body:has(.auth) .auth-form :is(#id_username,#id_password):focus{border-color:#156d91;box-shadow:0 0 0 3px rgba(21,109,145,.14)}
body:has(.auth) .auth-form :is(#id_username,#id_password):is(:-webkit-autofill,:-webkit-autofill:hover,:-webkit-autofill:focus){-webkit-text-fill-color:#173c56!important;-webkit-box-shadow:0 0 0 1000px #fffdf9 inset!important;box-shadow:0 0 0 1000px #fffdf9 inset!important;caret-color:#173c56;transition:background-color 9999s ease-out 0s}
body:has(.auth) .auth-form .auth-account-name{color:#173c56;font-weight:700;overflow-wrap:anywhere}
body:has(.auth) .auth-form form.auth-logout{margin:18px 0 0}
body:has(.auth) .auth-form .auth-logout-button{color:#ffedc2;background:#123b59;border:1px solid #b58a52;border-radius:8px;padding:11px 18px;min-height:43px;font:700 13px/1.3 system-ui,sans-serif;opacity:1}
body:has(.auth) .auth-form .auth-logout-button:hover{color:#fff5db;background:#1a557a;border-color:#c99c61}
body:has(.auth) .auth-form .auth-logout-button:focus-visible{outline:3px solid #167fa2;outline-offset:2px}

/* Account pages: keep the illustration on the left and use the site's navy and gold palette. */
body:has(.auth) .auth{direction:ltr}
body:has(.auth) .auth-art .auth-brand-full{position:static;display:block;width:min(320px,78%);height:auto;object-fit:contain;opacity:1;filter:drop-shadow(0 14px 30px #0006)}
body:has(.auth) .auth-form{min-width:0}
body:has(.auth) .auth-form :is(input:not([type=hidden]),select,textarea){background:#142e3b;color:#f3f3eb;border:1px solid #68838a;color-scheme:dark;caret-color:#f3f3eb}
body:has(.auth) .auth-form :is(input:not([type=hidden]),select,textarea)::placeholder{color:#bacbd0;opacity:1}
body:has(.auth) .auth-form select option{background:#142e3b;color:#f3f3eb}
body:has(.auth) .auth-form label{color:#cfdee1}
body:has(.auth) .auth-form .world-picker{background:#102735;color:#eaf0ec;border-color:#5c7780;box-shadow:0 8px 28px #0003}
body:has(.auth) .auth-form .world-picker label{color:#d7e4e4}
body:has(.auth) .auth-form .world-picker :is(select,input[type=search]){background:#142e3b;color:#f3f3eb;border-color:#68838a;color-scheme:dark;box-shadow:none}
body:has(.auth) .auth-form .world-picker select option{background:#142e3b;color:#f3f3eb}
body:has(.auth) .auth-form .world-picker select option:disabled{background:#263e49;color:#adbdc0}
body:has(.auth) .auth-form .world-picker select:disabled{background:#263e49;color:#adbdc0}
body:has(.auth) .auth-form .world-picker input[type=search]::placeholder{color:#bacbd0}
body:has(.auth) .auth-form .world-picker :is(#world-help,.world-picker-result){color:#b9cbd1}
body:has(.auth) .auth-form .world-picker .world-more{background:#1d3b4b;color:#f1d49b;border-color:#a88958}
body:has(.auth) .auth-form form label[for=id_username],body:has(.auth) .auth-form form label[for=id_password]{color:#d7e4e4}
body:has(.auth) .auth-form #id_username,body:has(.auth) .auth-form #id_password{background:#142e3b;color:#f3f3eb;border-color:#68838a;color-scheme:dark;caret-color:#f3f3eb;box-shadow:none}
body:has(.auth) .auth-form :is(#id_username,#id_password):is(:-webkit-autofill,:-webkit-autofill:hover,:-webkit-autofill:focus){-webkit-text-fill-color:#f3f3eb!important;-webkit-box-shadow:0 0 0 1000px #142e3b inset!important;box-shadow:0 0 0 1000px #142e3b inset!important;caret-color:#f3f3eb}
body:has(.auth) .auth-form .auth-account-name{color:#f4e1b4}
body:has(.auth) .auth-form a{color:#f1cb89}
body:has(.auth) .auth-form a:hover{color:#fff0c9}
body:has(.auth) .auth-form .auth-locale-switch{margin:0 0 1.2rem}
body:has(.auth) .auth-form .auth-locale-switch select{width:auto;min-width:7rem;max-width:12rem}
body:has(.auth) .auth-form .auth-locale-switch button{background:#e8bd72;color:#172b34;border-color:#d5b174}
@media(max-width:800px){body:has(.auth) .auth-art{min-height:320px}}
body:has(.auth) .auth-form{background:linear-gradient(145deg,#112d3e,#0b2131);color:#eaf0ec;border:1px solid #607985;box-shadow:0 18px 45px #0005}
body:has(.auth) .auth-form h2{color:#f6ebd4}
body:has(.auth) .auth-form :is(p,label,.muted,.helptext,ul){color:#c4d2d4}
body:has(.auth) .auth-form input:not([type=hidden]){background:#142e3b;color:#f3f3eb;border-color:#68838a}
body:has(.auth) .auth-form .auth-note{color:#b9cbd1;border-top-color:#5d737c}
body:has(.auth) .auth-form .errorlist,body:has(.auth) .auth-form form .errorlist li{color:#ffd1c9}
body:has(.auth) .auth-form .primary{background:#e8bd72;color:#172b34;border-color:#d5b174}
body:has(.auth) .auth-form .primary:hover{background:#f3d394;color:#172b34}
body:has(.auth) .auth-form a.primary{color:#172b34}
body:has(.auth) .auth-form .auth-exit-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}
body:has(.auth) .auth-form .auth-exit-actions form.auth-logout{margin:0}
body:has(.auth) .auth-form a.auth-site-link{display:inline-flex;align-items:center;justify-content:center;min-height:43px;padding:11px 18px;border:1px solid #b58a52;border-radius:8px;background:#123b59;color:#ffedc2;font:700 13px/1.3 system-ui,sans-serif;text-decoration:none}
body:has(.auth) .auth-form a.auth-site-link:hover{background:#1a557a;border-color:#c99c61;color:#fff5db}
body:has(.auth) .auth-form a.auth-site-link:focus-visible{outline:3px solid #167fa2;outline-offset:2px}

/* Give world discovery the full usable width of narrow account screens. */
@media(max-width:600px){
 body:has(.auth) .auth-form:has(.world-picker){width:calc(100% - 20px);max-width:none;margin:10px auto 20px;padding:18px 16px}
 body:has(.auth) .auth-form .world-picker{width:100%;max-width:none;min-width:0;margin-inline:0;padding:14px}
 body:has(.auth) .auth-form .world-picker-tools{grid-template-columns:minmax(0,1fr);width:100%;min-width:0}
 body:has(.auth) .auth-form .world-picker :is(select,input[type=search]){display:block;width:100%;max-width:100%;min-width:0}
 body:has(.auth) .auth-form .world-picker-footer>*{min-width:0}
}
