.language-switcher-wrap {
    position: sticky;
    top: max(10px, env(safe-area-inset-top));
    z-index: 999;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 auto 22px;
    pointer-events: none;
}

.language-switcher {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    width: min(100%, 340px);
    padding: 4px;
    border: 1px solid rgba(121, 88, 46, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 10px 34px rgba(62, 41, 19, .14);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    pointer-events: auto;
}

.language-switcher button {
    min-height: 38px;
    padding: 7px 12px;
    border: 0;
    border-radius: 999px;
    color: #74695d;
    background: transparent;
    font: 600 13px/1 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    transition: color .22s ease, background .22s ease, box-shadow .22s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.language-switcher button.is-active {
    color: #fffaf2;
    background: linear-gradient(135deg, #9b7544, #c5a36f);
    box-shadow: 0 6px 16px rgba(123, 87, 42, .26);
}

.language-switcher button:active {
    transform: scale(.96);
}

.language-switcher.is-translating::after {
    position: absolute;
    bottom: -18px;
    left: 50%;
    color: #9b7544;
    content: "Translating…";
    font-size: 10px;
    letter-spacing: .08em;
    transform: translateX(-50%);
}

@media (max-width: 380px) {
    .language-switcher button { padding-inline: 8px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .language-switcher button { transition: none; }
}
