.language-switcher {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px 7px 13px;
    border: 1px solid rgba(23, 24, 32, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 34px rgba(23, 24, 32, 0.14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.language-switcher::before {
    color: #696874;
    font-size: 13px;
    font-weight: 750;
    content: "文";
}

.language-switcher-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.language-switcher-select {
    max-width: 140px;
    min-height: 34px;
    padding: 0 27px 0 7px;
    border: 0;
    border-radius: 999px;
    color: #171820;
    background: transparent;
    font: 650 13px/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    cursor: pointer;
}

.language-switcher-select:focus-visible {
    outline: 3px solid rgba(95, 116, 238, 0.45);
    outline-offset: 2px;
}

html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .language-switcher {
    right: auto;
    left: max(18px, env(safe-area-inset-left));
    padding: 7px 13px 7px 9px;
}

html[dir="rtl"] .language-switcher-select {
    padding: 0 7px 0 27px;
}

html[dir="rtl"] ul,
html[dir="rtl"] ol {
    padding-right: 30px;
    padding-left: 0;
}

html[dir="rtl"] .faq-answer {
    padding-right: 20px;
    padding-left: 0;
    border-right: 3px solid #667eea;
    border-left: 0;
}

html[dir="rtl"] .button svg,
html[dir="rtl"] .privacy-link span {
    transform: scaleX(-1);
}

@media (max-width: 600px) {
    .language-switcher {
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    html[dir="rtl"] .language-switcher {
        right: auto;
        left: max(10px, env(safe-area-inset-left));
    }
}

@media print {
    .language-switcher {
        display: none;
    }
}
