.language-picker {
    position: relative;
    flex: none;
    font: 14px/1.4 Arial, sans-serif;
    z-index: 100;
}
.language-picker summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 12px;
    color: #f1f5fb;
    background: #ffffff0d;
    border: 1px solid #ffffff30;
    border-radius: 11px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary:hover,
.language-picker[open] summary { background: #ffffff20; }
.language-picker[open] .language-chevron { transform: rotate(180deg); }
.language-panel {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 12px);
    width: 330px;
    max-width: calc(100vw - 28px);
    box-sizing: border-box;
    padding: 18px;
    color: #20334d;
    background: #fff;
    border: 1px solid #dbe3ed;
    border-radius: 18px;
    box-shadow: 0 16px 48px #0c1d3940;
}
.language-panel-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.language-panel-heading strong { flex: 1; font-size: 16px; }
.language-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: #4a5d76;
    background: #f1f4f8;
    font-size: 25px;
    cursor: pointer;
}
.language-search {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid #d5dfeb;
    border-radius: 10px;
    color: #63758c;
    background: #f8fafc;
}
.language-search input {
    width: 100%;
    min-width: 0;
    height: 43px;
    padding: 0;
    border: 0;
    outline: 0;
    color: #20334d;
    background: transparent;
    font: inherit;
}
.language-search:focus-within { outline: 3px solid #ffd297; outline-offset: 2px; }
.language-options { display: grid; gap: 4px; margin-top: 12px; max-height: min(420px, 55dvh); overflow-y: auto; overscroll-behavior: contain; }
.site-account .language-options a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    padding: 3px 10px;
    border-radius: 9px;
    color: #20334d;
    text-decoration: none;
    text-align: start;
}
.site-account .language-options a:hover { background: #f1f5fa; }
.site-account .language-options a[aria-current] { color: #915013; background: #fff1db; font-weight: 700; }
.language-code { width: 31px; flex: none; color: #71839a; font-size: 11px; font-weight: 700; }
.language-check { margin-inline-start: auto; color: #ad5a15; }
.language-empty { margin: 18px 0 4px; color: #65758a; text-align: center; }
.language-picker [hidden] { display: none !important; }
.language-picker :focus-visible { outline: 3px solid #ffc56e; outline-offset: 2px; }
html[dir="rtl"] .cr-content,
html[dir="rtl"] .cr-hero-copy,
html[dir="rtl"] .home-game-copy,
html[dir="rtl"] .legal-content { text-align: right; }
html[dir="rtl"] .r101-diagram-groups,
html[dir="rtl"] .r101-tile-group { direction: ltr; }
@media (max-width: 760px) {
    .site-account { flex-wrap: wrap; }
    .language-panel { position: fixed; top: 130px; inset-inline: 14px; width: auto; max-width: none; }
    .language-options { max-height: min(420px, calc(100dvh - 285px)); }
}

/* The search group supplies the visible keyboard focus indicator. */
.language-picker .language-search input:focus-visible { outline: none; }

html[dir="rtl"] .page-login,
html[dir="rtl"] .register-card,
html[dir="rtl"] .cr-hero,
html[dir="rtl"] .cr-card,
html[dir="rtl"] .home-game { text-align: right; }
html[lang="he"] h1,
html[lang="he"] h2 { font-family: Arial, sans-serif; }
html[dir="rtl"] .site-navigation summary span { margin-right: 0; margin-inline-end: 10px; }
