/* EN / RU switcher. Dark-surface styling to match both pages. */
#langSwitch {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    display: flex;
    gap: 2px;
    padding: 2px;
    background: rgba(22, 27, 34, 0.85);
    border: 1px solid #30363d;
    border-radius: 6px;
    backdrop-filter: blur(6px);
}
#langSwitch .lang-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: #8b949e;
    font: 600 11px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: 0.04em;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}
#langSwitch .lang-btn:hover { color: #c9d1d9; }
#langSwitch .lang-btn.active { background: #2da87e; color: #fff; }
#langSwitch .lang-btn:focus-visible { outline: 2px solid #2da87e; outline-offset: 1px; }
@media (max-width: 480px) {
    #langSwitch { top: 8px; right: 8px; }
    #langSwitch .lang-btn { padding: 4px 7px; font-size: 10px; }
}

/* Inline placement: when a page provides its own #langSwitch container
   (e.g. inside the simulator's control panel) the switcher sits in the
   normal flow instead of floating over the page. */
#langSwitch.lang-inline {
    position: static;
    background: transparent;
    border: 0;
    padding: 0;
    backdrop-filter: none;
}
.panel-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.panel-topbar h2 { margin: 0; }
