@layer components {
  .lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(10, 16, 24, 0.78);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    z-index: 3;
  }
  
  .lang-switch-floating {
    position: absolute;
    top: 10px;
    right: 24px;
  }
  
  .lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 56px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
  }
  
  .lang-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
  }
  
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  th.sortable:focus-visible,
  tr.is-interactive-row:focus-visible {
    outline: 2px solid rgba(255, 209, 102, 0.92);
    outline-offset: 2px;
  }
  
  .lang-btn.active {
    background: linear-gradient(135deg, var(--accent), #ff7d57);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 91, 46, 0.25);
  }
  
  .lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    line-height: 1;
  }
  
  .lang-flag img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
  }
}
