#jiuzhou-language-switch {
    position: fixed !important;
    top: 8px;
    right: 8px;
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    z-index: 2147483647 !important;
    display: flex !important;
    flex-wrap: wrap;
    max-width: calc(100vw - 16px);
    box-sizing: border-box;
    gap: 3px;
    padding: 4px;
    border: 1px solid #baa779;
    border-radius: 9px;
    background: rgba(18, 24, 39, .94);
    box-shadow: 0 2px 12px #0008;
    font: 14px/1.3 Tahoma, "Segoe UI", sans-serif;
    isolation: isolate;
    transform: none !important;
    overflow: visible !important;
    touch-action: manipulation;
    user-select: none;
}
#jiuzhou-language-switch button {
    appearance: none;
    display: block;
    min-width: 42px;
    min-height: 34px;
    padding: 5px 8px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    line-height: 1.3;
    white-space: nowrap;
    flex: 0 0 auto;
    text-shadow: none;
}
#jiuzhou-language-switch button[aria-pressed="true"] {
    background: #e8d5a5;
    color: #172238;
    border-color: #ffeac1;
    font-weight: bold;
}
#jiuzhou-language-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
#jiuzhou-language-switch button:hover { border-color: #e8d5a5; }
@media (max-width: 420px) {
    #jiuzhou-language-switch { top: 5px; right: 5px; font-size: 12px; }
    #jiuzhou-language-switch button { padding: 5px 7px; min-height: 32px; }
}
@media (max-width: 240px) {
    #jiuzhou-language-switch { left: 3px; right: 3px; max-width: calc(100vw - 6px); gap: 1px; padding: 2px; }
    #jiuzhou-language-switch button { min-width: 30px; padding: 4px; font-size: 11px; }
}
/* Alternate text controls sit over the original Chinese image labels only in translated modes. */
.jiuzhou-login-label { visibility: hidden; }
.jiuzhou-localized-login, .jiuzhou-server-login { display: none; }
html[data-jiuzhou-lang="th"] .jiuzhou-login-label,
html[data-jiuzhou-lang="en"] .jiuzhou-login-label {
    visibility: visible;
    background: #f7f2e8;
    color: #342e24;
    box-sizing: border-box;
    font-family: Tahoma, "Segoe UI", sans-serif;
}
html[data-jiuzhou-lang="th"] #regBtn,
html[data-jiuzhou-lang="en"] #regBtn { display: none; }
html[data-jiuzhou-lang="th"] .jiuzhou-localized-login,
html[data-jiuzhou-lang="en"] .jiuzhou-localized-login {
    visibility: visible;
    display: inline-block;
    margin-left: 30px;
    min-width: 170px;
    padding: 12px 22px;
    border: 1px solid #efd49b;
    border-radius: 7px;
    background: linear-gradient(#edc77e, #b37b38);
    color: #2c1b10;
    font: bold 20px Tahoma, "Segoe UI", sans-serif;
    cursor: pointer;
}
html[data-jiuzhou-lang="th"] .jiuzhou-server-login,
html[data-jiuzhou-lang="en"] .jiuzhou-server-login {
    display: block;
    border: 2px solid #ffe2ac;
    border-radius: 12px;
    background: linear-gradient(#edc77e, #b37b38);
    color: #2c1b10;
    font: bold 30px Tahoma, "Leelawadee UI", "Segoe UI", sans-serif;
    cursor: pointer;
}
html[data-jiuzhou-lang="th"] label,
html[data-jiuzhou-lang="th"] .regMsg,
html[data-jiuzhou-lang="th"] .login-box,
html[data-jiuzhou-lang="en"] label,
html[data-jiuzhou-lang="en"] .regMsg,
html[data-jiuzhou-lang="en"] .login-box {
    font-family: Tahoma, "Leelawadee UI", "Segoe UI", sans-serif !important;
}
