/* Nexus Lab v2, P1 frame (docs/tasks/lab-v2-p1-frame.md). Smoked green glass over the fixed official splash (kit-style family A-dark + C).
   Loaded only while v2 is on (api/lib/nexus_lab5.php); every rule is scoped under .nxl3.nxl5, logical properties only, no !important.
   Glass rules: the blur sits on containers (bar, rail, sheet, dock, panels), never on per-tile elements; -webkit-backdrop-filter is written
   before backdrop-filter; nothing that carries a backdrop-filter has an ancestor with opacity, filter or transform from this file. */

/* ---------------------------------------------------------------- tokens */
.nxl3.nxl5{
--l5-glass:rgba(8,19,13,.58);--l5-glass-2:rgba(10,24,16,.46);--l5-glass-solid:rgba(6,14,9,.86);
--l5-edge:rgba(150,255,190,.15);--l5-edge-2:rgba(150,255,190,.26);
--l5-lip:inset 0 1px 0 rgba(214,255,228,.09),inset 0 -1px 0 rgba(214,255,228,.03);
--l5-shadow:0 28px 60px -32px rgba(0,10,4,.9);
--l5-glow:0 0 0 1px rgba(69,248,130,.32),0 10px 30px -12px rgba(69,248,130,.55);
--l5-r-sm:12px;--l5-r-md:16px;--l5-r-lg:22px;
--l5-ease:cubic-bezier(.22,1,.36,1);--l5-spring:cubic-bezier(.34,1.56,.64,1);
/* the shared surfaces of every Lab page paint with these four tokens: as translucent green-black they turn into smoked glass over the art */
--l3-ink-1:rgba(9,18,13,.74);--l3-ink-2:rgba(13,25,18,.62);--l3-ink-3:rgba(22,38,28,.64);--l3-ink-4:rgba(31,50,38,.7);
--l3-line:rgba(150,255,190,.11);--l3-line-2:rgba(150,255,190,.2);
--l3-r-md:12px;--l3-r-lg:18px;
background:transparent}
.nxl3.nxl5 .nxl3-col{background:transparent}

/* ---------------------------------------------------------------- the art: brighter, fixed, settles once */
.nxl3.nxl5 .nxl3-bg{background:#050b07}
.nxl3.nxl5 .nxl3-bg--one .nxl3-bg__art img,.nxl3.nxl5 .nxl3-bg__team img{filter:brightness(.82) saturate(1.12)}
.nxl3.nxl5 .nxl3-bg__team.is-enemy img{filter:brightness(.7) saturate(.7)}
.nxl3.nxl5 .nxl3-bg--counters .nxl3-bg__art img{filter:brightness(.8) saturate(1.1)}
/* the veil: dark where the reading column is (start side), the art shows at the end side and the top */
.nxl3.nxl5 .nxl3-bg::after{background:linear-gradient(90deg,rgba(5,11,7,.84) 0%,rgba(5,11,7,.66) 34%,rgba(5,11,7,.38) 68%,rgba(5,11,7,.22) 100%),linear-gradient(0deg,rgba(5,11,7,.8) 0%,rgba(5,11,7,0) 42%),linear-gradient(180deg,rgba(5,11,7,.4) 0%,rgba(5,11,7,0) 18%)}
[dir=rtl].nxl3.nxl5 .nxl3-bg::after{background:linear-gradient(270deg,rgba(5,11,7,.84) 0%,rgba(5,11,7,.66) 34%,rgba(5,11,7,.38) 68%,rgba(5,11,7,.22) 100%),linear-gradient(0deg,rgba(5,11,7,.8) 0%,rgba(5,11,7,0) 42%),linear-gradient(180deg,rgba(5,11,7,.4) 0%,rgba(5,11,7,0) 18%)}
@media (max-width:899px){
.nxl3.nxl5 .nxl3-bg::after,[dir=rtl].nxl3.nxl5 .nxl3-bg::after{background:linear-gradient(180deg,rgba(5,11,7,.5) 0%,rgba(5,11,7,.56) 30%,rgba(5,11,7,.76) 60%,rgba(5,11,7,.88) 100%)}
}
@keyframes l5-settle{from{transform:scale(1.06);filter:blur(10px)}}
/* the settle blurs a full-viewport layer: tablets and desktops only (the site keeps blur off under 768 px for speed) */
@media (min-width:768px) and (prefers-reduced-motion:no-preference){.nxl3.nxl5 .nxl3-bg__art{animation:l5-settle 1.4s var(--l5-ease) backwards}}

/* ---------------------------------------------------------------- glass recipe (shared) */
.nxl3.nxl5 :is(.nxl3-top__in,.nxl3-rail,.nxl3-tabbar,.nxl3-search__pop){-webkit-backdrop-filter:blur(24px) saturate(1.5);backdrop-filter:blur(24px) saturate(1.5)}
/* under 768 px the site turns every backdrop-filter off on purpose (nx-v4-shell.css, phone speed): there the same surfaces are near solid smoked green, not glass */
@media (max-width:767px){
.nxl3.nxl5{--l5-glass:rgba(7,16,11,.88);--l5-glass-2:rgba(9,20,14,.84);--l3-ink-1:rgba(9,18,13,.9);--l3-ink-2:rgba(13,25,18,.86);--l3-ink-3:rgba(22,38,28,.88);--l3-ink-4:rgba(31,50,38,.9)}
}
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
.nxl3.nxl5{--l3-ink-1:#09110d;--l3-ink-2:#0e1712;--l3-ink-3:#15211a;--l3-ink-4:#1d2c23;--l5-glass:#0b1610;--l5-glass-2:#0c1912;--l5-glass-solid:#08110c}
}

/* ---------------------------------------------------------------- top bar: one floating glass pill */
.nxl3.nxl5 .nxl3-top{background:transparent;border:0;padding-block:12px 4px;padding-inline:var(--l3-gut)}
.nxl3.nxl5 .nxl3-top__in{position:relative;isolation:isolate;max-inline-size:none;padding:6px;border:1px solid var(--l5-edge);border-radius:var(--l5-r-lg);background:var(--l5-glass);box-shadow:var(--l5-lip),var(--l5-shadow)}
.nxl3.nxl5 .nxl3-top .nxl3-iconbtn{border-radius:14px;background:rgba(150,255,190,.06);border-color:var(--l5-edge)}
.nxl3.nxl5 .nxl3-top .nxl3-iconbtn:hover{background:rgba(150,255,190,.12)}
.nxl3.nxl5 .nxl3-search input{border-radius:14px;background:rgba(6,14,9,.5);border-color:var(--l5-edge)}
.nxl3.nxl5 .nxl3-search input:focus{background:rgba(6,14,9,.72);border-color:var(--l3-signal-edge)}
.nxl3.nxl5 .nxl3-search__pop{background:var(--l5-glass-solid);border:1px solid var(--l5-edge-2);border-radius:var(--l5-r-md);box-shadow:var(--l5-lip),var(--l5-shadow)}
.nxl3.nxl5 .nxl3-patch{border-radius:999px;background:rgba(6,14,9,.5);border-color:var(--l5-edge)}
/* phones and tablets: the dock's More opens the Lab menu, so the bar keeps only the game switch and search (one menu button on the page, the site's) */
@media (max-width:1099px){
.nxl3.nxl5 .nxl3-top__menu{display:none}
.nxl3.nxl5 .nxl3-top__in{justify-content:space-between}
}

/* ---------------------------------------------------------------- game switch with a travelling bead (lab-v5.js adds .has-bead and the bead) */
.nxl3.nxl5 .nxl3-seg{position:relative;isolation:isolate;border-radius:16px;background:rgba(6,14,9,.55);border:1px solid var(--l5-edge);padding:4px}
.nxl3.nxl5 .nxl3-seg__o{position:relative;z-index:1;border-radius:12px;transition:color .25s var(--l5-ease)}
.nxl3.nxl5 .nxl3-seg__o.is-on{box-shadow:var(--l5-glow)}
.nxl3.nxl5 .nxl3-seg.has-bead .nxl3-seg__o.is-on{background:transparent;box-shadow:none;color:var(--l3-signal-ink)}
.nxl3.nxl5 .nxl3-seg.has-bead .nxl3-seg__o:not(.is-on){color:var(--l3-text-2)}
.nxl3.nxl5 .nxl3-seg.has-bead.is-peek .nxl3-seg__o.is-on{color:var(--l3-text-2)}
.nxl3.nxl5 .nxl3-seg.has-bead.is-peek .nxl3-seg__o.is-peek{color:var(--l3-signal-ink)}
.nxl3.nxl5 .nxl5-bead{position:absolute;z-index:0;inset-block:4px;inset-inline-start:0;inline-size:var(--w,0px);border-radius:12px;background:linear-gradient(180deg,#6bff9c,#45f882 55%,#2fe06d);box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 8px 22px -8px rgba(69,248,130,.7);transform:translateX(var(--x,0px));transition:transform .38s var(--l5-spring),inline-size .38s var(--l5-spring);pointer-events:none}
@media (prefers-reduced-motion:reduce){.nxl3.nxl5 .nxl5-bead{transition:none}}

/* ---------------------------------------------------------------- rail (desktop) and Lab sheet (phones) */
.nxl3.nxl5 .nxl3-rail{background:rgba(6,14,9,.64);border-inline-end:1px solid var(--l5-edge)}
.nxl3.nxl5 .nxl3-nav{border-radius:var(--l5-r-sm);transition:background .2s var(--l5-ease),color .2s var(--l5-ease),box-shadow .2s var(--l5-ease)}
.nxl3.nxl5 a.nxl3-nav:hover{background:rgba(150,255,190,.07)}
.nxl3.nxl5 .nxl3-nav.is-on{background:linear-gradient(90deg,rgba(69,248,130,.18),rgba(69,248,130,.05));box-shadow:inset 0 0 0 1px rgba(69,248,130,.26),0 8px 24px -14px rgba(69,248,130,.6)}
[dir=rtl].nxl3.nxl5 .nxl3-nav.is-on{background:linear-gradient(270deg,rgba(69,248,130,.18),rgba(69,248,130,.05))}
.nxl3.nxl5 .nxl3-rail__lbl{letter-spacing:.06em;text-transform:uppercase;font-size:11px;color:rgba(186,199,191,.75)}
[dir=rtl].nxl3.nxl5 .nxl3-rail__lbl{letter-spacing:0;text-transform:none;font-size:12px}
@media (max-width:1099px){
.nxl3.nxl5 .nxl3-rail{background:var(--l5-glass-solid);border:1px solid var(--l5-edge-2);border-block-end:0;border-radius:26px 26px 0 0;box-shadow:var(--l5-lip),0 -30px 70px -30px rgba(0,0,0,.85)}
.nxl3.nxl5 .nxl3-scrim{background:rgba(3,8,5,.56);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
}

/* ---------------------------------------------------------------- dock (phones and tablets): a floating glass pill */
@media (max-width:1099px){
.nxl3.nxl5 .nxl3-tabbar{inset-inline:12px;inset-block-end:calc(10px + env(safe-area-inset-bottom,0px));padding-block-end:0;border:1px solid var(--l5-edge-2);border-radius:24px;background:rgba(6,14,9,.88);box-shadow:var(--l5-lip),0 22px 50px -18px rgba(0,0,0,.9)}
.nxl3.nxl5 .nxl3-tabbar ul{padding:5px;gap:2px}
.nxl3.nxl5 .nxl3-tabbar :is(a,button){min-block-size:54px;border-radius:18px;padding:7px 2px;transition:background .2s var(--l5-ease),color .2s var(--l5-ease),transform .2s var(--l5-spring)}
.nxl3.nxl5 .nxl3-tabbar :is(a,button):active{transform:scale(.94)}
.nxl3.nxl5 .nxl3-tabbar :is(a,button) span{max-inline-size:100%;overflow:hidden;white-space:nowrap;text-overflow:clip;font-size:11px;letter-spacing:-.01em}
[dir=rtl].nxl3.nxl5 .nxl3-tabbar :is(a,button) span{font-size:10.5px;letter-spacing:0}
.nxl3.nxl5 .nxl3-tabbar .is-on{background:linear-gradient(180deg,rgba(69,248,130,.2),rgba(69,248,130,.08));box-shadow:inset 0 0 0 1px rgba(69,248,130,.3),inset 0 1px 0 rgba(214,255,228,.12)}
.nxl3.nxl5 .nxl3-tabbar .is-on .nxl3-i{filter:drop-shadow(0 0 6px rgba(69,248,130,.6))}
body:has(.nxl3.nxl5 .nxl3-tabbar){--nx-dock-offset:86px}
.nxl3.nxl5 .nxl3-main{padding-block-end:calc(96px + env(safe-area-inset-bottom,0px))}
}
@media (max-width:767px){.nxl3.nxl5 .nxl3-tabbar{background:rgba(6,14,9,.96)}}
@media (prefers-reduced-motion:reduce){.nxl3.nxl5 .nxl3-tabbar :is(a,button):active{transform:none}}

/* ---------------------------------------------------------------- shared components on glass */
.nxl3.nxl5 .nxl3-h1{text-shadow:0 2px 18px rgba(0,0,0,.55)}
.nxl3.nxl5 .nxl3-ph__txt>p,.nxl3.nxl5 .nxl3-lead{color:rgba(226,238,230,.94);text-shadow:0 1px 10px rgba(0,0,0,.6)}
/* small print (notes, "updated for patch") can sit straight on the art: one step brighter than v1, so it stays 4.5:1 over bright splash art */
.nxl3.nxl5 .nxl3-note{color:#c3d2c8;text-shadow:0 1px 8px rgba(0,0,0,.7)}
.nxl3.nxl5 .nxl3-btn{border-radius:14px;border-color:var(--l5-edge)}
.nxl3.nxl5 .nxl3-btn--primary,.nxl3.nxl5 .nxl3-btn.is-primary{box-shadow:var(--l5-glow)}
.nxl3.nxl5 .nxl3-iconbtn{border-radius:14px}
.nxl3.nxl5 .nxl3-fbar{border-radius:var(--l5-r-lg);border-color:var(--l5-edge);box-shadow:var(--l5-lip)}
.nxl3.nxl5 .nxl3-chip{border-radius:999px}
.nxl3.nxl5 .nxl3-crumbs{text-shadow:0 1px 8px rgba(0,0,0,.7)}
.nxl3.nxl5 .nxl3-crumbs :is(a,span){color:rgba(226,238,230,.9)}
.nxl3.nxl5 :focus-visible{outline-color:#8dffb6;outline-offset:3px}
/* site polish 12: one press feedback across Nexus Lab, the same as the store (scale .97); hover transitions stay as they are */
.nxl3.nxl5 :is(.nxl3-tool,.nxl3-chip,.nxl3-seg__o,.nxl3-store__i,.nxl3-skin__buy,.nxl3s-sk__buy,.nxp-pick,.nxl3-ct>a,.nxp-ct>a):active:active{transform:scale(.97)}
