.gp3-ol-wrap{min-width:220px;max-width:300px;padding:2px 2px 0;font-family:'Segoe UI',Arial,sans-serif;color:#eef5f7}
.gp3-ol-title{font-size:13px;font-weight:700;color:#fff;margin-bottom:6px;line-height:1.3}
.gp3-ol-line{font-size:11px;line-height:1.45;color:#d6e1e5}
.gp3-ol-line b{color:#caff00;font-weight:700}

#nv-lang-flags{
    position:fixed;
    z-index:9990;
    display:none;
    width:320px;
    max-width:calc(100vw - 20px);
    border-radius:14px;
    cursor:default;
    background:linear-gradient(160deg,#f0f0f0 0%,#d8d8d8 100%);
    border:1px solid #bbb;
    outline:1px solid rgba(255,255,255,.9);
    outline-offset:-2px;
    box-shadow:
        0 2px 0 #fff inset,
        0 -1px 0 rgba(0,0,0,.12) inset,
        2px 0 0 rgba(255,255,255,.7) inset,
        -1px 0 0 rgba(0,0,0,.08) inset,
        0 12px 32px rgba(0,0,0,.45),
        0 4px 8px rgba(0,0,0,.25),
        0 1px 2px rgba(0,0,0,.35);
    animation:gp3LngPopupAppear .18s cubic-bezier(.22,1,.36,1) both;
}
#nv-lang-flags.gp3-flags-open{display:block}

@keyframes gp3LngPopupAppear{
    from{opacity:0;transform:scale(.92) translateY(-8px)}
    to{opacity:1;transform:scale(1) translateY(0)}
}

#nv-lang-flags-bar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:9px 12px 8px;
    cursor:grab;
    user-select:none;
    border-radius:13px 13px 0 0;
    background:linear-gradient(180deg,#e0e0e0 0%,#c8c8c8 100%);
    border-bottom:1px solid #aaa;
    box-shadow:0 1px 0 rgba(255,255,255,.8) inset;
}
#nv-lang-flags-bar:active{cursor:grabbing}

#nv-lang-flags-bar-title{
    font-size:10px;
    font-weight:700;
    letter-spacing:.12em;
    text-transform:uppercase;
    color:#444;
    font-family:'Segoe UI',Arial,sans-serif;
    text-shadow:0 1px 0 rgba(255,255,255,.8);
}

#nv-lang-flags-close{
    width:16px;
    height:16px;
    border-radius:50%;
    border:1px solid rgba(0,0,0,.25);
    background:linear-gradient(180deg,#ff6b6b,#e03030);
    color:#fff;
    cursor:pointer;
    font-size:10px;
    line-height:14px;
    text-align:center;
    padding:0;
    box-shadow:0 1px 2px rgba(0,0,0,.3),0 1px 0 rgba(255,255,255,.4) inset;
    transition:transform .1s,box-shadow .1s;
}
#nv-lang-flags-close:hover{
    transform:scale(1.15);
    box-shadow:0 2px 6px rgba(220,50,50,.5),0 1px 0 rgba(255,255,255,.4) inset;
}

#nv-lang-flags-grid{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:3px;
    padding:8px 8px 10px;
}

.nv-flag-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
    text-decoration:none;
    cursor:pointer;
    padding:5px 3px 4px;
    border-radius:7px;
    border:1px solid transparent;
    transition:all .12s ease;
    background:linear-gradient(180deg,#f5f5f5 0%,#e2e2e2 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,.9) inset,
        0 -1px 0 rgba(0,0,0,.08) inset,
        0 2px 3px rgba(0,0,0,.18),
        0 1px 1px rgba(0,0,0,.12);
}

.nv-flag-item:hover{
    background:linear-gradient(180deg,#fff 0%,#e8f0ff 100%);
    border-color:rgba(74,158,255,.4);
    box-shadow:
        0 1px 0 rgba(255,255,255,1) inset,
        0 -1px 0 rgba(0,0,0,.05) inset,
        0 4px 10px rgba(74,158,255,.25),
        0 2px 4px rgba(0,0,0,.15);
    transform:translateY(-2px);
}

.nv-flag-active{
    background:linear-gradient(180deg,#c8dcff 0%,#a8c4ff 100%);
    border-color:rgba(74,158,255,.6);
    box-shadow:
        0 1px 3px rgba(0,0,0,.2) inset,
        0 1px 0 rgba(255,255,255,.5),
        0 2px 6px rgba(74,158,255,.3);
    transform:translateY(1px);
}

.nv-flag{
    display:block;
    width:28px;
    height:18px;
    object-fit:cover;
    border-radius:3px;
    border:1px solid rgba(0,0,0,.2);
    box-shadow:0 1px 3px rgba(0,0,0,.25),0 1px 0 rgba(255,255,255,.5) inset;
}

.nv-flag-eo,
.nv-flag-morse{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:28px;
    height:18px;
    border-radius:3px;
    font-size:11px;
    border:1px solid rgba(0,0,0,.2);
    box-shadow:0 1px 3px rgba(0,0,0,.25);
    line-height:1;
}

.nv-flag-eo{background:#009000;color:#fff}
.nv-flag-morse{background:#1a1a1a;color:#4a9eff;font-family:monospace}
.nv-flag-rare{background:#2a1952;color:#f0e6ff;font-family:'Segoe UI',Arial,sans-serif;font-size:8px;font-weight:700;letter-spacing:.04em}
.nv-flag-rare-badge{background:#21406f;color:#fff;font-family:'Segoe UI',Arial,sans-serif;font-size:9px;font-weight:700}

.nv-flag-label{
    font-size:6.5px;
    font-weight:600;
    color:#333;
    text-align:center;
    white-space:nowrap;
    max-width:42px;
    overflow:hidden;
    text-overflow:ellipsis;
    line-height:1.2;
    font-family:'Segoe UI',Arial,sans-serif;
    text-shadow:0 1px 0 rgba(255,255,255,.8);
    letter-spacing:.02em;
}

.nv-flag-item:hover .nv-flag-label{color:#1a3a8a}
.nv-flag-active .nv-flag-label{color:#0a2a6a;font-weight:700}


#nv-rare-flags{
    position:fixed;
    z-index:9991;
    display:none;
    width:320px;
    max-width:calc(100vw - 20px);
    border-radius:14px;
    cursor:default;
    background:linear-gradient(160deg,#ede7ff 0%,#d8d8f5 100%);
    border:1px solid #9b8fd1;
    outline:1px solid rgba(255,255,255,.9);
    outline-offset:-2px;
    box-shadow:
        0 2px 0 #fff inset,
        0 -1px 0 rgba(0,0,0,.12) inset,
        2px 0 0 rgba(255,255,255,.7) inset,
        -1px 0 0 rgba(0,0,0,.08) inset,
        0 12px 32px rgba(0,0,0,.45),
        0 4px 8px rgba(0,0,0,.25),
        0 1px 2px rgba(0,0,0,.35);
    animation:gp3LngPopupAppear .18s cubic-bezier(.22,1,.36,1) both;
}
#nv-rare-flags.gp3-flags-open{display:block}
#nv-rare-flags-bar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:9px 12px 8px;
    cursor:grab;
    user-select:none;
    border-radius:13px 13px 0 0;
    background:linear-gradient(180deg,#dfd8ff 0%,#c7bff1 100%);
    border-bottom:1px solid #998cd1;
    box-shadow:0 1px 0 rgba(255,255,255,.8) inset;
}
#nv-rare-flags-bar:active{cursor:grabbing}
#nv-rare-flags-bar-title{
    font-size:10px;
    font-weight:700;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#3f356b;
    font-family:'Segoe UI',Arial,sans-serif;
    text-shadow:0 1px 0 rgba(255,255,255,.85);
}
#nv-rare-flags-close{
    width:16px;height:16px;border-radius:50%;border:1px solid rgba(0,0,0,.25);
    background:linear-gradient(180deg,#ff6b6b,#e03030);color:#fff;cursor:pointer;
    font-size:10px;line-height:14px;text-align:center;padding:0;
    box-shadow:0 1px 2px rgba(0,0,0,.3),0 1px 0 rgba(255,255,255,.4) inset;
}
#nv-rare-flags-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:6px;
    padding:10px;
}

@media (max-width:640px){
    #nv-lang-flags{
        width:min(320px,calc(100vw - 12px));
    }
    #nv-lang-flags-grid{
        grid-template-columns:repeat(5,1fr);
    }
    #nv-rare-flags{
        width:min(320px,calc(100vw - 12px));
    }
    #nv-rare-flags-grid{
        grid-template-columns:repeat(2,1fr);
    }
}
