:root{
    --lang-switch-bg: rgba(255,255,255,.9);
    --lang-switch-border: rgba(0,0,0,.1);
}

.lang-switch{
    position: fixed;
    top: 12px;
    right: 12px;

    /* 关键：防止被其它规则拉成整行，强制贴右上角 */
    left: auto !important;
    width: max-content;          /* 或用 fit-content */
    display: inline-flex;        /* 避免占满整行 */

    z-index: 10000;
    gap: .6rem;
    align-items: center;
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(160%) blur(6px);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 12px;
    padding: .4rem .65rem;
    box-shadow: 0 3px 14px rgba(0,0,0,.08);
}

.lang-switch__label{
    font-size: 1rem;            /* 原 .85rem → 1rem */
    line-height: 1;
}

.lang-switch__select{
    min-width: 180px;    /* 你想更窄/更宽可以调这一行 */
    font-size: 1rem;
    padding: .45rem .85rem;
}

/* 深色模式跟随放大后的样式 */
@media (prefers-color-scheme: dark){
    .lang-switch__select{
        border-color:#666;
        background:#1e1e1e;
        color:#eee;
    }
}

/* 移动端稍微收一点，避免遮挡 */
@media (max-width: 640px){
    .lang-switch{ top: 8px; right: 8px; }
    .lang-switch__select{
        min-width: 150px;
        font-size: .95rem;
        padding: .4rem .75rem;
    }
}

