/* The site navbar (partials/navbar.html): a bar with the game chip and four
   menus, each a list of links beside a preview pane that shows the hovered
   link; a second row of section links on game pages; and below 1200px a
   bottom sheet with a tab per menu. Behaviour: static/assets/js/navbar.js.

   At the top of a page the bar sits on the first panel, see-through, its top
   corners on the panel's. Scrolling lifts it off into a solid floating pill.
   navbar.js sets --nv-p from 0 (top) to 1 (lifted) as the page scrolls. */

:root {
    --nv-top: 40px;       /* where the bar sits at the top: the panels' inset */
    --nv-lift: 14px;      /* where it floats once lifted */
    --nv-row: 64px;       /* the main row at the top */
    --nv-bar: 64px;       /* both rows at the top */
    --nv-end-width: 1080px;
    --falix-nav-height: calc(var(--nv-top) + var(--nv-bar));
    --nv-stuck: calc(var(--nv-lift) + var(--nv-bar) - 6px);
}

body {
    padding-top: var(--falix-nav-height);
}

/* Game pages add the row of section links */
html.nv-has-sub {
    --nv-bar: 116px;
}

html {
    scroll-padding-top: calc(var(--nv-stuck) + 16px);
}

html.nv-lock {
    overflow: hidden;
}

/* A page that opens with chapters starts its first panel under the bar: the
   chapters run up to the top, and the first panel makes room for the bar on
   top of its own padding (.chapter 64px, .fp-hero 88px, the home .hh 96px). */
#main-content > .chapters:first-child {
    margin-top: calc(-1 * var(--falix-nav-height));
    padding-top: var(--nv-top);
}

#main-content > .chapters:first-child > .chapter:first-child {
    padding-top: calc(64px + var(--nv-bar));
}

#main-content > .chapters:first-child > .fp-hero:first-child {
    padding-top: calc(88px + var(--nv-bar));
}

#main-content > .chapters:first-child > .hh:first-child {
    min-height: calc(720px + var(--nv-bar));
    padding-top: calc(96px + var(--nv-bar));
}

.nv-nav {
    --nv-p: 0;
    --nv-logo: clamp(0, var(--nv-p) * 1.4 - 0.4, 1);
    --nv-r: calc(var(--nv-row) / 2 - 3px);
    position: fixed;
    inset: 0 0 auto;
    z-index: 1030;
    padding: calc(var(--nv-top) + (var(--nv-lift) - var(--nv-top)) * var(--nv-p)) 40px 0;
    color: #fff;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    pointer-events: none;
}

.nv-nav svg {
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nv-nav-bar {
    position: relative;
    width: calc(min(1392px, 100%) * (1 - var(--nv-p)) + min(var(--nv-end-width), 100%) * var(--nv-p));
    margin: 0 auto;
    border-radius: calc(32px + (var(--nv-r) - 32px) * var(--nv-p)) calc(32px + (var(--nv-r) - 32px) * var(--nv-p)) calc(var(--nv-r) * var(--nv-p)) calc(var(--nv-r) * var(--nv-p));
    background: rgba(18, 26, 40, var(--nv-p));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, calc(0.07 * var(--nv-p))), 0 20px 50px rgba(3, 7, 18, calc(0.55 * var(--nv-p)));
    pointer-events: auto;
}

/* Solid while a menu or the sheet is open */
.nv-nav.has-menu .nv-nav-bar {
    background: #121a28;
}

/* Game pages keep two rows, so the lifted bar is a rounded card, not a pill */
html.nv-has-sub .nv-nav {
    --nv-r: 24px;
}

.nv-nav-row {
    display: flex;
    align-items: center;
    gap: 4px;
    height: calc(var(--nv-row) - 6px * var(--nv-p));
    padding: 0 12px 0 calc(28px - 10px * var(--nv-p));
}

.nv-nav-logo {
    display: flex;
    flex: none;
    margin-right: 10px;
}

/* The wordmark fades out while the logo narrows to its mark */
.nv-logo {
    position: relative;
    display: block;
    width: calc(104px - 74px * var(--nv-logo));
    overflow: hidden;
}

.nv-logo img {
    display: block;
    width: 104px;
    height: auto;
}

.nv-logo-mark {
    clip-path: inset(0 calc(100% - 30px) 0 0);
}

.nv-logo-word {
    position: absolute;
    top: 0;
    left: 0;
    opacity: clamp(0, 1 - var(--nv-logo) * 2.2, 1);
}

/* The game chip: the current game on a game page, "Games" elsewhere */
.nv-chip {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px 0 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.nv-chip:hover,
.nv-chip[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.12);
}

.nv-chip > img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
}

.nv-chip-stack {
    display: inline-flex;
    padding-left: 2px;
}

.nv-chip-stack img {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 0 0 2px #121a28;
}

.nv-chip-stack img + img {
    margin-left: -10px;
}

.nv-chevron {
    width: 15px;
    height: 15px;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

[aria-expanded="true"] > .nv-chevron {
    opacity: 1;
    transform: rotate(180deg);
}

.nv-nav-links {
    display: flex;
    gap: 2px;
    margin-left: 8px;
}

.nv-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.nv-nav-link:hover {
    color: #fff;
}

.nv-nav-link[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nv-nav-link .nv-chevron {
    width: 14px;
    height: 14px;
}

.nv-nav-end {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.nv-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.nv-lang-toggle:hover,
.nv-lang-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nv-lang-toggle svg {
    width: 16px;
    height: 16px;
}

.nv-nav-text {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.nv-nav-text:hover {
    color: #fff;
}

.nv-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nv-pill-white,
.nv-pill-white:hover {
    color: #0b111b;
}

.nv-pill-white {
    background: #fff;
}

.nv-pill-white:hover {
    background: #e3e9f2;
}

.nv-pill-blue,
.nv-pill-blue:hover {
    color: #fff;
}

.nv-pill-blue {
    background: #2563eb;
}

.nv-pill-blue:hover {
    background: #1d4ed8;
}

.nv-pill-ghost,
.nv-pill-ghost:hover {
    color: #fff;
}

.nv-pill-ghost {
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.3);
}

.nv-pill-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nv-burger {
    display: none;
}

/* Second row on game pages: the page's sections, its price and the order button */
.nv-nav-sub {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 0 12px 0 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nv-sections {
    display: flex;
    gap: 2px;
}

.nv-sections a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.nv-sections a:hover {
    color: #fff;
}

.nv-sections a.is-active {
    background: #fff;
    color: #0b111b;
    font-weight: 600;
}

.nv-nav-sub-end {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.nv-from {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    white-space: nowrap;
}

.nv-from b {
    color: #fff;
}

.nv-nav-sub .nv-pill {
    height: 36px;
    padding: 0 16px;
    font-size: 14px;
}

/* Menus share one panel under the bar. It drops in when a menu opens; moving
   to another menu keeps the panel, morphs its height (.is-resizing), slides
   its tinted line to the new trigger and slides the new menu in from the
   side the pointer moved to (.is-entering). The list of links on the left
   drives the preview pane on the right. */
.nv-sheet {
    --tint: #60a5fa;
    position: absolute;
    top: calc(var(--nv-row) - 6px * var(--nv-p) + 8px);
    left: 50%;
    z-index: 2;
    display: none;
    width: min(1080px, 100vw - 64px);
    padding: 8px;
    overflow: hidden;
    border-radius: 24px;
    background: #121a28;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 34px 80px rgba(3, 7, 18, 0.65);
    transform: translateX(-50%);
}

.nv-nav.has-menu .nv-sheet {
    display: block;
    animation: nv-drop 0.18s ease-out;
}

.nv-sheet.is-resizing {
    transition: height 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nv-sheet-tabs,
.nv-sheet-actions {
    display: none;
}

.nv-sheet[data-tint="green"],
.nv-menu[data-tint="green"] {
    --tint: #3bd671;
}

.nv-sheet[data-tint="purple"],
.nv-menu[data-tint="purple"] {
    --tint: #a78bfa;
}

.nv-sheet[data-tint="amber"],
.nv-menu[data-tint="amber"] {
    --tint: #fbbf24;
}

/* The tinted line under the trigger of the open menu */
.nv-sheet::after {
    content: "";
    position: absolute;
    top: 0;
    left: var(--caret, 50%);
    width: 40px;
    height: 2px;
    margin-left: -20px;
    border-radius: 0 0 2px 2px;
    background: var(--tint);
    transition: left 0.26s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.26s ease;
}

.nv-sheet.is-placing::after {
    transition: none;
}

.nv-menu {
    --tint: #60a5fa;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 8px;
}

.nv-menu[hidden] {
    display: none;
}

.nv-menu.is-entering {
    animation: nv-swap 0.22s ease-out;
}

.nv-menu-list {
    max-height: calc(100vh - 140px);
    padding: 12px 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nv-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 4px;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nv-cat:first-child {
    margin-top: 0;
}

.nv-cat::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--tint);
}

.nv-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nv-row:hover,
.nv-row:focus-visible,
.nv-row.is-active {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.nv-ico {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(96, 165, 250, 0.15);
    background: color-mix(in srgb, var(--tint) 15%, transparent);
    color: var(--tint);
}

.nv-ico svg {
    width: 16px;
    height: 16px;
}

.nv-row-thumb {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    object-fit: cover;
}

.nv-row-title {
    min-width: 0;
}

.nv-row-meta {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    font-weight: 500;
}

.nv-row-go {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: var(--tint);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.nv-row-meta + .nv-row-go {
    margin-left: 0;
}

.nv-row.is-active .nv-row-go {
    opacity: 1;
}

.nv-menu-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px 10px 2px;
    color: #60a5fa;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.nv-menu-all:hover {
    color: #93c5fd;
}

.nv-menu-all svg {
    width: 15px;
    height: 15px;
}

.nv-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #0f1622;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* The art takes whatever height the list leaves, never less than 260px */
.nv-pane-art {
    flex: 1 0 260px;
    min-height: 260px;
    background: #0d141f;
}

.nv-pane-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nv-pane-art img:not([src]) {
    visibility: hidden;
}

.nv-pane-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 20px 24px 22px;
}

.nv-pane-cat {
    color: #93c5fd;
    color: color-mix(in srgb, var(--tint) 75%, #fff);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nv-pane-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.nv-pane-desc {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14.5px;
    line-height: 1.55;
}

.nv-pane-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 14px;
}

.nv-pane-val {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13.5px;
}

.nv-pane-val[hidden] {
    display: none;
}

.nv-pane-val b {
    color: #fff;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.nv-pane-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.nv-pane-actions .nv-pill {
    height: 42px;
}

.nv-pane-actions .nv-pill[hidden] {
    display: none;
}

.nv-scrim {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(8, 12, 20, 0.55);
    pointer-events: auto;
    animation: nv-fade 0.2s ease-out;
}

.nv-scrim[hidden] {
    display: none;
}

@keyframes nv-drop {
    from {
        opacity: 0;
        transform: translate(-50%, -6px);
    }
}

@keyframes nv-swap {
    from {
        opacity: 0;
        transform: translateX(var(--nv-from, 0));
    }
}

@keyframes nv-fade {
    from {
        opacity: 0;
    }
}

@keyframes nv-up {
    from {
        transform: translateY(24px);
        opacity: 0;
    }
}

@media (min-width: 1200px) and (max-width: 1365.98px) {
    .nv-nav-row {
        padding-left: 18px;
    }

    .nv-nav-links {
        margin-left: 2px;
    }

    .nv-nav-link {
        padding: 0 10px;
    }

    .nv-nav-text {
        padding: 0 8px;
    }

    .nv-sections a {
        padding: 0 10px;
    }
}

/* Tablets and phones: the bar keeps the logo (and the game on a game page);
   everything else moves into the bottom sheet. */
@media (max-width: 1199.98px) {
    :root,
    html.nv-has-sub {
        --nv-row: 56px;
        --nv-bar: 56px;
        --nv-lift: 8px;
    }

    .nv-nav,
    html.nv-has-sub .nv-nav {
        --nv-logo: 0;
        --nv-r: 20px;
    }

    .nv-nav-bar {
        width: 100%;
        border-radius: calc(32px - 12px * var(--nv-p)) calc(32px - 12px * var(--nv-p)) calc(20px * var(--nv-p)) calc(20px * var(--nv-p));
    }

    .nv-nav-row {
        height: var(--nv-row);
        padding: 0 6px 0 16px;
    }

    .nv-nav-links,
    .nv-lang,
    .nv-nav-text,
    .nv-nav-cta,
    .nv-nav-sub,
    .nv-chip:not(.is-game) {
        display: none;
    }

    .nv-chip {
        height: 40px;
        gap: 8px;
        padding-right: 10px;
        font-size: 14px;
    }

    .nv-chip > img {
        width: 28px;
        height: 28px;
    }

    .nv-burger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        cursor: pointer;
    }

    .nv-burger svg {
        width: 20px;
        height: 20px;
    }

    .nv-burger-close,
    .nv-nav.is-sheet-open .nv-burger-open {
        display: none;
    }

    .nv-nav.is-sheet-open .nv-burger-close {
        display: block;
    }

    .nv-sheet {
        position: fixed;
        inset: auto 0 0;
        z-index: 2;
        width: auto;
        max-width: 640px;
        margin: 0 auto;
        display: none;
        max-height: calc(100dvh - 72px);
        padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 28px 28px 0 0;
        background: #121a28;
        box-shadow: 0 -20px 50px rgba(3, 7, 18, 0.6);
        transform: none;
    }

    .nv-nav.has-menu .nv-sheet {
        display: none;
    }

    .nv-nav.is-sheet-open .nv-sheet {
        display: block;
        animation: nv-up 0.22s ease-out;
    }

    .nv-sheet::before {
        content: "";
        display: block;
        width: 40px;
        height: 5px;
        margin: 0 auto 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.2);
    }

    .nv-sheet-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding-bottom: 12px;
    }

    .nv-sheet-tabs button {
        --tab-tint: #60a5fa;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 36px;
        padding: 0 14px;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.75);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
    }

    .nv-sheet-tabs button::before {
        content: "";
        width: 8px;
        height: 8px;
        background: var(--tab-tint);
    }

    .nv-sheet-tabs [data-nav-tab="free"] {
        --tab-tint: #3bd671;
    }

    .nv-sheet-tabs [data-nav-tab="community"] {
        --tab-tint: #a78bfa;
    }

    .nv-sheet-tabs [data-nav-tab="company"] {
        --tab-tint: #fbbf24;
    }

    .nv-sheet-tabs button[aria-pressed="true"] {
        background: #fff;
        color: #0b111b;
    }

    /* The preview card sits above the links */
    .nv-menu {
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .nv-menu.is-entering {
        animation: none;
    }

    .nv-sheet::after {
        display: none;
    }

    .nv-menu-list {
        max-height: none;
        padding: 4px 0 8px;
        overflow: visible;
    }

    .nv-row {
        padding: 8px 6px;
    }

    .nv-row-go {
        opacity: 0.5;
    }

    .nv-pane-art {
        flex: none;
        height: 124px;
        min-height: 0;
    }

    .nv-pane-body {
        gap: 6px;
        padding: 14px 16px 16px;
    }

    .nv-pane-title {
        font-size: 18px;
    }

    .nv-pane-desc {
        font-size: 13.5px;
    }

    .nv-pane-foot {
        padding-top: 8px;
    }

    .nv-pane-val {
        display: none;
    }

    .nv-pane-actions {
        width: 100%;
        margin-left: 0;
    }

    .nv-pane-actions .nv-pill {
        flex: 1;
        height: 40px;
    }

    .nv-sheet-actions {
        display: flex;
        gap: 10px;
        padding-top: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nv-sheet-actions .nv-pill {
        flex: 1;
        height: 48px;
    }
}

/* Room for the sign-up button beside the menu button */
@media (min-width: 576px) and (max-width: 1199.98px) {
    .nv-nav-cta {
        display: inline-flex;
        height: 40px;
        margin-right: 4px;
        padding: 0 16px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    :root {
        --nv-top: 12px;
    }

    .nv-nav {
        padding-inline: 8px;
    }

    .nv-nav-bar {
        border-radius: calc(24px - 4px * var(--nv-p)) calc(24px - 4px * var(--nv-p)) calc(20px * var(--nv-p)) calc(20px * var(--nv-p));
    }

    #main-content > .chapters:first-child > .chapter:first-child {
        padding-top: calc(40px + var(--nv-bar));
    }
}

/* The heroes' own phone padding (chapter.css, home.html), plus the bar */
@media (max-width: 767.98px) {
    #main-content > .chapters:first-child > .fp-hero:first-child {
        padding-top: calc(48px + var(--nv-bar));
    }

    #main-content > .chapters:first-child > .hh:first-child {
        min-height: 0;
        padding-top: calc(56px + var(--nv-bar));
    }
}

@media (prefers-reduced-motion: reduce) {
    .nv-nav.has-menu .nv-sheet,
    .nv-menu.is-entering,
    .nv-scrim,
    .nv-nav.is-sheet-open .nv-sheet {
        animation: none;
    }

    .nv-sheet.is-resizing,
    .nv-sheet::after,
    .nv-chevron {
        transition: none;
    }
}

/* Language menu (partials/language-menu.html): a search field over one
   scrolling list, in the top bar and the footer alike. The panel keeps the
   site's dropdown look from main.css; the rows are its own, not .dropdown-item */
.dropdown-menu.lang-menu {
    width: 288px;
    max-width: calc(100vw - 32px);
}

.lang-search {
    position: relative;
}

.lang-search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #8b96ad;
    transform: translateY(-50%);
    pointer-events: none;
}

.lang-search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 14px;
}

.lang-search input::placeholder {
    color: #6b768c;
}

.lang-search input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
}

.lang-list {
    max-height: 240px;
    margin-top: 6px;
    padding-top: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.lang-menu .lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
}

.lang-item[hidden] {
    display: none;
}

.lang-menu .lang-item:hover,
.lang-menu .lang-item:focus-visible {
    background: rgba(255, 255, 255, 0.06);
}

.lang-menu .lang-item.is-current {
    background: rgba(43, 80, 255, 0.22);
}

/* The language's own name stays whole; its translation gives way */
.lang-item > span:first-child {
    flex: none;
    white-space: nowrap;
}

.lang-item-sub {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 13px;
    color: #8b96ad;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-item-check {
    display: flex;
    flex: none;
    width: 16px;
    color: #60a5fa;
}

.lang-empty {
    margin: 0;
    padding: 12px 10px;
    font-size: 13px;
    color: #8b96ad;
}
