.language-switch{display:inline-flex;align-items:center;flex:0 0 auto;gap:3px;padding:4px;border:1px solid #494949;border-radius:13px;background:#202020;font-family:Manrope,Arial,sans-serif}
.language-switch button{min-width:35px;min-height:30px;padding:5px 7px;border:0;border-radius:9px;background:transparent;color:#a9a9a9;font:800 10px Manrope,Arial,sans-serif;cursor:pointer}
.language-switch button[aria-pressed="true"]{background:#ededed;color:#171717}
.language-switch button:hover{color:#fff;background:#3a3a3a}.language-switch button[aria-pressed="true"]:hover{background:#fff;color:#111}
.language-switch button:focus-visible{outline:2px solid #d5ad57;outline-offset:2px}
.language-switch-floating{position:fixed;top:16px;right:16px;z-index:5}
@media(max-width:700px){.language-switch{padding:2px;gap:0}.language-switch button{min-height:34px;min-width:32px;padding:4px}body>header{flex-wrap:wrap;height:auto;min-height:68px}}
html[lang="en"] .login-card::before{content:'PERSONAL INVENTORY'!important}
header>.language-switch{order:3}
@media(max-width:700px){header:has(.discord-link)>.language-switch{grid-area:status;justify-self:end}}

/* Кнопки допоміжних сторінок згруповані праворуч. */
body>header:has(>.language-switch):not(:has(.discord-link)){display:flex!important;align-items:center;justify-content:flex-start!important;gap:10px!important}
body>header:has(>.language-switch):not(:has(.discord-link))>.back,
body>header:has(>.language-switch):not(:has(.discord-link))>.simple-back{order:2;margin-left:auto!important;margin-right:0!important;flex:0 0 auto}
body>header:has(>.language-switch):not(:has(.discord-link))>.language-switch{order:3;margin:0;flex:0 0 auto}

/* Keep page-wide form button rules out of the language control. */
body .language-switch{box-sizing:border-box;align-items:center;justify-content:center;height:40px;padding:4px;gap:3px}
body .language-switch button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:0 0 35px;width:35px;min-width:35px;max-width:35px;height:30px;min-height:30px;margin:0!important;padding:0!important;line-height:1;border:0;vertical-align:middle}
@media(max-width:700px){body .language-switch{padding:4px;gap:2px}body .language-switch button{flex-basis:32px;width:32px;min-width:32px;max-width:32px}}
