/* ============================================================
   CARD GAME PROTOTYPE
   DARK FANTASY / COSMIC GLASS UI
============================================================ */

:root {
    --bg: #050507;
    --panel: rgba(15, 13, 20, .58);
    --panel-light: rgba(255, 255, 255, .045);

    --border: rgba(255, 255, 255, .10);
    --border-bright: rgba(211, 184, 255, .28);

    --text: #f8f5ff;
    --text-soft: rgba(239, 231, 249, .56);
    --text-faint: rgba(239, 231, 249, .28);

    --accent: #c6a5ff;
    --accent-soft: rgba(164, 108, 235, .17);

    --danger: #ff5570;
}


/* ============================================================
   RESET
============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body,
#game {
    width: 100%;
    height: 100%;
}

body {
    overflow: hidden;

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    color: var(--text);

    background:
        #050507;
}

button {
    font: inherit;
}

button,
.collection-card,
.battle-card {
    -webkit-tap-highlight-color: transparent;
}

.screen {
    display: none;

    position: relative;

    width: 100%;
    height: 100vh;

    overflow: hidden;
}

.screen.active {
    display: flex;
}


/* ============================================================
   GLOBAL BACKGROUND
============================================================ */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(117, 68, 165, .13),
            transparent 34%
        ),
        radial-gradient(
            circle at 16% 80%,
            rgba(60, 80, 130, .05),
            transparent 28%
        ),
        linear-gradient(
            145deg,
            #09070d,
            #030305 65%,
            #07060a
        );

    z-index: -2;
}

body::after {
    content: "";

    position: fixed;
    inset: 0;

    pointer-events: none;

    opacity: .4;

    background-image:
        radial-gradient(
            circle,
            rgba(255,255,255,.12) 0 1px,
            transparent 1.4px
        ),
        radial-gradient(
            circle,
            rgba(196,157,255,.11) 0 1px,
            transparent 1.4px
        );

    background-size:
        150px 150px,
        235px 235px;

    background-position:
        30px 45px,
        110px 80px;

    z-index: -1;
}


/* ============================================================
   MAIN MENU
============================================================ */

#main-menu {
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            ellipse at center,
            rgba(106, 58, 155, .12),
            transparent 52%
        );
}


/* ============================================================
   MENU BACKGROUND
============================================================ */

.menu-background {
    position: absolute;

    inset: 0;

    overflow: hidden;

    pointer-events: none;
}

.menu-stars {
    position: absolute;

    inset: 0;

    opacity: .55;

    background-image:
        radial-gradient(
            circle,
            rgba(255,255,255,.22) 0 1px,
            transparent 1.4px
        ),
        radial-gradient(
            circle,
            rgba(191,151,255,.18) 0 1px,
            transparent 1.5px
        );

    background-size:
        165px 165px,
        260px 260px;

    background-position:
        20px 40px,
        120px 90px;
}

.menu-orb {
    position: absolute;

    border-radius: 50%;

    filter: blur(90px);

    opacity: .18;
}

.orb-1 {
    width: 500px;
    height: 500px;

    left: 20%;
    top: 20%;

    background:
        rgba(120, 75, 190, .6);
}

.orb-2 {
    width: 430px;
    height: 430px;

    right: 15%;
    bottom: 8%;

    background:
        rgba(90, 55, 150, .5);
}


/* ============================================================
   MENU SIDE DECORATIONS
============================================================ */

.menu-decoration {
    position: absolute;

    top: 50%;

    width: min(270px, 18vw);
    height: 1px;

    opacity: .35;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(202,175,245,.7)
        );
}

.menu-decoration-left {
    left: 0;
}

.menu-decoration-right {
    right: 0;

    transform:
        rotate(180deg);
}


/* ============================================================
   MAIN MENU CONTENT
============================================================ */

.main-menu-content {
    position: relative;

    z-index: 5;

    width: min(420px, 88vw);

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    /*
       L'ensemble complet est centré.
    */
    transform:
        translateY(-10px);
}


/* ============================================================
   EMBLEM
============================================================ */

.game-emblem {
    position: relative;

    width: 70px;
    height: 70px;

    display: grid;
    place-items: center;

    margin-bottom: 27px;

    transform:
        rotate(45deg);

    border:
        1px solid
        rgba(213,190,255,.32);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.07),
            rgba(158,100,220,.035)
        );

    backdrop-filter:
        blur(15px);

    -webkit-backdrop-filter:
        blur(15px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.09),
        0 0 38px rgba(157,100,225,.16);
}

.game-emblem::before {
    content: "";

    position: absolute;

    inset: 13px;

    border:
        1px solid
        rgba(255,255,255,.25);
}

.game-emblem::after {
    content: "";

    position: absolute;

    inset: 27px;

    background:
        #c8a6ff;

    box-shadow:
        0 0 17px
        rgba(198,160,255,.8);
}

.game-emblem span {
    position: relative;

    z-index: 2;

    transform:
        rotate(-45deg);

    font-size: 8px;

    color: white;
}


/* ============================================================
   TITLE
============================================================ */

.game-title-container {
    width: 100%;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 20px;
}

.game-title-container h1 {
    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(58px, 6vw, 82px);

    line-height: 1;

    font-weight: 400;

    letter-spacing: .08em;

    color: #fbf9ff;

    text-shadow:
        0 0 30px
        rgba(179,133,245,.16);
}

.title-line {
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(214,188,255,.4)
        );
}

.title-line:last-child {
    transform:
        rotate(180deg);
}

.game-subtitle {
    margin-top: 11px;

    font-size: 8px;

    letter-spacing: .48em;

    text-indent: .48em;

    color:
        rgba(232,222,245,.38);
}


/* ============================================================
   MAIN NAVIGATION
============================================================ */

.main-navigation {
    width: 100%;

    margin-top: 47px;

    display: flex;
    flex-direction: column;

    gap: 11px;
}


/* ============================================================
   MENU GLASS BUTTONS
============================================================ */

.menu-button {
    position: relative;

    width: 100%;
    height: 66px;

    display: grid;

    grid-template-columns:
        35px 1fr 35px;

    align-items: center;

    padding:
        0 18px;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.105);

    border-radius: 4px;

    color: var(--text);

    background:
        linear-gradient(
            115deg,
            rgba(255,255,255,.075),
            rgba(255,255,255,.025) 36%,
            rgba(150,95,215,.035) 72%,
            rgba(255,255,255,.018)
        );

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.085),
        inset 0 -1px 0 rgba(255,255,255,.02),
        0 13px 38px rgba(0,0,0,.25);

    cursor: pointer;

    transition:
        transform .22s ease,
        border-color .22s ease,
        background .22s ease,
        box-shadow .22s ease;
}


/* glass shine */

.menu-button::before {
    content: "";

    position: absolute;

    top: -120%;
    left: -45%;

    width: 28%;
    height: 350%;

    transform:
        rotate(25deg);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.10),
            transparent
        );

    transition:
        left .6s ease;
}


/* luminous bottom line */

.menu-button::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0;

    width: 0;
    height: 1px;

    transform:
        translateX(-50%);

    background:
        linear-gradient(
            90deg,
            transparent,
            #c7a4ff,
            transparent
        );

    box-shadow:
        0 0 10px
        rgba(190,145,255,.75);

    transition:
        width .28s ease;
}

.menu-button:hover {
    transform:
        translateY(-3px);

    border-color:
        rgba(213,184,255,.32);

    background:
        linear-gradient(
            115deg,
            rgba(255,255,255,.095),
            rgba(148,95,210,.065),
            rgba(255,255,255,.025)
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 17px 45px rgba(0,0,0,.34),
        0 0 28px rgba(143,90,210,.09);
}

.menu-button:hover::before {
    left: 125%;
}

.menu-button:hover::after {
    width: 72%;
}

.menu-button-primary {
    height: 70px;

    border-color:
        rgba(210,178,255,.22);

    background:
        linear-gradient(
            115deg,
            rgba(255,255,255,.09),
            rgba(151,95,220,.075),
            rgba(255,255,255,.02)
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.1),
        0 14px 42px rgba(0,0,0,.29),
        0 0 30px rgba(135,80,200,.065);
}

.menu-button-symbol {
    justify-self: center;

    color:
        rgba(215,190,255,.82);

    font-size: 8px;

    text-shadow:
        0 0 10px
        rgba(185,140,255,.45);
}

.menu-button-content {
    display: flex;
    flex-direction: column;

    align-items: flex-start;

    gap: 5px;

    text-align: left;
}

.menu-button-content strong {
    font-size: 11px;

    letter-spacing: .22em;
}

.menu-button-content small {
    font-size: 8px;

    letter-spacing: .1em;

    color:
        rgba(238,230,248,.42);
}

.locked-tag {
    justify-self: end;

    font-size: 6px;

    letter-spacing: .1em;

    color:
        rgba(240,230,250,.28);
}

.menu-button.locked {
    opacity: .36;

    cursor: default;
}

.menu-button.locked:hover {
    transform: none;

    border-color:
        rgba(255,255,255,.105);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.085),
        0 13px 38px rgba(0,0,0,.25);
}

.menu-button.locked:hover::before {
    left: -45%;
}

.menu-button.locked:hover::after {
    width: 0;
}


/* ============================================================
   MENU FOOTER
============================================================ */

.menu-footer {
    margin-top: 24px;

    font-size: 7px;

    letter-spacing: .34em;

    text-indent: .34em;

    color:
        rgba(235,225,245,.27);
}


/* ============================================================
   SECONDARY SCREENS
============================================================ */

#collection-screen,
#team-screen {
    flex-direction: column;

    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(105,60,150,.08),
            transparent 38%
        );
}


/* ============================================================
   SECONDARY HEADER
============================================================ */

.secondary-header {
    flex-shrink: 0;

    height: 78px;

    display: grid;

    grid-template-columns:
        120px 1fr 120px;

    align-items: center;

    padding:
        0 clamp(24px,5vw,80px);

    border-bottom:
        1px solid
        rgba(255,255,255,.075);

    background:
        linear-gradient(
            180deg,
            rgba(22,18,27,.55),
            rgba(8,7,11,.45)
        );

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);

    box-shadow:
        inset 0 -1px 0
        rgba(255,255,255,.025);
}

.secondary-header > div {
    text-align: center;
}

.section-eyebrow {
    display: block;

    margin-bottom: 3px;

    font-size: 7px;

    letter-spacing: .28em;

    color:
        rgba(210,185,245,.4);
}

.secondary-header h2 {
    font-family:
        Georgia,
        serif;

    font-size: 18px;

    font-weight: 400;

    letter-spacing: .16em;
}

.secondary-header > span:last-child {
    justify-self: end;

    font-size: 8px;

    letter-spacing: .13em;

    color:
        rgba(240,230,250,.42);
}

.back-button {
    justify-self: start;

    width: 38px;
    height: 38px;

    border:
        1px solid
        rgba(255,255,255,.09);

    border-radius: 3px;

    background:
        rgba(255,255,255,.025);

    color:
        rgba(245,240,250,.62);

    cursor: pointer;

    backdrop-filter:
        blur(12px);

    transition:
        transform .2s,
        border-color .2s,
        background .2s,
        color .2s;
}

.back-button:hover {
    transform:
        translateX(-3px);

    color: white;

    border-color:
        rgba(205,175,250,.27);

    background:
        rgba(140,90,200,.06);
}


/* ============================================================
   COLLECTION
============================================================ */

.collection-content {
    flex: 1;

    overflow-y: auto;

    padding:
        38px
        clamp(35px,6vw,100px)
        70px;

    scrollbar-width: thin;

    scrollbar-color:
        rgba(180,140,230,.3)
        transparent;
}

.collection-grid {
    width: min(1350px,100%);

    margin: 0 auto;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(190px,1fr)
        );

    gap:
        36px 28px;
}


/*
   game.js peut ajouter différentes classes.
   On stylise les enfants directs pour rester compatible.
*/

.collection-grid > * {
    position: relative;

    min-width: 0;

    padding:
        9px 9px 14px;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.095);

    border-radius: 5px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.012)
        ),
        rgba(15,12,20,.43);

    backdrop-filter:
        blur(17px);

    -webkit-backdrop-filter:
        blur(17px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 16px 45px rgba(0,0,0,.42);

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;

    cursor: pointer;
}

.collection-grid > *::before {
    content: "";

    position: absolute;

    top: -100%;
    left: -60%;

    width: 35%;
    height: 300%;

    transform:
        rotate(25deg);

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.065),
            transparent
        );

    transition:
        left .6s ease;
}

.collection-grid > *:hover {
    transform:
        translateY(-9px)
        scale(1.015);

    border-color:
        rgba(210,180,255,.24);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.09),
        0 22px 55px rgba(0,0,0,.54),
        0 0 28px rgba(140,90,205,.08);
}

.collection-grid > *:hover::before {
    left: 125%;
}

.collection-grid img {
    display: block;

    width: 100%;

    aspect-ratio: 2 / 3;

    object-fit: cover;

    border:
        1px solid
        rgba(255,255,255,.09);

    box-shadow:
        0 10px 30px
        rgba(0,0,0,.5);
}


/* ============================================================
   TEAM SELECTION
============================================================ */

.team-selection-layout {
    flex: 1;

    min-height: 0;

    display: grid;

    grid-template-columns:
        250px minmax(0,1fr);

    gap:
        clamp(25px,4vw,55px);

    padding:
        32px
        clamp(35px,5vw,80px)
        45px;
}


/* ============================================================
   TEAM PREVIEW — GLASS
============================================================ */

.team-preview {
    align-self: center;

    padding:
        25px 20px;

    border:
        1px solid
        rgba(255,255,255,.09);

    border-radius: 5px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.012)
        ),
        rgba(15,12,20,.43);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 18px 50px rgba(0,0,0,.4);
}

.team-preview-title {
    margin-bottom: 18px;

    text-align: center;

    font-size: 8px;

    letter-spacing: .2em;

    color:
        rgba(235,225,245,.48);
}

.team-slots {
    display: flex;

    justify-content: center;

    gap: 8px;
}

.team-slot {
    width: 57px;
    height: 78px;

    display: grid;
    place-items: center;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.11);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.035),
            rgba(255,255,255,.01)
        );

    color:
        rgba(255,255,255,.25);

    font-size: 9px;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,.04);
}

.team-slot img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.start-battle-button {
    width: 100%;
    height: 47px;

    margin-top: 22px;

    border:
        1px solid
        rgba(205,175,255,.28);

    border-radius: 3px;

    background:
        linear-gradient(
            115deg,
            rgba(255,255,255,.065),
            rgba(145,90,205,.07),
            rgba(255,255,255,.018)
        );

    color: white;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: .13em;

    cursor: pointer;

    backdrop-filter:
        blur(12px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 10px 28px rgba(0,0,0,.25);

    transition:
        transform .2s,
        border-color .2s,
        box-shadow .2s,
        opacity .2s;
}

.start-battle-button:not(:disabled):hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(215,185,255,.48);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.09),
        0 13px 34px rgba(0,0,0,.34),
        0 0 22px rgba(145,90,210,.1);
}

.start-battle-button:disabled {
    opacity: .25;

    cursor: default;
}


/* ============================================================
   TEAM GRID
============================================================ */

#team-card-grid {
    align-self: center;

    max-height:
        calc(100vh - 150px);

    overflow-y: auto;

    padding: 8px;
}


/* selected team card */

#team-card-grid > *.selected {
    transform:
        translateY(-8px);

    border-color:
        rgba(210,180,255,.55);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.1),
        0 20px 55px rgba(0,0,0,.55),
        0 0 30px rgba(155,105,225,.24);
}


/* ============================================================
   BATTLE SCREEN
============================================================ */

#battle-screen {
    height: 100vh;

    overflow: hidden;

    flex-direction: column;
}

#battle-screen.active {
    display: grid;

    grid-template-rows:
        58px
        minmax(0,1fr)
        100px;
}


/* ============================================================
   BATTLE TOPBAR
============================================================ */

.battle-topbar {
    position: relative;

    z-index: 30;

    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    padding:
        0 clamp(20px,3vw,50px);

    border-bottom:
        1px solid
        rgba(255,255,255,.08);

    background:
        linear-gradient(
            180deg,
            rgba(22,18,28,.64),
            rgba(7,6,10,.56)
        );

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);

    box-shadow:
        0 10px 35px rgba(0,0,0,.3),
        inset 0 -1px 0 rgba(255,255,255,.025);
}

.battle-top-left {
    display: flex;

    align-items: center;

    gap: 15px;
}

.battle-exit-button {
    width: 34px;
    height: 34px;

    border:
        1px solid
        rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.025);

    color:
        rgba(255,255,255,.55);

    cursor: pointer;

    backdrop-filter:
        blur(10px);
}

.battle-exit-button:hover {
    color: white;

    border-color:
        rgba(210,180,255,.25);
}

.round-display {
    display: flex;

    flex-direction: column;
}

.round-display span {
    font-size: 6px;

    letter-spacing: .18em;

    color:
        rgba(255,255,255,.35);
}

.round-display strong {
    margin-top: 1px;

    font-family:
        Georgia,
        serif;

    font-size: 15px;
}

.battle-turn {
    display: flex;

    align-items: center;

    gap: 15px;
}

.turn-decoration {
    width: 55px;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(200,170,250,.35)
        );
}

.turn-decoration:last-child {
    transform:
        rotate(180deg);
}

#turn-indicator {
    font-family:
        Georgia,
        serif;

    font-size: 12px;

    font-weight: 400;

    letter-spacing: .15em;
}

.energy-display {
    justify-self: end;

    display: flex;

    align-items: center;

    gap: 9px;

    padding:
        6px 11px;

    border:
        1px solid
        rgba(255,255,255,.075);

    background:
        rgba(255,255,255,.025);

    backdrop-filter:
        blur(12px);
}

.energy-symbol {
    color: var(--accent);

    font-size: 9px;

    text-shadow:
        0 0 10px
        rgba(185,140,255,.65);
}

.energy-display div {
    display: flex;

    flex-direction: column;
}

.energy-display small {
    font-size: 6px;

    letter-spacing: .15em;

    color:
        rgba(255,255,255,.35);
}

.energy-display strong {
    margin-top: 1px;

    font-size: 10px;
}


/* ============================================================
   BATTLE ARENA
============================================================ */

.battle-arena {
    position: relative;

    min-height: 0;

    overflow: hidden;

    display: grid;

    grid-template-rows:
        20px
        minmax(0,1fr)
        38px
        minmax(0,1fr);

    background:
        radial-gradient(
            ellipse at center,
            rgba(105,65,150,.08),
            transparent 52%
        );
}

.battle-arena::before {
    content: "";

    position: absolute;

    left: 50%;
    top: 50%;

    width: min(1050px,75vw);
    height: 1px;

    transform:
        translate(-50%,-50%);

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(200,170,250,.16),
            transparent
        );

    pointer-events: none;
}


/* ============================================================
   ENEMY ENERGY
============================================================ */

.enemy-energy-display {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    font-size: 6px;

    letter-spacing: .13em;

    color:
        rgba(255,255,255,.3);
}

.enemy-energy-display strong {
    color:
        rgba(220,200,250,.55);

    font-size: 7px;
}


/* ============================================================
   BATTLE TEAMS
============================================================ */

.battle-team {
    min-height: 0;

    width: 100%;

    display: flex;

    align-items: center;

    /*
       IMPORTANT :
       cartes fortement espacées.
    */

    justify-content: space-between;

    gap:
        clamp(50px,7vw,135px);

    padding-left:
        clamp(100px,10vw,200px);

    padding-right:
        clamp(100px,10vw,200px);
}

.enemy-team {
    align-items: flex-start;

    padding-top: 3px;
}

.player-team {
    align-items: flex-end;

    padding-bottom: 3px;
}


/* ============================================================
   BATTLE CARD
============================================================ */

.battle-card {
    position: relative;

    /*
       PLUS GRANDES.
    */

    width:
        clamp(175px,12vw,205px);

    flex: 0 0 auto;

    padding: 5px;

    border:
        1px solid
        rgba(255,255,255,.075);

    border-radius: 4px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.008)
        ),
        rgba(15,12,19,.32);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.045),
        0 13px 40px rgba(0,0,0,.45);

    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease,
        filter .22s ease,
        opacity .22s ease;

    user-select: none;
}

.battle-card-image-wrapper {
    position: relative;

    width: 100%;

    aspect-ratio: 2 / 3;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.1);

    background: #050506;

    box-shadow:
        0 9px 28px
        rgba(0,0,0,.5);
}

.battle-card img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    pointer-events: none;
}

.battle-card.dead {
    opacity: .2;

    filter:
        grayscale(1)
        brightness(.42);

    pointer-events: none;
}


/* ============================================================
   DYNAMIC STATS
============================================================ */

.dynamic-stat {
    position: absolute;

    z-index: 6;

    top: 1.7%;

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 40% 30%,
            #211c29,
            #050506 72%
        );

    border:
        1px solid
        rgba(255, 255, 255, 0.65);

    box-shadow:
        inset 0 1px 2px rgba(255,255,255,.12),
        0 4px 12px rgba(0,0,0,.85);

    color: white;

    font-size: 10px;
    font-weight: 900;

    text-shadow:
        0 2px 4px black;

    pointer-events: none;
}

.dynamic-atk {
    left: 2%;
}

.dynamic-hp {
    right: 2%;
}


/* ============================================================
   EFFECT CHIPS
============================================================ */

.active-effects {
    min-height: 16px;

    margin-top: 3px;

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 3px;
}

.effect-chip {
    display: inline-flex;

    align-items: center;

    min-height: 15px;

    padding:
        1px 5px;

    border:
        1px solid currentColor;

    border-radius: 2px;

    background:
        rgba(8,7,11,.72);

    font-size: 6px;
    font-weight: 700;

    letter-spacing: .04em;

    cursor: help;

    backdrop-filter:
        blur(8px);

    box-shadow:
        0 3px 9px
        rgba(0,0,0,.35);
}

.team-effect-chip {
    border-style: dashed;
}


/* ============================================================
   SELECTED FIGHTER
============================================================ */

.selectable-fighter {
    cursor: pointer;
}

.selectable-fighter:hover {
    transform:
        translateY(-9px)
        scale(1.025);

    border-color:
        rgba(205,175,255,.27);

    box-shadow:
        0 18px 48px rgba(0,0,0,.55),
        0 0 25px rgba(145,95,215,.12);
}

.battle-card.selected {
    transform:
        translateY(-12px)
        scale(1.035);

    border-color:
        rgba(205,175,255,.5);

    box-shadow:
        0 20px 52px rgba(0,0,0,.6),
        0 0 32px rgba(155,105,225,.28);
}

.battle-card.selected
.battle-card-image-wrapper {
    border-color:
        #c5a6ff;

    box-shadow:
        0 0 25px
        rgba(165,115,235,.32);
}




/* ============================================================
   CENTER MESSAGE
============================================================ */

.battle-center {
    position: relative;

    z-index: 10;

    display: flex;

    align-items: center;
    justify-content: center;
}

.battle-message {
    text-align: center;

    pointer-events: none;

    font-family:
        Georgia,
        serif;

    font-size:
        clamp(11px,1.1vw,16px);

    letter-spacing: .1em;

    color:
        rgba(250,247,255,.92);

    text-shadow:
        0 2px 10px black,
        0 0 18px rgba(160,115,225,.25);
}


/* ============================================================
   ACTION PANEL
============================================================ */

.action-panel {
    position: relative;

    z-index: 30;

    min-height: 0;

    display: grid;

    grid-template-columns:
        minmax(180px,.8fr)
        minmax(0,3fr);

    align-items: center;

    gap: 20px;

    padding:
        9px
        clamp(20px,4vw,70px);

    border-top:
        1px solid
        rgba(255,255,255,.085);

    background:
        linear-gradient(
            180deg,
            rgba(22,18,27,.62),
            rgba(7,6,9,.78)
        );

    backdrop-filter:
        blur(22px);

    -webkit-backdrop-filter:
        blur(22px);

    box-shadow:
        0 -15px 40px rgba(0,0,0,.35),
        inset 0 1px 0 rgba(255,255,255,.035);
}

.action-character {
    display: flex;

    flex-direction: column;

    gap: 4px;
}

.action-label {
    font-size: 6px;

    letter-spacing: .2em;

    color:
        rgba(255,255,255,.32);
}

#selected-character {
    font-family:
        Georgia,
        serif;

    font-size: 13px;

    letter-spacing: .08em;

    color:
        rgba(248,243,255,.86);
}

.ability-buttons {
    display: grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap: 10px;
}


/* ============================================================
   ABILITY BUTTONS
============================================================ */

.ability-button {
    position: relative;

    min-height: 61px;

    display: flex;
    flex-direction: column;

    align-items: flex-start;
    justify-content: center;

    padding:
        8px 13px;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.095);

    border-radius: 3px;

    background:
        linear-gradient(
            125deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.012)
        );

    color: white;

    cursor: pointer;

    backdrop-filter:
        blur(12px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.055),
        0 7px 20px rgba(0,0,0,.18);

    transition:
        transform .18s,
        border-color .18s,
        background .18s,
        box-shadow .18s;
}

.ability-button::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 0;

    width: 0;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #c5a3ff,
            transparent
        );

    transition:
        width .22s;
}

.ability-button:hover:not(:disabled) {
    transform:
        translateY(-2px);

    border-color:
        rgba(205,175,255,.32);

    background:
        rgba(135,90,195,.075);

    box-shadow:
        0 10px 25px rgba(0,0,0,.3);
}

.ability-button:hover:not(:disabled)::after {
    width: 100%;
}

.ability-button.selected-ability {
    border-color:
        rgba(215,185,255,.62);

    background:
        linear-gradient(
            125deg,
            rgba(175,125,235,.17),
            rgba(95,55,145,.1)
        );

    box-shadow:
        0 0 22px
        rgba(145,95,215,.15);
}

.ability-button.selected-ability::after {
    width: 100%;
}

.ability-button:disabled {
    opacity: .24;

    cursor: default;
}

.ability-name {
    font-family:
        Georgia,
        serif;

    font-size: 10px;

    letter-spacing: .07em;
}

.ability-cost {
    margin-top: 5px;

    font-size: 7px;

    letter-spacing: .1em;

    color:
        rgba(220,205,240,.5);
}


/* ============================================================
   TOOLTIP
============================================================ */

#effect-tooltip {
    position: fixed;

    z-index: 1000;

    width: 270px;

    padding: 14px;

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(5px);

    border:
        1px solid
        rgba(255,255,255,.13);

    border-radius: 4px;

    background:
        linear-gradient(
            145deg,
            rgba(35,28,43,.82),
            rgba(8,7,11,.9)
        );

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 18px 50px rgba(0,0,0,.72);

    backdrop-filter:
        blur(22px);

    transition:
        opacity .12s,
        transform .12s,
        visibility .12s;
}

#effect-tooltip.visible {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}

#tooltip-name {
    font-family:
        Georgia,
        serif;

    font-size: 13px;
}

#tooltip-type {
    display: block;

    margin-top: 4px;

    font-size: 7px;

    letter-spacing: .16em;

    color:
        rgba(255,255,255,.38);
}

#tooltip-description {
    margin-top: 8px;

    font-size: 9px;

    line-height: 1.5;

    color:
        rgba(245,240,250,.7);
}


/* ============================================================
   CARD MODAL
============================================================ */

#card-modal {
    position: fixed;

    inset: 0;

    z-index: 2000;

    display: flex;

    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity .2s,
        visibility .2s;
}

#card-modal.open {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}

.modal-background {
    position: absolute;

    inset: 0;

    background:
        rgba(0,0,0,.79);

    backdrop-filter:
        blur(16px);
}

.modal-content {
    position: relative;

    z-index: 2;

    max-height: 92vh;

    padding: 9px;

    border:
        1px solid
        rgba(255,255,255,.11);

    border-radius: 5px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.012)
        ),
        rgba(15,12,20,.46);

    backdrop-filter:
        blur(18px);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 30px 90px rgba(0,0,0,.8);
}

#modal-card-image {
    display: block;

    max-height: 85vh;
    max-width: 88vw;

    object-fit: contain;
}

#close-modal {
    position: absolute;

    top: -38px;
    right: -38px;

    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    border:
        1px solid
        rgba(255,255,255,.16);

    border-radius: 50%;

    background:
        rgba(20,16,25,.58);

    color: white;

    cursor: pointer;

    backdrop-filter:
        blur(14px);
}


/* ============================================================
   DESKTOP 1920 × 1080
============================================================ */

@media (min-width: 1500px) {

    /*
       Le menu reste compact :
       on ne l'étire PAS avec la résolution.
    */

    .main-menu-content {
        width: 430px;
    }


    /*
       En revanche le combat exploite
       vraiment la largeur.
    */

    .battle-team {
        padding-left:
            clamp(135px,10vw,200px);

        padding-right:
            clamp(135px,10vw,200px);

        gap:
            clamp(70px,7vw,140px);
    }

    .battle-card {
        width: 200px;
    }
}


/* ============================================================
   1080P SAFE MODE
============================================================ */

@media (max-height: 900px) {

    .main-menu-content {
        transform:
            translateY(-5px);
    }

    .game-emblem {
        width: 58px;
        height: 58px;

        margin-bottom: 18px;
    }

    .game-emblem::before {
        inset: 11px;
    }

    .game-emblem::after {
        inset: 22px;
    }

    .game-title-container h1 {
        font-size: 54px;
    }

    .main-navigation {
        margin-top: 32px;

        gap: 8px;
    }

    .menu-button {
        height: 57px;
    }

    .menu-button-primary {
        height: 60px;
    }

    .menu-footer {
        margin-top: 16px;
    }


    /* BATTLE */

    #battle-screen.active {
        grid-template-rows:
            48px
            minmax(0,1fr)
            82px;
    }

    .battle-arena {
        grid-template-rows:
            15px
            minmax(0,1fr)
            27px
            minmax(0,1fr);
    }

    .battle-card {
        width:
            clamp(155px,11vw,180px);
    }

    .battle-team {
        padding-left:
            clamp(75px,9vw,170px);

        padding-right:
            clamp(75px,9vw,170px);

        gap:
            clamp(50px,6vw,115px);
    }

    .dynamic-stat {
        width: 34px;
        height: 34px;

        font-size: 9px;
    }

    .active-effects {
        min-height: 13px;

        margin-top: 2px;
    }

    .effect-chip {
        min-height: 13px;

        padding:
            1px 4px;

        font-size: 6px;
    }

    .action-panel {
        padding:
            5px
            clamp(20px,4vw,60px);

        gap: 14px;
    }

    .ability-button {
        min-height: 50px;

        padding:
            5px 10px;
    }

    .ability-cost {
        margin-top: 3px;
    }
}


/* ============================================================
   MEDIUM DESKTOP
============================================================ */

@media (max-width: 1250px) {

    .battle-team {
        padding-left: 35px;
        padding-right: 35px;

        gap: 30px;
    }

    .battle-card {
        width:
            clamp(140px,14vw,175px);
    }

    .team-selection-layout {
        grid-template-columns:
            210px minmax(0,1fr);

        padding-left: 25px;
        padding-right: 25px;
    }
}


/* ============================================================
   MOBILE / TABLET
============================================================ */

@media (max-width: 760px) {

    body {
        overflow: auto;
    }

    .screen {
        min-height: 100vh;
        height: auto;
    }

    .main-menu-content {
        width:
            min(350px,88vw);
    }

    .menu-decoration {
        display: none;
    }

    .game-title-container {
        gap: 12px;
    }

    .game-title-container h1 {
        font-size: 48px;
    }

    .main-navigation {
        margin-top: 35px;
    }

    .secondary-header {
        height: 62px;

        grid-template-columns:
            70px 1fr 70px;

        padding:
            0 12px;
    }

    .secondary-header h2 {
        font-size: 13px;
    }

    .collection-content {
        padding:
            24px 14px
            50px;
    }

    .collection-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));

        gap:
            22px 12px;
    }

    .collection-grid > * {
        padding:
            6px 6px 10px;
    }

    .team-selection-layout {
        display: flex;

        flex-direction: column;

        padding:
            20px 12px 40px;
    }

    .team-preview {
        width: 100%;
    }

    #team-card-grid {
        width: 100%;

        max-height: none;
    }

    #battle-screen.active {
        height: auto;

        min-height: 100vh;

        grid-template-rows:
            48px
            minmax(600px,auto)
            auto;
    }

    .battle-topbar {
        padding:
            0 8px;
    }

    .turn-decoration {
        display: none;
    }

    #turn-indicator {
        font-size: 8px;
    }

    .energy-display {
        padding:
            4px 5px;
    }

    .battle-arena {
        min-height: 600px;

        grid-template-rows:
            18px
            1fr
            36px
            1fr;
    }

    .battle-team {
        justify-content:
            space-evenly;

        gap: 7px;

        padding:
            4px 8px;
    }

    .battle-card {
        width:
            clamp(100px,29vw,140px);

        padding: 3px;
    }

    .dynamic-stat {
        width: 27px;
        height: 27px;

        font-size: 7px;
    }

    .action-panel {
        grid-template-columns: 1fr;

        gap: 7px;

        padding: 9px;
    }

    .action-character {
        text-align: center;
    }

    .ability-buttons {
        grid-template-columns: 1fr;
    }

    .ability-button {
        min-height: 46px;
    }

    #effect-tooltip {
        width:
            min(260px,calc(100vw - 20px));
    }
}


/* ============================================================
   VERY SMALL MOBILE
============================================================ */

@media (max-width: 480px) {

    .game-emblem {
        width: 52px;
        height: 52px;
    }

    .game-title-container h1 {
        font-size: 42px;
    }

    .game-subtitle {
        font-size: 7px;
    }

    .menu-button {
        height: 57px;
    }

    .battle-card {
        width:
            clamp(85px,29vw,120px);
    }

    .battle-team {
        gap: 3px;

        padding-left: 3px;
        padding-right: 3px;
    }

    .dynamic-stat {
        width: 23px;
        height: 23px;

        font-size: 6px;
    }

    .effect-chip {
        font-size: 5px;

        padding:
            1px 3px;
    }
}
/* ============================================================
   V0.7 — BATTLE LAYOUT / LARGE CARDS + CONTEXTUAL SPELL PANEL
   Menu, collection and team-selection above are intentionally unchanged.
============================================================ */

#battle-screen.active {
    display: grid;
    grid-template-rows: 58px minmax(0, 1fr);
}

.battle-arena {
    min-height: 0;
    grid-template-rows: 22px minmax(0, 1fr) 42px minmax(0, 1fr);
    overflow: hidden;
}

.battle-team {
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(90px, 8vw, 170px);
    padding-left: clamp(55px, 5.2vw, 105px);
    padding-right: clamp(55px, 5.2vw, 105px);
}

.enemy-team {
    align-items: flex-start;
    padding-top: 8px;
}

.player-team {
    align-items: flex-end;
    padding-bottom: 8px;
}

.battle-card {
    width: clamp(220px, 13.5vw, 270px);
    padding: 5px;
    flex: 0 0 auto;
}

.dynamic-stat {
    width: clamp(38px, 2.45vw, 47px);
    height: clamp(38px, 2.45vw, 47px);
    font-size: clamp(10px, .7vw, 13px);
}

.active-effects {
    min-height: 18px;
    margin-top: 4px;
    gap: 4px;
}

.effect-chip {
    min-height: 16px;
    padding: 2px 6px;
    font-size: 6px;
}

/* The old bottom footer becomes a floating contextual glass panel. */
.action-panel {
    position: fixed;
    z-index: 150;
    display: none;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 12px;
    min-height: 0;
    padding: 16px;
    border: 1px solid rgba(215, 185, 255, .22);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025) 45%, rgba(130,80,190,.07)),
        rgba(10, 8, 14, .74);
    backdrop-filter: blur(24px) saturate(125%);
    -webkit-backdrop-filter: blur(24px) saturate(125%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        0 24px 65px rgba(0,0,0,.62),
        0 0 35px rgba(145,95,215,.10);
    transform: translateY(4px) scale(.985);
    opacity: 0;
    pointer-events: none;
}

.action-panel.open {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    animation: abilityPanelIn .16s ease-out;
}

@keyframes abilityPanelIn {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.action-panel.open-right::before,
.action-panel.open-left::before {
    content: "";
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: rgba(15, 12, 20, .86);
    border: solid rgba(215,185,255,.20);
    transform: translateY(-50%) rotate(45deg);
}

.action-panel.open-right::before {
    left: -7px;
    border-width: 0 0 1px 1px;
}

.action-panel.open-left::before {
    right: -7px;
    border-width: 1px 1px 0 0;
}

.action-character {
    padding: 2px 3px 11px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.action-label {
    font-size: 6px;
    letter-spacing: .22em;
}

#selected-character {
    margin-top: 4px;
    font-size: 15px;
}

.ability-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.ability-button {
    min-height: 64px;
    padding: 10px 13px;
    border-radius: 5px;
}

.ability-name {
    font-size: 11px;
    line-height: 1.2;
}

.ability-cost {
    margin-top: 6px;
    font-size: 7px;
}

/* 1920x1080: prioritize card readability. */
@media (min-width: 1500px) and (min-height: 950px) {
    .battle-card { width: clamp(245px, 13.8vw, 270px); }
    .battle-team {
        padding-left: clamp(70px, 5vw, 100px);
        padding-right: clamp(70px, 5vw, 100px);
        gap: clamp(110px, 8vw, 180px);
    }
}

/* Short desktop screens still keep the full battle in one viewport. */
@media (max-height: 949px) and (min-width: 761px) {
    #battle-screen.active { grid-template-rows: 48px minmax(0,1fr); }
    .battle-arena { grid-template-rows: 17px minmax(0,1fr) 30px minmax(0,1fr); }
    .battle-card { width: clamp(185px, 11.7vw, 225px); }
    .battle-team {
        padding-left: clamp(45px, 5vw, 90px);
        padding-right: clamp(45px, 5vw, 90px);
        gap: clamp(60px, 6vw, 120px);
    }
    .dynamic-stat { width: 36px; height: 36px; font-size: 9px; }
}

@media (max-width: 1250px) and (min-width: 761px) {
    .battle-card { width: clamp(175px, 16vw, 215px); }
    .battle-team {
        padding-left: 28px;
        padding-right: 28px;
        gap: 34px;
    }
}

/* Mobile/tablet: contextual panel stays readable and never leaves the viewport. */
@media (max-width: 760px) {
    #battle-screen.active {
        min-height: 100vh;
        height: 100vh;
        grid-template-rows: 52px minmax(0,1fr);
        overflow: hidden;
    }

    .battle-arena {
        grid-template-rows: 18px minmax(0,1fr) 30px minmax(0,1fr);
    }

    .battle-team {
        padding-left: 10px;
        padding-right: 10px;
        gap: 8px;
    }

    .battle-card {
        width: min(30vw, 150px);
        padding: 3px;
    }

    .action-panel,
    .action-panel.open {
        position: fixed;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        bottom: 12px;
        width: min(92vw, 390px) !important;
        transform: translateX(-50%);
    }

    .action-panel.open-right::before,
    .action-panel.open-left::before {
        display: none;
    }
}


/* ============================================================
   V0.9.1 — ALT CARD INSPECTION + ANCHORED TOOLTIPS
============================================================ */

.battle-card {
    overflow: visible;
    isolation: isolate;
}

/* Aucun zoom au simple survol. */
.battle-card:hover .battle-card-image-wrapper {
    transform: none !important;
    filter: none !important;
}

.hq-card-inspection {
    position: fixed;
    width: clamp(410px, 28vw, 500px);
    aspect-ratio: 2 / 3;
    z-index: 1500;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: scale(.985);
    transform-origin: center center;

    transition:
        opacity .12s ease,
        transform .14s ease,
        visibility .12s;

    filter:
        drop-shadow(
            0 24px 50px
            rgba(0,0,0,.75)
        );
}

.hq-card-inspection.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

.hq-card-inspection-image {
    position: absolute;
    inset: 0;

    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    user-select: none;
    pointer-events: none;

    image-rendering: auto;
}

.hq-card-effect-layer {
    position: absolute;
    inset: 0;

    z-index: 3;

    pointer-events: none;
}

.hq-card-effect-zone {
    position: absolute;

    display: block;

    pointer-events: auto;
    cursor: help;

    border-radius: 3px;

    background: transparent;
}

/*
    Pas de surbrillance visible en jeu normal :
    la zone doit rester invisible.
*/
.hq-card-effect-zone:hover {
    background: transparent;
}

/*
    F8 = mode calibration.
    Très utile pour voir exactement où sont les zones invisibles.
*/
.hq-card-inspection.debug-hitboxes
.hq-card-effect-zone {
    background:
        rgba(255, 65, 120, .22);

    outline:
        1px solid
        rgba(255, 105, 150, .95);
}

.hq-card-inspection.debug-hitboxes
.hq-card-effect-zone:hover {
    background:
        rgba(255, 65, 120, .42);
}

/* Le tooltip passe toujours devant la carte HD. */
#effect-tooltip {
    z-index: 3000 !important;
}

/*
    Le tooltip V0.9.1 reçoit left/top directement depuis JS.
    On neutralise tout décalage visuel supplémentaire.
*/
#effect-tooltip.visible {
    transform: none;
}

#battle-screen {
    overflow: hidden;
}

.battle-arena {
    overflow: hidden;
}

.battle-topbar {
    z-index: 200;
}

/*
    Petit retour visuel uniquement sur desktop :
    ALT est actif, mais la carte ne grossit pas tant qu'on ne la survole pas.
*/
@media (hover: hover) and (pointer: fine) {
    body.card-inspection-key-held
    #battle-screen .battle-card:not(.dead) {
        cursor: zoom-in;
    }
}

/* Pas d'inspection ALT sur écran tactile pour l'instant. */
@media (hover: none), (pointer: coarse) {
    .hq-card-inspection {
        display: none !important;
    }
}


/* ============================================================
   V0.9.2 — DYNAMIC BATTLE + INSPECTION STATS
============================================================ */

/*
   Les cercles ATK/PV font déjà partie du PNG.
   On affiche donc uniquement le nombre par-dessus.
*/
.battle-card-image-wrapper .dynamic-stat {
    position: absolute !important;
    top: 2.15% !important;

    width: 16.5% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;

    display: flex !important;
    align-items: center;
    justify-content: center;

    padding: 0 !important;
    margin: 0 !important;

    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    font-size: clamp(14px, 1.05vw, 20px) !important;
    font-weight: 900;
    line-height: 1 !important;
    text-align: center;

    z-index: 6;
    transform: none !important;
}

.battle-card-image-wrapper .dynamic-atk {
    left: 1.9% !important;
    right: auto !important;
}

.battle-card-image-wrapper .dynamic-hp {
    right: 1.9% !important;
    left: auto !important;
}


/* Stats sur la grande carte ouverte avec ALT. */
.hq-inspection-stat {
    position: absolute;
    top: 2.15%;

    width: 16.5%;
    height: auto;
    aspect-ratio: 1 / 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: none;
    background: transparent;

    color: #fff;

    font-size: clamp(28px, 2.1vw, 38px);
    font-weight: 900;
    line-height: 1;
    text-align: center;

    text-shadow:
        0 2px 3px rgba(0,0,0,.95),
        0 0 5px rgba(0,0,0,.8);

    z-index: 4;
    pointer-events: none;
}

.hq-inspection-atk {
    left: 1.9%;
}

.hq-inspection-hp {
    right: 1.9%;
}


/* ============================================================
   V0.9.3 — ALT ONLY + STAT POSITION FIX
============================================================ */

/*
   Sans ALT : aucune carte ne grossit au simple survol.
   On garde les autres retours visuels (bordure/ombre).
*/
#battle-screen .selectable-fighter:hover,
#battle-screen .targetable:hover,
#battle-screen .battle-card:hover {
    transform: none !important;
}

/*
   Position par CENTRE des cercles imprimés.
   Les coordonnées sont communes aux petites cartes et au zoom.
*/
#battle-screen .battle-card-image-wrapper .dynamic-stat {
    top: 8.6% !important;
    width: 17% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%) !important;
}

#battle-screen .battle-card-image-wrapper .dynamic-atk {
    left: 13.5% !important;
    right: auto !important;
}

#battle-screen .battle-card-image-wrapper .dynamic-hp {
    left: 86.5% !important;
    right: auto !important;
}

.hq-inspection-stat {
    top: 8.6% !important;
    width: 17% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%) !important;
}

.hq-inspection-atk {
    left: 13.5% !important;
    right: auto !important;
}

.hq-inspection-hp {
    left: 86.5% !important;
    right: auto !important;
}


/* ============================================================
   V0.9.4 — STAT CIRCLES
   Cercle noir pour masquer les stats imprimées dans le PNG.
============================================================ */

#battle-screen .battle-card-image-wrapper .dynamic-stat,
.hq-inspection-stat {
    background:
        radial-gradient(
            circle,
            #09090d 0%,
            #030305 72%,
            #000000 100%
        ) !important;

    border:
        2px solid
        rgba(255, 255, 255, .78) !important;

    border-radius: 50% !important;

    box-shadow:
        inset 0 0 8px rgba(255,255,255,.08),
        0 2px 6px rgba(0,0,0,.85) !important;

    color: #ffffff !important;
    font-weight: 900 !important;

    text-shadow:
        0 2px 3px #000000,
        0 0 4px #000000 !important;

    overflow: hidden;
}


/* ============================================================
   V0.9.5 — FINAL STAT POSITION / VISIBILITY FIX
   - Cercles davantage vers l'intérieur
   - Les nombres à 4 chiffres restent entièrement visibles
============================================================ */

#battle-screen .battle-card-image-wrapper .dynamic-stat {
    top: 8.6% !important;
    width: 19% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;
    padding: 2px !important;

    transform: translate(-50%, -50%) !important;

    background: #030305 !important;
    border: 2px solid rgba(0, 0, 0, 0.82) !important;
    border-radius: 50% !important;

    color: #fff !important;
    font-size: clamp(9px, .68vw, 13px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.04em !important;
    white-space: nowrap !important;

    /* Le texte ne sera plus coupé dans le cercle. */
    overflow: visible !important;

    text-align: center !important;
    text-shadow: 0 2px 3px #000, 0 0 4px #000 !important;

    box-shadow:
        inset 0 0 8px rgba(255,255,255,.08),
        0 2px 6px rgba(0,0,0,.85) !important;

    z-index: 10 !important;
}

/* Environ 50 px plus vers l'intérieur sur une carte agrandie,
   tout en restant proportionnel sur les petites cartes. */
#battle-screen .battle-card-image-wrapper .dynamic-atk {
    left: 20% !important;
    right: auto !important;
}

#battle-screen .battle-card-image-wrapper .dynamic-hp {
    left: 80% !important;
    right: auto !important;
}


/* ---------- ZOOM SHIFT ---------- */

.hq-inspection-stat {
    top: 8.6% !important;
    width: 19% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;
    padding: 3px !important;

    transform: translate(-50%, -50%) !important;

    background: #030305 !important;
    border: 2px solid rgba(0, 0, 0, 0.82) !important;
    border-radius: 50% !important;

    color: #fff !important;
    font-size: clamp(13px, .95vw, 17px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.04em !important;
    white-space: nowrap !important;
    overflow: visible !important;

    text-align: center !important;
    text-shadow: 0 2px 3px #000, 0 0 5px #000 !important;

    box-shadow:
        inset 0 0 10px rgba(255,255,255,.08),
        0 3px 8px rgba(0,0,0,.9) !important;

    z-index: 10 !important;
}

.hq-inspection-atk {
    left: 20% !important;
    right: auto !important;
}

.hq-inspection-hp {
    left: 80% !important;
    right: auto !important;
}


/* ============================================================
   V0.9.6 — STATS PROPORTIONNELLES AU ZOOM
   Le texte suit maintenant automatiquement la taille de la carte.
============================================================ */

/*
   La carte d'inspection devient le conteneur de référence.
   Les unités cqw ci-dessous sont donc calculées à partir
   de la largeur réelle de la carte zoomée.
*/
.hq-card-inspection {
    container-type: inline-size;
}

/*
   Le cercle garde sa taille proportionnelle (19% de la carte)
   ET le nombre grandit maintenant avec la carte.
*/
.hq-inspection-stat {
    font-size: 6.2cqw !important;
}

/*
   Sécurité pour les navigateurs ne prenant pas en charge cqw.
*/
@supports not (font-size: 1cqw) {
    .hq-inspection-stat {
        font-size: 28px !important;
    }
}

/* ============================================================
   VISUAL OPTIMIZATION — COLLECTION / BATTLE / EFFECTS
============================================================ */

/* Collection tools */
.collection-tools {
    width: min(1180px, 100%);
    margin: 0 auto 28px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 260px);
    gap: 16px;
    align-items: end;
}

.collection-search-wrap,
.collection-rarity-wrap {
    display: grid;
    gap: 7px;
    color: rgba(255,255,255,.48);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .18em;
}

.collection-tools input,
.collection-tools select {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(210,180,255,.18);
    border-radius: 5px;
    outline: none;
    color: rgba(255,255,255,.9);
    background: rgba(15,12,20,.68);
    backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 28px rgba(0,0,0,.25);
}

.collection-tools input:focus,
.collection-tools select:focus {
    border-color: rgba(210,180,255,.5);
    box-shadow: 0 0 0 2px rgba(150,100,215,.10), 0 10px 28px rgba(0,0,0,.3);
}

.collection-tools select option { background: #100d15; }

/* Exactly three larger cards per row in Collection only. */
#collection-grid.collection-grid {
    width: min(1180px, 100%);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px 34px;
}

/* Keep the battle formations compact and centered. */
#battle-screen .battle-team {
    width: min(1040px, 100%);
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    gap: clamp(28px, 3vw, 58px);
    padding-left: 18px;
    padding-right: 18px;
}

/* Effect identity: chips and tooltip only. */
.effect-chip {
    color: #fff !important;
    border-color: var(--effect-color, currentColor);
    background:
        linear-gradient(rgba(8,7,11,.78), rgba(8,7,11,.78)) padding-box,
        var(--effect-visual, var(--effect-color, #aaa)) border-box;
    border: 1px solid transparent;
    box-shadow:
        0 3px 9px rgba(0,0,0,.35),
        0 0 10px color-mix(in srgb, var(--effect-color, #aaa) 25%, transparent);
}

.effect-chip::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    margin-right: 4px;
    border-radius: 50%;
    background: var(--effect-visual, var(--effect-color, #aaa));
    box-shadow: 0 0 7px var(--effect-color, #aaa);
}

#effect-tooltip {
    border-color: var(--effect-color, rgba(255,255,255,.13));
    background:
        linear-gradient(145deg, rgba(22,18,28,.91), rgba(8,7,11,.95)) padding-box,
        var(--effect-visual, var(--effect-color, #aaa)) border-box;
    border: 1px solid transparent;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 18px 50px rgba(0,0,0,.72),
        0 0 24px color-mix(in srgb, var(--effect-color, #aaa) 18%, transparent);
}

#tooltip-name {
    background: var(--effect-visual, var(--effect-color, #fff));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
}

@media (max-width: 760px) {
    .collection-tools { grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px; }
    #collection-grid.collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
    #battle-screen .battle-team { width: 100%; gap: 8px; padding-left: 10px; padding-right: 10px; }
}


/* ============================================================
   V1.1 — CENTERED CONTINUOUS SIDE ENERGY BARS
============================================================ */
.battle-topbar-spacer {
    min-width: 1px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.side-energy-gauge {
    --energy-level: 30%;
    position: fixed;
    top: 50%;
    z-index: 180;
    width: 70px;
    height: clamp(360px, 58vh, 590px);
    transform: translateY(-50%);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    justify-items: center;
    gap: 10px;
    padding: 14px 10px 12px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(18,14,24,.91), rgba(7,6,10,.94));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 45px rgba(0,0,0,.46);
    pointer-events: none;
}

.player-energy-gauge {
    left: clamp(12px, 1.35vw, 26px);
    border-color: rgba(187,145,255,.34);
}
.enemy-energy-gauge {
    right: clamp(12px, 1.35vw, 26px);
    border-color: rgba(255,125,155,.30);
}

.side-energy-label,
.side-energy-gauge small {
    font-size: 7px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .15em;
    color: rgba(255,255,255,.52);
}
.side-energy-gauge strong {
    font-size: 12px;
    line-height: 1;
    letter-spacing: .03em;
    color: rgba(255,255,255,.96);
    text-shadow: 0 0 12px rgba(255,255,255,.18);
}

/* One continuous track. Its fill rises from the bottom. */
.energy-segments {
    position: relative;
    width: 24px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    background: rgba(255,255,255,.035);
    box-shadow: inset 0 0 12px rgba(0,0,0,.62);
}
.energy-segments span { display: none !important; }
.energy-segments::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--energy-level);
    border-radius: inherit;
    transition: height .28s ease;
}
.player-energy-gauge .energy-segments::after {
    background: linear-gradient(0deg, rgba(108,64,180,.98), rgba(207,170,255,.98));
    box-shadow: 0 0 18px rgba(174,115,255,.58), inset 0 0 8px rgba(255,255,255,.22);
}
.enemy-energy-gauge .energy-segments::after {
    background: linear-gradient(0deg, rgba(142,48,78,.98), rgba(255,128,160,.98));
    box-shadow: 0 0 18px rgba(255,90,135,.48), inset 0 0 8px rgba(255,255,255,.18);
}

/* Cards remain centered independently from the side HUD. */
#battle-screen .battle-team {
    width: min(1040px, calc(100% - 190px));
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    gap: clamp(28px, 3vw, 58px);
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 900px) {
    .side-energy-gauge {
        width: 52px;
        height: clamp(300px, 54vh, 470px);
        padding: 10px 7px 9px;
        gap: 7px;
    }
    .energy-segments { width: 18px; }
    .side-energy-label, .side-energy-gauge small { font-size: 5px; }
    .side-energy-gauge strong { font-size: 9px; }
    #battle-screen .battle-team { width: min(100%, calc(100% - 125px)); gap: 10px; }
}

/* ============================================================
   V1.2 — BATTLE TEAM VERTICAL POSITION FIX
   Side energy gauges are fixed HUD elements and do not consume
   arena grid rows. Keep enemy / center message / player separated.
============================================================ */
#battle-screen .battle-arena {
    grid-template-rows: minmax(0, 1fr) 42px minmax(0, 1fr);
}

#battle-screen .enemy-team {
    grid-row: 1;
    align-self: start;
    align-items: flex-start;
    padding-top: 8px;
}

#battle-screen .battle-center {
    grid-row: 2;
    align-self: center;
}

#battle-screen .player-team {
    grid-row: 3;
    align-self: end;
    align-items: flex-end;
    padding-bottom: 8px;
}

@media (max-height: 949px) and (min-width: 761px) {
    #battle-screen .battle-arena {
        grid-template-rows: minmax(0, 1fr) 34px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    #battle-screen .battle-arena {
        grid-template-rows: minmax(0, 1fr) 30px minmax(0, 1fr);
    }
}

/* ============================================================
   GAME MODE SELECTION
============================================================ */
#mode-screen {
    position: relative;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, rgba(116, 69, 164, .12), transparent 38%),
        linear-gradient(180deg, #0c0910 0%, #08070b 100%);
}

.mode-background {
    position: absolute;
    inset: 78px 0 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, transparent 0 32%, rgba(255,255,255,.018) 32% 32.08%, transparent 32.08% 68%, rgba(255,255,255,.018) 68% 68.08%, transparent 68.08%),
        radial-gradient(circle at 50% 50%, rgba(166, 104, 215, .06), transparent 48%);
}

.mode-header { position: relative; z-index: 2; }

.mode-selection-content {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vh, 70px) clamp(30px, 6vw, 110px);
}

.mode-grid {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 2.5vw, 42px);
}

.game-mode-card {
    position: relative;
    min-height: clamp(360px, 55vh, 560px);
    padding: 46px 30px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    overflow: hidden;
    border: 1px solid rgba(211, 175, 242, .2);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(47, 31, 58, .72), rgba(15, 11, 20, .94));
    color: #f4edf9;
    text-align: center;
    font: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 24px 70px rgba(0,0,0,.34);
}

.game-mode-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 28%, rgba(188, 126, 232, .16), transparent 38%);
}

.game-mode-card.available { cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.game-mode-card.available:hover {
    transform: translateY(-7px);
    border-color: rgba(220, 177, 255, .55);
    box-shadow: 0 28px 85px rgba(0,0,0,.42), 0 0 32px rgba(157, 91, 205, .14);
}

.mode-kicker {
    position: relative;
    font-size: 10px;
    letter-spacing: .32em;
    color: rgba(218, 188, 241, .58);
}
.game-mode-card strong {
    position: relative;
    font-family: Georgia, serif;
    font-size: clamp(34px, 3.2vw, 54px);
    font-weight: 400;
    letter-spacing: .09em;
}
.mode-description {
    position: relative;
    max-width: 250px;
    min-height: 42px;
    font-size: 11px;
    line-height: 1.65;
    color: rgba(238, 228, 246, .52);
}
.mode-state {
    position: relative;
    margin-top: 34px;
    min-width: 150px;
    padding: 12px 18px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 3px;
    font-size: 9px;
    letter-spacing: .22em;
    color: rgba(255,255,255,.4);
}
.game-mode-card.unavailable {
    filter: grayscale(.9);
    opacity: .38;
    cursor: not-allowed;
}
.game-mode-card.unavailable::after {
    content: "LOCKED";
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 9px;
    border: 1px solid rgba(255,255,255,.12);
    font-size: 7px;
    letter-spacing: .18em;
    color: rgba(255,255,255,.45);
}

@media (max-width: 850px) {
    .mode-selection-content { align-items: flex-start; overflow-y: auto; }
    .mode-grid { grid-template-columns: 1fr; max-width: 520px; }
    .game-mode-card { min-height: 260px; }
}

/* ============================================================
   MAIN MENU — LEFT GAME NAVIGATION
   Large left-side navigation with animated hover treatment.
============================================================ */
@media (min-width: 851px) {
    #main-menu {
        align-items: center;
        justify-content: flex-start;
        padding-left: clamp(58px, 7vw, 140px);
    }

    .main-menu-content {
        width: min(470px, 42vw);
        align-items: flex-start;
        justify-content: center;
        text-align: left;
        transform: translateY(-6px);
    }

    .game-emblem {
        margin-left: 12px;
    }

    .game-title-container {
        width: min(420px, 100%);
    }

    .game-subtitle {
        margin-left: 2px;
    }

    .main-navigation {
        width: min(440px, 100%);
        margin-top: 54px;
        gap: 3px;
        align-items: stretch;
    }

    .menu-button,
    .menu-button-primary {
        width: 100%;
        height: 76px;
        grid-template-columns: 22px 1fr auto;
        padding: 0 18px 0 20px;
        border: 0;
        border-left: 2px solid rgba(205, 172, 245, .14);
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: none;
        overflow: visible;
        transform: none;
        transition:
            padding-left .25s cubic-bezier(.2,.8,.2,1),
            border-color .25s ease,
            background .25s ease,
            filter .25s ease;
    }

    .menu-button::before {
        top: 0;
        bottom: 0;
        left: 0;
        width: 0;
        height: auto;
        transform: none;
        opacity: 0;
        background: linear-gradient(90deg,
            rgba(177, 116, 235, .18),
            rgba(135, 86, 203, .075) 48%,
            transparent 100%);
        box-shadow: inset 18px 0 38px rgba(173, 112, 232, .05);
        transition: width .28s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
    }

    .menu-button::after {
        left: 0;
        bottom: 0;
        width: 0;
        height: 1px;
        transform: none;
        opacity: 0;
        background: linear-gradient(90deg,
            #d5b5ff 0%,
            rgba(178, 122, 239, .72) 48%,
            transparent 100%);
        box-shadow: 0 0 12px rgba(194, 146, 255, .72);
        transition: width .3s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
    }

    .menu-button:hover,
    .menu-button-primary:hover {
        padding-left: 34px;
        transform: none;
        border-color: rgba(219, 188, 255, .92);
        background: transparent;
        box-shadow: none;
    }

    .menu-button:hover::before {
        left: 0;
        width: 100%;
        opacity: 1;
    }

    .menu-button:hover::after {
        width: 94%;
        opacity: 1;
    }

    .menu-button-symbol {
        position: relative;
        z-index: 2;
        justify-self: start;
        opacity: .48;
        transform: scale(.8);
        transition: opacity .22s ease, transform .22s ease, color .22s ease;
    }

    .menu-button:hover .menu-button-symbol {
        opacity: 1;
        transform: scale(1.18) rotate(45deg);
        color: #eadcff;
    }

    .menu-button-content {
        position: relative;
        z-index: 2;
        gap: 6px;
    }

    .menu-button-content strong {
        font-family: Georgia, "Times New Roman", serif;
        font-size: 20px;
        font-weight: 400;
        letter-spacing: .18em;
        text-shadow: 0 0 0 transparent;
        transition: color .22s ease, text-shadow .22s ease, letter-spacing .22s ease;
    }

    .menu-button:hover .menu-button-content strong {
        color: #fff;
        letter-spacing: .22em;
        text-shadow: 0 0 20px rgba(205, 166, 255, .5);
    }

    .menu-button-content small {
        font-size: 8px;
        letter-spacing: .14em;
        transition: color .22s ease;
    }

    .menu-button:hover .menu-button-content small {
        color: rgba(244, 235, 255, .68);
    }

    .menu-button.locked,
    .menu-button.locked:hover {
        padding-left: 20px;
        opacity: .3;
        border-left-color: rgba(255,255,255,.1);
        background: transparent;
        box-shadow: none;
        filter: grayscale(.7);
    }

    .menu-button.locked:hover::before,
    .menu-button.locked:hover::after {
        width: 0;
        opacity: 0;
    }

    .menu-button.locked:hover .menu-button-symbol {
        opacity: .48;
        transform: scale(.8);
    }

    .menu-button.locked:hover .menu-button-content strong {
        color: var(--text);
        letter-spacing: .18em;
        text-shadow: none;
    }

    .menu-footer {
        margin-left: 20px;
    }
}

/* ============================================================
   MAIN MENU — TITLE CENTERED + LARGER LEFT NAV
   Keep the game identity at the top-center while navigation
   remains vertically centered on the left.
============================================================ */
@media (min-width: 851px) {
    #main-menu .main-menu-content {
        width: min(520px, 44vw);
        min-height: 100%;
        justify-content: center;
        transform: none;
    }

    #main-menu .game-emblem {
        position: fixed;
        z-index: 8;
        top: 34px;
        left: 50%;
        margin: 0;
        transform: translateX(-50%) rotate(45deg) scale(.72);
    }

    #main-menu .game-title-container {
        position: fixed;
        z-index: 8;
        top: 112px;
        left: 50%;
        width: min(650px, 55vw);
        transform: translateX(-50%);
    }

    #main-menu .game-title-container h1 {
        font-size: clamp(62px, 5vw, 86px);
    }

    #main-menu .game-subtitle {
        position: fixed;
        z-index: 8;
        top: 205px;
        left: 50%;
        margin: 0;
        transform: translateX(-50%);
        font-size: 9px;
        white-space: nowrap;
    }

    #main-menu .main-navigation {
        width: min(500px, 100%);
        margin-top: 0;
    }

    #main-menu .menu-button,
    #main-menu .menu-button-primary {
        height: 92px;
        grid-template-columns: 28px 1fr auto;
        padding-left: 24px;
    }

    #main-menu .menu-button:hover,
    #main-menu .menu-button-primary:hover {
        padding-left: 40px;
    }

    #main-menu .menu-button-content strong {
        font-size: 27px;
    }

    #main-menu .menu-button-content small {
        font-size: 10px;
    }

    #main-menu .menu-button-symbol {
        font-size: 13px;
    }

    #main-menu .menu-button.locked,
    #main-menu .menu-button.locked:hover {
        padding-left: 24px;
    }

    #main-menu .menu-footer {
        margin-top: 12px;
        margin-left: 24px;
    }
}

/* ============================================================
   COLLECTION V1.2 — LEFT FILTER SIDEBAR
============================================================ */
#collection-screen .collection-content {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 30px clamp(28px, 4vw, 70px) 70px;
}

/* Sidebar (realities) on the left, rarity bar + cards on the right. */
#collection-screen .collection-layout {
    display: grid;
    grid-template-columns: clamp(210px, 17vw, 270px) minmax(0, 1fr);
    align-items: start;
    gap: clamp(28px, 3vw, 54px);
}

#collection-screen .collection-results {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#collection-screen .collection-tools {
    position: sticky;
    top: 20px;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 18px 0 18px 18px;
    border-left: 1px solid rgba(185, 135, 245, .20);
}

#collection-screen .collection-tools::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 16px;
    width: 1px;
    height: 72px;
    background: linear-gradient(to bottom, transparent, rgba(185,125,255,.95), transparent);
    box-shadow: 0 0 14px rgba(170,105,255,.55);
}

#collection-screen .collection-search-wrap,
#collection-screen .collection-rarity-wrap {
    width: 100%;
    gap: 9px;
    font-size: 8px;
    letter-spacing: .20em;
}

#collection-screen .collection-tools input,
#collection-screen .collection-tools select {
    height: 46px;
    font-size: 12px;
}

#collection-screen #collection-grid.collection-grid {
    width: 100%;
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 42px clamp(18px, 2vw, 34px);
}

@media (max-width: 980px) {
    #collection-screen .collection-content {
        padding-left: 18px;
        padding-right: 18px;
    }
    #collection-screen .collection-layout {
        grid-template-columns: 190px minmax(0, 1fr);
        gap: 20px;
    }
    #collection-screen #collection-grid.collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    #collection-screen .collection-content {
        padding: 22px 14px 50px;
    }
    #collection-screen .collection-layout {
        display: block;
    }
    #collection-screen .collection-results { gap: 22px; }
    #collection-screen .collection-tools {
        position: static;
        margin-bottom: 22px;
        padding: 0;
        border-left: 0;
    }
    #collection-screen .collection-tools::before { display: none; }
    #collection-screen #collection-grid.collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 12px;
    }
}


/* ============================================================
   COLLECTION V1.3 — RARITY MULTI-CHECKBOX FILTER
============================================================ */
#collection-screen .collection-rarity-wrap {
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}
#collection-screen .collection-rarity-wrap legend {
    margin: 0 0 12px;
    padding: 0;
    color: rgba(255,255,255,.48);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .20em;
}
/* Rarities: one horizontal bar. Realities (sidebar) reuse the same checkbox look, stacked. */
#collection-screen .rarity-checkboxes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
}
#collection-screen .reality-checkboxes {
    display: grid;
    gap: 8px;
}
#collection-screen .collection-results > .collection-rarity-wrap {
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(185,135,245,.20);
    border-bottom: 1px solid rgba(185,135,245,.20);
    text-align: center;
}
#collection-screen .collection-results > .collection-rarity-wrap legend {
    margin: 0 auto 8px;
    text-align: center;
}
#collection-screen .collection-results > .collection-rarity-wrap .rarity-checkboxes {
    justify-content: center;
}
#collection-screen .rarity-check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .06em;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
#collection-screen .rarity-check:hover {
    color: rgba(255,255,255,.96);
    background: rgba(145,90,210,.08);
    border-color: rgba(190,140,245,.16);
    transform: translateX(2px);
}
#collection-screen .rarity-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
#collection-screen .rarity-box {
    position: relative;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    border: 1px solid rgba(210,180,255,.32);
    border-radius: 3px;
    background: rgba(15,12,20,.75);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    transition: all .18s ease;
}
#collection-screen .rarity-check input:checked + .rarity-box {
    border-color: rgba(205,165,255,.92);
    background: linear-gradient(135deg, rgba(120,65,190,.92), rgba(185,115,255,.92));
    box-shadow: 0 0 12px rgba(165,95,255,.42), inset 0 0 8px rgba(255,255,255,.16);
}
#collection-screen .rarity-check input:checked + .rarity-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
#collection-screen .rarity-check:has(input:checked) {
    color: rgba(240,225,255,.98);
    background: rgba(145,90,210,.09);
}


/* ============================================================
   COLLECTION V1.4 — CENTERED CARD NAME + RARITY IDENTITY
============================================================ */
#collection-screen .collection-card .card-name {
    width: 100%;
    margin-top: 13px;
    text-align: center;
    color: rgba(250, 247, 255, .96);
    font-size: clamp(15px, 1.15vw, 20px);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: .045em;
    text-shadow: 0 0 14px rgba(220, 205, 255, .12);
}

#collection-screen .collection-card .card-rarity {
    display: block;
    width: 100%;
    margin-top: 7px;
    text-align: center;
    font-size: clamp(10px, .78vw, 13px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;
}

#collection-screen .collection-card .card-rarity[data-rarity="RARE"] {
    color: #55e879;
    text-shadow: 0 0 10px rgba(85, 232, 121, .42);
}

#collection-screen .collection-card .card-rarity[data-rarity="SUPER RARE"] {
    color: #55a9ff;
    text-shadow: 0 0 10px rgba(85, 169, 255, .44);
}

#collection-screen .collection-card .card-rarity[data-rarity="EPIC"] {
    color: #b66cff;
    text-shadow: 0 0 11px rgba(182, 108, 255, .46);
}

#collection-screen .collection-card .card-rarity[data-rarity="MYTHIC"] {
    color: #ff5368;
    text-shadow: 0 0 11px rgba(255, 83, 104, .48);
}

#collection-screen .collection-card .card-rarity[data-rarity="LEGENDARY"] {
    color: #ffd65a;
    text-shadow: 0 0 12px rgba(255, 190, 45, .52);
}

#collection-screen .collection-card .card-rarity[data-rarity="SINGULARITY"] {
    color: transparent;
    background: linear-gradient(90deg, #ff4f72, #ffd84f, #63f28d, #54c8ff, #a96dff, #ff4fbc, #ff4f72);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 7px rgba(180, 115, 255, .34));
    animation: singularity-rarity-flow 7s linear infinite;
}

@keyframes singularity-rarity-flow {
    from { background-position: 0% 50%; }
    to   { background-position: 240% 50%; }
}

/* ============================================================
   TEAM SELECTION V1.4 — MATCH COLLECTION NAME + RARITY STYLE
============================================================ */
#team-screen .collection-card .card-name {
    width: 100%;
    margin-top: 13px;
    text-align: center;
    color: rgba(250, 247, 255, .96);
    font-size: clamp(15px, 1.15vw, 20px);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: .045em;
    text-shadow: 0 0 14px rgba(220, 205, 255, .12);
}

#team-screen .collection-card .card-rarity {
    display: block;
    width: 100%;
    margin-top: 7px;
    text-align: center;
    font-size: clamp(10px, .78vw, 13px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;
}

#team-screen .collection-card .card-rarity[data-rarity="RARE"] {
    color: #55e879;
    text-shadow: 0 0 10px rgba(85, 232, 121, .42);
}
#team-screen .collection-card .card-rarity[data-rarity="SUPER RARE"] {
    color: #55a9ff;
    text-shadow: 0 0 10px rgba(85, 169, 255, .44);
}
#team-screen .collection-card .card-rarity[data-rarity="EPIC"] {
    color: #b66cff;
    text-shadow: 0 0 11px rgba(182, 108, 255, .46);
}
#team-screen .collection-card .card-rarity[data-rarity="MYTHIC"] {
    color: #ff5368;
    text-shadow: 0 0 11px rgba(255, 83, 104, .48);
}
#team-screen .collection-card .card-rarity[data-rarity="LEGENDARY"] {
    color: #ffd65a;
    text-shadow: 0 0 12px rgba(255, 190, 45, .52);
}
#team-screen .collection-card .card-rarity[data-rarity="SINGULARITY"] {
    color: transparent;
    background: linear-gradient(90deg, #ff4f72, #ffd84f, #63f28d, #54c8ff, #a96dff, #ff4fbc, #ff4f72);
    background-size: 240% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 7px rgba(180, 115, 255, .34));
    animation: singularity-rarity-flow 7s linear infinite;
}


/* ============================================================
   ONLINE MATCHMAKING — WAITING SCREEN
============================================================ */
#matchmaking-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(128, 68, 214, .16), transparent 34%),
        rgba(4, 3, 9, .94);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}
#matchmaking-overlay::before {
    content: "";
    position: absolute;
    inset: -35%;
    background: conic-gradient(from 0deg, transparent, rgba(165, 96, 255, .06), transparent 28%);
    animation: queue-bg-spin 10s linear infinite;
}
#matchmaking-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.matchmaking-panel {
    position: relative;
    z-index: 1;
    width: min(590px, calc(100vw - 40px));
    padding: 58px 44px 42px;
    text-align: center;
    border: 1px solid rgba(186, 127, 255, .34);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(28, 18, 45, .97), rgba(9, 7, 16, .98));
    box-shadow: 0 0 70px rgba(129, 65, 224, .19), inset 0 1px rgba(255,255,255,.04);
}
.matchmaking-eyebrow { margin-bottom: 14px; font-size: 11px; font-weight: 800; letter-spacing: .3em; color: #ad89db; }
#matchmaking-title { margin: 0; font-size: clamp(25px, 4vw, 39px); letter-spacing: .08em; color: #f7f1ff; text-shadow: 0 0 24px rgba(190,135,255,.2); }
.matchmaking-search-core {
    position: relative; width: 82px; height: 82px; margin: 30px auto 24px;
    display: grid; place-items: center;
}
.matchmaking-search-core::before, .matchmaking-search-core::after {
    content: ""; position: absolute; inset: 0; border: 1px solid rgba(190,128,255,.35); transform: rotate(45deg); animation: queue-pulse 1.8s ease-in-out infinite;
}
.matchmaking-search-core::after { inset: 13px; animation-delay: -.9s; }
.matchmaking-diamond { width: 17px; height: 17px; transform: rotate(45deg); background: #c99aff; box-shadow: 0 0 22px #9c5cff; }
#matchmaking-status { margin: 0; color: #b5a9c3; font-size: 14px; letter-spacing: .03em; }
#matchmaking-timer { margin: 18px 0 26px; color: #eee4fb; font: 700 18px/1 monospace; letter-spacing: .12em; }
#matchmaking-cancel {
    min-width: 170px; padding: 12px 25px; border: 1px solid rgba(196,139,255,.42); border-radius: 9px;
    background: rgba(117,65,174,.12); color: #d9c5ef; font-weight: 800; letter-spacing: .13em; cursor: pointer;
    transition: .2s ease;
}
#matchmaking-cancel:hover { background: rgba(145,79,219,.24); border-color: rgba(213,169,255,.7); color: white; box-shadow: 0 0 22px rgba(155,87,230,.16); }
#matchmaking-cancel:disabled { opacity: .35; cursor: default; }
@keyframes queue-pulse { 0%,100% { transform: rotate(45deg) scale(.82); opacity:.28; } 50% { transform: rotate(45deg) scale(1.08); opacity:1; } }
@keyframes queue-bg-spin { to { transform: rotate(360deg); } }

/* ONLINE RESIGN + SERVER TURN TIMER */
.battle-exit-button {
    width: auto;
    min-width: 82px;
    padding: 0 14px;
    border-color: rgba(255, 105, 125, .24);
    color: rgba(255, 190, 200, .82);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}
.battle-exit-button:hover {
    color: #fff;
    border-color: rgba(255, 105, 125, .58);
    background: rgba(180, 30, 55, .16);
}
.online-turn-timer {
    margin-top: 0;
    text-align: right;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: .12em;
    color: rgba(255,255,255,.92);
    font-variant-numeric: tabular-nums;
}
.online-turn-timer.danger { color: #ff738c; }

.resign-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    place-items: center;
    background: rgba(4,3,8,.72);
    backdrop-filter: blur(14px);
}
.resign-confirm-overlay.open { display: grid; }
.resign-confirm-panel {
    width: min(420px, calc(100% - 32px));
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(220,190,255,.18);
    background: linear-gradient(180deg, rgba(24,18,34,.98), rgba(10,8,15,.98));
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.resign-confirm-panel h2 { margin: 0 0 10px; letter-spacing: .08em; }
.resign-confirm-panel p { margin: 0 0 24px; color: rgba(255,255,255,.62); }
.resign-confirm-actions { display: flex; gap: 12px; justify-content: center; }
.resign-confirm-actions button {
    min-width: 120px; min-height: 42px; padding: 0 18px; cursor: pointer;
    border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: white;
    font-weight: 800; letter-spacing: .08em;
}
#confirm-resign { border-color: rgba(255,90,115,.5); background: rgba(170,25,50,.18); }

/* ACCOUNT SYSTEM */
.auth-gate, .account-overlay { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 35%, rgba(92,48,145,.24), rgba(4,3,9,.96) 48%, #030207); backdrop-filter: blur(18px); }
.auth-gate.hidden { display: none; }
.auth-panel, .account-panel { width: min(460px, 100%); padding: 38px; border: 1px solid rgba(194,143,255,.28); background: linear-gradient(180deg, rgba(24,16,38,.98), rgba(8,6,13,.99)); box-shadow: 0 28px 100px rgba(0,0,0,.55), inset 0 1px rgba(255,255,255,.04); text-align: center; }
.auth-emblem { width: 48px; height: 48px; margin: 0 auto 12px; display:grid; place-items:center; transform: rotate(45deg); border:1px solid rgba(202,154,255,.45); color:#d6b2ff; }
.auth-emblem::first-letter { transform: rotate(-45deg); }
.auth-eyebrow { margin:0 0 8px; color:#a98acb; font-size:10px; font-weight:900; letter-spacing:.28em; }
.auth-panel h1 { margin:0 0 26px; color:#fff; font-size:28px; letter-spacing:.1em; }
.auth-panel h1 span { display:block; margin-top:5px; color:#9d82ba; font-size:10px; letter-spacing:.32em; }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; margin-bottom:24px; border-bottom:1px solid rgba(255,255,255,.1); }
.auth-tab { padding:12px 8px; border:0; border-bottom:2px solid transparent; background:transparent; color:#776d83; cursor:pointer; font-weight:900; letter-spacing:.1em; }
.auth-tab.active { color:#e6d6f8; border-bottom-color:#b679f2; }
#auth-form { display:grid; gap:16px; text-align:left; }
#auth-form label { display:grid; gap:7px; color:#a99cb8; font-size:10px; font-weight:900; letter-spacing:.14em; }
#auth-form input, #delete-confirmation { min-height:44px; padding:0 13px; border:1px solid rgba(255,255,255,.12); outline:none; background:rgba(255,255,255,.035); color:#fff; font:inherit; }
#auth-form input:focus, #delete-confirmation:focus { border-color:rgba(190,125,255,.65); box-shadow:0 0 0 3px rgba(157,85,220,.1); }
#auth-submit { min-height:46px; margin-top:2px; border:1px solid rgba(194,132,255,.5); background:linear-gradient(90deg, rgba(111,55,169,.55), rgba(75,38,123,.55)); color:#fff; cursor:pointer; font-weight:900; letter-spacing:.14em; }
.auth-note { margin:18px 0 0; color:#71677c; font-size:11px; }
.auth-error { min-height:16px; margin:0; color:#ff7890; font-size:11px; text-align:center; }
.account-overlay { display:none; z-index:19000; }
.account-overlay.open { display:grid; }
.account-panel { position:relative; }
.account-close { position:absolute; top:12px; right:14px; border:0; background:transparent; color:#998da5; font-size:28px; cursor:pointer; }
.account-panel h2 { margin:8px 0 4px; color:#fff; letter-spacing:.08em; }
.account-id { margin:0 0 26px; color:#756a82; font:700 11px monospace; }
.account-action, #delete-account-button { width:100%; min-height:44px; border:1px solid rgba(255,255,255,.13); background:rgba(255,255,255,.04); color:#eee6f6; cursor:pointer; font-weight:900; letter-spacing:.1em; }
.danger-zone { display:grid; gap:10px; margin-top:28px; padding-top:24px; border-top:1px solid rgba(255,90,110,.18); text-align:left; }
.danger-zone strong { color:#ff8a9d; font-size:11px; letter-spacing:.14em; }
.danger-zone p { margin:0; color:#7d707f; font-size:11px; }
#delete-account-button { border-color:rgba(255,82,105,.35); color:#ff9baa; background:rgba(160,25,45,.1); }
@media (max-width: 520px) { .auth-panel,.account-panel { padding:28px 20px; } }


/* V0 FINAL — FRIENDS & FRIENDLY BATTLES */
.friends-overlay,.friendly-challenge-overlay{position:fixed;inset:0;z-index:12000;display:none;place-items:center;background:rgba(4,5,12,.82);backdrop-filter:blur(12px)}
.friends-overlay.open,.friendly-challenge-overlay.open{display:grid}.friends-panel,.friendly-challenge-panel{width:min(760px,92vw);max-height:84vh;overflow:auto;padding:28px;border:1px solid rgba(174,132,255,.35);background:linear-gradient(145deg,rgba(20,17,38,.98),rgba(7,8,18,.98));box-shadow:0 25px 80px rgba(0,0,0,.55),0 0 45px rgba(125,76,255,.14)}
.friends-head{display:flex;align-items:center;justify-content:space-between}.friends-head h2{margin:3px 0 18px;font-size:32px}.friends-head>button{font-size:30px;background:none;border:0;color:white;cursor:pointer}.friends-search{display:flex;gap:10px}.friends-search input{flex:1;padding:13px 15px;background:#0c0d18;border:1px solid rgba(255,255,255,.14);color:white}.friends-search button,.friend-row button,.friendly-challenge-panel button{padding:10px 14px;border:1px solid rgba(172,125,255,.45);background:rgba(107,62,190,.2);color:white;cursor:pointer}.friends-panel h3{margin:24px 0 8px;font-size:13px;letter-spacing:.18em;color:#bca8ed}.friend-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:12px 4px;border-bottom:1px solid rgba(255,255,255,.08)}.friend-row strong,.friend-row small{display:block}.friend-row small{margin-top:4px;color:#999}.friend-row>div:last-child{display:flex;gap:7px;align-items:center}.friends-empty,#friends-message{color:#999}.friendly-challenge-panel{text-align:center;width:min(480px,90vw)}.friendly-challenge-panel h2{margin:10px 0}.friendly-challenge-panel>div{display:flex;justify-content:center;gap:12px;margin-top:22px}

/* V0 FINAL — RIGHT FRIENDS SIDEBAR */
.friends-dock-button{position:fixed;z-index:11990;top:118px;right:24px;height:44px;padding:0 16px;border:1px solid rgba(173,132,255,.32);background:rgba(10,9,20,.72);backdrop-filter:blur(14px);color:#f5efff;font:600 12px/1 Georgia,serif;letter-spacing:.2em;cursor:pointer;box-shadow:0 10px 35px rgba(0,0,0,.28);transition:.22s ease}.friends-dock-button:hover,.friends-dock-button[aria-expanded="true"]{border-color:rgba(190,154,255,.7);background:rgba(38,25,65,.88);transform:translateY(-1px)}.friends-dock-button>span:last-child{display:inline-grid;place-items:center;min-width:19px;height:19px;margin-left:9px;border-radius:99px;background:rgba(150,105,245,.22);font:700 10px Arial,sans-serif;letter-spacing:0}.friends-dock-dot{display:inline-block;width:6px;height:6px;margin-right:9px;border-radius:50%;background:#8ef2bd;box-shadow:0 0 10px #8ef2bd}
.friends-overlay{display:none!important}.friends-sidebar{position:fixed;z-index:12000;top:102px;right:0;bottom:0;width:min(390px,94vw);transform:translateX(102%);transition:transform .28s cubic-bezier(.2,.8,.2,1);pointer-events:none;border-left:1px solid rgba(172,132,255,.24);background:linear-gradient(180deg,rgba(12,10,23,.98),rgba(6,7,15,.985));box-shadow:-28px 0 70px rgba(0,0,0,.42)}.friends-sidebar.open{transform:translateX(0);pointer-events:auto}.friends-sidebar .friends-panel{width:auto;max-height:none;height:100%;overflow-y:auto;padding:25px 22px 34px;border:0;background:none;box-shadow:none}.friends-head{position:sticky;top:-25px;z-index:2;margin:-25px -22px 0;padding:25px 22px 14px;background:linear-gradient(180deg,#0d0b19 78%,rgba(13,11,25,0))}.friends-head h2{margin:2px 0 0;font-size:27px;letter-spacing:.16em}.friends-head>button{font-size:26px}.friends-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 14px}.friends-tabs button{padding:11px 7px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.025);color:#aaa3b7;font-size:10px;letter-spacing:.11em;cursor:pointer}.friends-tabs button:hover,.friends-tabs button.active{color:#fff;border-color:rgba(174,132,255,.48);background:rgba(121,74,205,.15)}#friend-request-count{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:4px;border-radius:50%;background:#6e45b5;color:#fff;font-size:9px}.friends-view{display:none}.friends-view.active{display:block}.friends-group{margin-top:18px}.friends-group h4,.friends-requests-view h4{display:flex;justify-content:space-between;margin:0 0 8px;color:#928aa2;font-size:10px;letter-spacing:.2em}.friends-group h4 span{color:#665e70}.friend-entry{border-top:1px solid rgba(255,255,255,.06)}.friend-main{display:flex;width:100%;align-items:center;gap:10px;padding:13px 4px;border:0;background:transparent;color:#eee;text-align:left;cursor:pointer}.friend-main:hover{background:linear-gradient(90deg,rgba(130,83,210,.1),transparent)}.friend-main>span:nth-child(2){flex:1}.friend-main strong,.friend-main small,.request-card strong,.request-card small,.search-player strong,.search-player small{display:block}.friend-main strong{font-size:13px;letter-spacing:.05em}.friend-main small,.request-card small,.search-player small{margin-top:3px;color:#716b7a;font-size:9px}.friend-main b{color:#776b8c;font:400 17px Arial}.presence{flex:0 0 auto;width:7px;height:7px;border-radius:50%}.presence.online{background:#72e8a7;box-shadow:0 0 9px rgba(114,232,167,.6)}.presence.offline{background:#55515d}.friend-actions{display:grid;gap:6px;padding:0 8px 13px 21px}.friend-actions button,.request-card button,.search-player button{padding:9px 10px;border:1px solid rgba(171,126,255,.32);background:rgba(108,65,182,.11);color:#ddd;font-size:9px;letter-spacing:.12em;cursor:pointer}.friend-actions button:hover,.request-card button:hover,.search-player button:hover{border-color:rgba(188,151,255,.65);background:rgba(122,76,201,.22);color:#fff}.friend-actions button:disabled{opacity:.35;cursor:not-allowed}.danger-soft{border-color:rgba(211,96,126,.22)!important;color:#c792a0!important;background:rgba(120,35,60,.06)!important}.friends-subhead{display:flex;align-items:center;gap:11px;margin:18px 0}.friends-subhead .friends-back{width:32px;height:32px;border:1px solid rgba(255,255,255,.1);background:transparent;color:#ddd;font-size:22px;cursor:pointer}.friends-subhead small{color:#746b83;font-size:8px;letter-spacing:.2em}.friends-subhead h3{margin:2px 0 0!important;color:#e8e1f3!important;font-size:16px!important;letter-spacing:.13em}.friends-search{display:grid;grid-template-columns:1fr auto;gap:7px;margin-bottom:14px}.friends-search input{min-width:0}.search-player,.request-card{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 3px;border-bottom:1px solid rgba(255,255,255,.065)}.search-player>div:first-child{display:grid;grid-template-columns:auto 1fr;column-gap:9px;align-items:center}.search-player>div:first-child small{grid-column:2}.request-card>div:last-child{display:flex;gap:5px}.request-state{color:#827a90;font-size:9px;letter-spacing:.12em}.friends-empty,#friends-message{font-size:10px;line-height:1.5;color:#746e7e}#friends-message{min-height:15px;margin:8px 0}.friend-collection-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.friend-collection-card{min-width:0;text-align:center}.friend-collection-card img{display:block;width:100%;border:1px solid rgba(255,255,255,.09)}.friend-collection-card strong{display:block;margin-top:6px;font-size:10px}.friend-collection-card small{color:#8d829d;font-size:8px;letter-spacing:.12em}.friendly-challenge-overlay{z-index:12100}
@media(max-width:700px){.friends-dock-button{top:110px;right:12px}.friends-sidebar{top:96px;width:min(360px,100vw)}}

/* V0 Friends dock alignment fix */
.friends-dock-button{
  top:0;
  right:0;
  width:min(390px,94vw);
  height:64px;
  padding:0 22px;
  border-top:0;
  border-right:0;
  transform:none!important;
}
.friends-sidebar{
  top:64px;
}
@media(max-width:700px){
  .friends-dock-button{top:0;right:0;width:min(360px,100vw);height:60px}
  .friends-sidebar{top:60px;width:min(360px,100vw)}
}


/* V0 FINAL — SOCIAL UX POLISH */
#friends-add-view,#friends-requests-view{padding-top:12px}
#friends-requests-view>h4{margin-top:10px}
.challenge-group{margin-top:6px!important;margin-bottom:22px;padding-bottom:14px;border-bottom:1px solid rgba(174,132,255,.18)}
.challenge-card{display:grid;gap:9px;padding:12px 4px;border-top:1px solid rgba(255,255,255,.07)}
.challenge-card strong,.challenge-card small{display:block}.challenge-card strong{font-size:12px}.challenge-card small{margin-top:4px;color:#756d82;font-size:8px;letter-spacing:.15em}.challenge-card>div:last-child{display:grid;grid-template-columns:1fr 1fr;gap:6px}.challenge-card button{padding:9px;border:1px solid rgba(171,126,255,.32);background:rgba(108,65,182,.11);color:#ddd;font-size:9px;letter-spacing:.12em;cursor:pointer}
.friends-dock-button.has-attention::after{content:attr(data-attention);position:absolute;top:9px;right:10px;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:20px;background:#a74cff;color:#fff;font:800 9px Arial,sans-serif;letter-spacing:0;box-shadow:0 0 14px rgba(167,76,255,.65)}
.social-toast-stack{position:fixed;right:22px;bottom:22px;z-index:20000;display:grid;gap:10px;width:min(340px,calc(100vw - 30px));pointer-events:none}.social-toast{transform:translateX(calc(100% + 30px));opacity:0;padding:16px 18px;border:1px solid rgba(179,139,255,.4);background:linear-gradient(135deg,rgba(23,17,40,.97),rgba(8,9,18,.98));box-shadow:0 16px 45px rgba(0,0,0,.5),0 0 28px rgba(123,76,210,.12);transition:transform .3s ease,opacity .3s ease}.social-toast.show{transform:translateX(0);opacity:1}.social-toast strong,.social-toast span{display:block}.social-toast strong{color:#e6d8ff;font-size:10px;letter-spacing:.16em}.social-toast span{margin-top:7px;color:#fff;font-size:13px}
@media(max-width:700px){.social-toast-stack{right:12px;bottom:12px}}


/* V0 FIX — FRIEND COLLECTION EXACTLY MIRRORS OWN COLLECTION */
/* ============================================================
   COLLECTION V1.2 — LEFT FILTER SIDEBAR
============================================================ */





/* ============================================================
   COLLECTION V1.3 — RARITY MULTI-CHECKBOX FILTER
============================================================ */
/* ============================================================
   COLLECTION V1.4 — CENTERED CARD NAME + RARITY IDENTITY
============================================================ */



/* === V0 FINAL - friend collection alignment fix ===
   Same centered two-column geometry and 3-card grid as COLLECTION. */



/* ============================================================
   RIFT BATTLEGROUND V0 — CINEMATIC MAIN MENU (FINAL ART)
   Artwork stays clean; all UI remains real HTML/CSS.
============================================================ */
#main-menu{
  position:relative;
  overflow:hidden;
  align-items:stretch;
  justify-content:flex-start;
  background:#050711 url("assets/ui/main-menu-background.webp") center center / cover no-repeat !important;
}
#main-menu::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(3,5,13,.94) 0%,rgba(3,5,13,.82) 13%,rgba(3,5,13,.42) 27%,rgba(3,5,13,.06) 43%,transparent 58%);
}
#main-menu::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  box-shadow:inset 0 0 110px rgba(0,0,0,.46);
}
#main-menu .menu-background,
#main-menu .menu-decoration{display:none!important}
#main-menu .main-menu-content{
  position:relative!important;
  z-index:5!important;
  width:min(430px,31vw)!important;
  min-height:100%!important;
  margin:0!important;
  padding:clamp(38px,5vh,72px) 0 30px clamp(44px,6vw,105px)!important;
  box-sizing:border-box!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  text-align:left!important;
  transform:none!important;
}
#main-menu .game-emblem{display:none!important}
#main-menu .game-title-container{
  position:relative!important;
  top:auto!important;left:auto!important;
  width:auto!important;max-width:none!important;
  margin:0 0 clamp(42px,6vh,74px)!important;
  padding:0!important;
  transform:none!important;
  text-align:center!important;
}
#main-menu .game-title-container::before{
  content:"✦";
  position:absolute;
  top:-20px;left:50%;
  transform:translateX(-50%);
  color:#cdd6ff;
  font-size:32px;
  text-shadow:0 0 9px #655cff,0 0 24px #655cff;
}
#main-menu .game-title-container h1{
  width:auto!important;
  margin:0!important;
  color:#f8f7ff!important;
  font-family:Georgia,"Times New Roman",serif!important;
  font-size:clamp(52px,4.4vw,76px)!important;
  line-height:.9!important;
  font-weight:500!important;
  letter-spacing:.12em!important;
  white-space:nowrap!important;
  text-shadow:0 2px 5px rgba(0,0,0,.85),0 0 24px rgba(100,94,255,.28)!important;
}
#main-menu .game-subtitle{
  position:relative!important;
  top:auto!important;left:auto!important;
  margin:10px 0 0!important;
  transform:none!important;
  color:#eeeaff!important;
  font:400 clamp(15px,1.25vw,21px)/1 Georgia,"Times New Roman",serif!important;
  letter-spacing:.34em!important;
  white-space:nowrap!important;
  text-shadow:0 2px 5px #000,0 0 14px rgba(102,91,255,.38)!important;
}
#main-menu .title-line{display:none!important}
#main-menu .main-navigation{
  position:relative!important;
  width:min(360px,100%)!important;
  margin:0!important;
  padding-left:28px;
  border-left:1px solid rgba(211,218,255,.5);
}
#main-menu .menu-button,
#main-menu .menu-button-primary{
  position:relative;
  width:100%!important;
  height:82px!important;
  display:grid!important;
  grid-template-columns:28px 1fr auto!important;
  align-items:center!important;
  gap:10px!important;
  padding:0 16px 0 12px!important;
  border:0!important;
  border-bottom:1px solid rgba(220,225,255,.18)!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#fff!important;
  text-align:left!important;
  overflow:visible!important;
}
#main-menu .menu-button::before,
#main-menu .menu-button-primary::before{
  content:""!important;
  position:absolute!important;
  left:-29px!important;right:100%!important;
  top:0!important;bottom:0!important;
  width:auto!important;height:auto!important;
  opacity:0!important;
  background:linear-gradient(90deg,rgba(67,79,196,.36),rgba(79,89,220,.12),transparent)!important;
  border:0!important;
  transition:.22s ease!important;
}
#main-menu .menu-button:hover::before,
#main-menu .menu-button-primary:hover::before{
  right:0!important;
  opacity:1!important;
}
#main-menu .menu-button::after,
#main-menu .menu-button-primary::after{display:none!important}
#main-menu .menu-button:hover,
#main-menu .menu-button-primary:hover{padding-left:18px!important;transform:none!important}
#main-menu .menu-button-symbol{
  position:absolute!important;
  left:-39px!important;
  top:50%!important;
  transform:translateY(-50%) rotate(45deg)!important;
  display:grid!important;
  place-items:center!important;
  width:19px!important;height:19px!important;
  color:transparent!important;
  font-size:0!important;
  border:1px solid rgba(226,230,255,.9)!important;
  background:rgba(7,10,22,.8)!important;
  box-shadow:0 0 9px rgba(114,111,255,.25)!important;
}
#main-menu .menu-button:hover .menu-button-symbol,
#main-menu .menu-button-primary:hover .menu-button-symbol{
  border-color:#fff!important;
  background:#686dff!important;
  box-shadow:0 0 12px #676cff,0 0 25px rgba(103,108,255,.65)!important;
}
#main-menu .menu-button-content{grid-column:2!important}
#main-menu .menu-button-content strong{
  display:block!important;
  color:#f5f2ff!important;
  font:500 26px/1 Georgia,"Times New Roman",serif!important;
  letter-spacing:.04em!important;
  text-shadow:0 2px 5px #000!important;
}
#main-menu .menu-button-content small{
  display:block!important;
  margin-top:7px!important;
  color:#c6c4d0!important;
  font:400 11px/1.2 Georgia,"Times New Roman",serif!important;
  letter-spacing:.02em!important;
  text-transform:none!important;
}
#main-menu .locked-tag{font-size:8px!important;opacity:.45!important}
#main-menu .menu-button.locked,
#main-menu .menu-button.locked:hover{opacity:.36!important;padding-left:12px!important;filter:none!important}
#main-menu .menu-footer{
  position:absolute!important;
  left:clamp(44px,6vw,105px)!important;
  bottom:28px!important;
  margin:0!important;
  color:rgba(235,235,246,.68)!important;
  font:400 10px Georgia,"Times New Roman",serif!important;
  letter-spacing:.12em!important;
}
body:has(#main-menu.active) .friends-dock-button{
  top:26px!important;right:26px!important;
  height:48px!important;
  width:auto!important;
  padding:0 18px!important;
  border:1px solid rgba(220,225,255,.18)!important;
  background:rgba(4,6,15,.74)!important;
  backdrop-filter:blur(12px)!important;
  font-family:Georgia,"Times New Roman",serif!important;
  box-shadow:0 8px 30px rgba(0,0,0,.3)!important;
}
body:has(#main-menu.active) .friends-sidebar{top:74px!important}
@media(max-width:900px){
  #main-menu::before{background:linear-gradient(90deg,rgba(3,5,13,.92),rgba(3,5,13,.58) 48%,rgba(3,5,13,.12))}
  #main-menu .main-menu-content{width:min(390px,72vw)!important;padding-left:34px!important}
  #main-menu .game-title-container h1{font-size:48px!important}
  #main-menu .game-subtitle{font-size:14px!important}
  #main-menu .menu-footer{left:34px!important}
}

/* ============================================================
   RIFT BATTLEGROUND — REFERENCE-ACCURATE MENU OVERLAY
   Matches the approved cinematic mockup while keeping the art clean.
============================================================ */
#main-menu::before{
  background:linear-gradient(90deg,rgba(2,4,12,.86) 0%,rgba(2,4,12,.68) 17%,rgba(2,4,12,.26) 31%,rgba(2,4,12,.03) 44%,transparent 55%)!important;
}
#main-menu .main-menu-content{
  position:absolute!important;
  inset:0 auto 0 0!important;
  width:clamp(390px,31vw,500px)!important;
  min-height:100%!important;
  padding:clamp(42px,6vh,68px) 0 40px clamp(54px,5.1vw,82px)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  overflow:visible!important;
}
#main-menu .game-title-container{
  display:block!important;
  flex:none!important;
  position:relative!important;
  width:clamp(330px,27vw,435px)!important;
  height:auto!important;
  margin:0 0 clamp(42px,6vh,66px)!important;
  padding:0 0 20px!important;
  text-align:center!important;
  overflow:visible!important;
}
#main-menu .game-title-container::before{
  content:"✦"!important;
  top:-18px!important;
  left:50%!important;
  font-size:36px!important;
  color:#f1f1ff!important;
  text-shadow:0 0 7px #fff,0 0 14px #676cff,0 0 32px #5a55ff!important;
}
#main-menu .game-title-container::after{
  content:"";
  position:absolute;
  left:8%;right:8%;bottom:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(129,129,255,.85),transparent);
  box-shadow:0 0 9px rgba(100,98,255,.65);
}
#main-menu .game-title-container h1{
  display:block!important;
  width:100%!important;
  font-size:clamp(64px,5.3vw,88px)!important;
  line-height:.9!important;
  letter-spacing:.13em!important;
  padding-left:.13em!important;
  white-space:nowrap!important;
}
#main-menu .game-subtitle{
  display:block!important;
  width:100%!important;
  margin:13px 0 0!important;
  font-size:clamp(16px,1.38vw,23px)!important;
  line-height:1!important;
  letter-spacing:.36em!important;
  padding-left:.36em!important;
  white-space:nowrap!important;
}
#main-menu .main-navigation{
  width:clamp(340px,28vw,450px)!important;
  padding:0 0 0 28px!important;
  margin:0!important;
  border-left:1px solid rgba(230,233,255,.62)!important;
}
#main-menu .menu-button,
#main-menu .menu-button-primary{
  width:100%!important;
  height:clamp(82px,9.4vh,96px)!important;
  padding:0 20px 0 20px!important;
  grid-template-columns:1fr auto!important;
  border-bottom:1px solid rgba(225,228,255,.25)!important;
  transition:padding .2s ease,background .2s ease,box-shadow .2s ease!important;
}
#main-menu .menu-button::before,
#main-menu .menu-button-primary::before{
  left:0!important;
  right:0!important;
  top:5px!important;
  bottom:5px!important;
  width:auto!important;
  opacity:0!important;
  background:linear-gradient(90deg,rgba(70,83,215,.34) 0%,rgba(68,77,197,.17) 62%,transparent 100%)!important;
  border-top:1px solid rgba(126,139,255,.32)!important;
  border-bottom:1px solid rgba(126,139,255,.32)!important;
  box-shadow:inset 3px 0 0 #7c82ff,0 0 24px rgba(80,85,255,.08)!important;
}
#main-menu .menu-button-primary::before,
#main-menu .menu-button:hover::before,
#main-menu .menu-button-primary:hover::before{opacity:1!important;}
#main-menu .menu-button:hover,
#main-menu .menu-button-primary:hover{padding-left:26px!important;}
#main-menu .menu-button-symbol{
  left:-42px!important;
  width:25px!important;height:25px!important;
  border:1.5px solid rgba(239,241,255,.95)!important;
  background:#090c18!important;
  box-shadow:0 0 8px rgba(140,145,255,.4)!important;
  z-index:3!important;
}
#main-menu .menu-button-primary .menu-button-symbol,
#main-menu .menu-button:hover .menu-button-symbol{
  background:#fafaff!important;
  border-color:#fff!important;
  box-shadow:0 0 6px #fff,0 0 15px #6c73ff,0 0 30px #555cff!important;
}
#main-menu .menu-button-primary .menu-button-symbol::after,
#main-menu .menu-button:hover .menu-button-symbol::after{
  content:"";
  position:absolute;inset:5px;
  background:#626aff;
}
#main-menu .menu-button-content{grid-column:1!important;position:relative!important;z-index:2!important;}
#main-menu .menu-button-content strong{
  font-size:clamp(27px,2vw,34px)!important;
  line-height:1!important;
  letter-spacing:.025em!important;
}
#main-menu .menu-button-content small{
  margin-top:9px!important;
  font-size:clamp(11px,.8vw,13px)!important;
  color:#d0ced8!important;
}
#main-menu .menu-button.locked,
#main-menu .menu-button.locked:hover{opacity:.38!important;padding-left:20px!important;}
#main-menu .menu-footer{
  left:clamp(54px,5.1vw,82px)!important;
  bottom:30px!important;
  font-size:11px!important;
}
body:has(#main-menu.active) .friends-dock-button{
  top:26px!important;right:26px!important;
  min-width:190px!important;height:52px!important;
  padding:0 22px!important;
  font-size:15px!important;
  letter-spacing:.12em!important;
  border:1px solid rgba(225,229,255,.28)!important;
  background:rgba(4,6,15,.82)!important;
}
body:has(#main-menu.active) .friends-sidebar{top:78px!important;right:26px!important;}
@media(max-width:900px){
  #main-menu .main-menu-content{width:min(430px,78vw)!important;padding-left:34px!important;}
  #main-menu .game-title-container{width:340px!important;}
  #main-menu .game-title-container h1{font-size:58px!important;}
  #main-menu .game-subtitle{font-size:15px!important;}
  #main-menu .main-navigation{width:340px!important;}
  #main-menu .menu-footer{left:34px!important;}
}

/* ============================================================
   RIFT BATTLEGROUND — PNG LOGO (FINAL SIZE/POSITION FIX)
============================================================ */
#main-menu .game-title-container{
  display:block!important;
  position:relative!important;
  flex:none!important;
  width:clamp(285px,23vw,380px)!important;
  height:auto!important;
  margin:0 0 clamp(34px,4.5vh,50px)!important;
  padding:0!important;
  overflow:visible!important;
  text-align:left!important;
  isolation:auto!important;
}

#main-menu .game-title-container::before,
#main-menu .game-title-container::after{
  content:none!important;
  display:none!important;
}

#main-menu .game-title-container .title-line,
#main-menu .game-title-container h1,
#main-menu .game-title-container .game-subtitle{
  display:none!important;
}

#main-menu .rift-main-logo{
  display:block!important;
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  max-width:380px!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:left top!important;
  pointer-events:none!important;
  user-select:none!important;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.58)) drop-shadow(0 0 10px rgba(91,82,255,.20))!important;
}

#main-menu .main-navigation{
  position:relative!important;
  z-index:2!important;
}

@media(max-width:900px){
  #main-menu .game-title-container{width:285px!important;}
  #main-menu .rift-main-logo{max-width:285px!important;}
}


/* === V0 UX REFRESH: SETTINGS + COMPACT FRIENDS === */
.settings-screen{background:radial-gradient(circle at 70% 15%,rgba(82,61,150,.18),transparent 35%),linear-gradient(135deg,#080a13,#0d0b18 55%,#07070d);color:#f5f2ff;overflow:auto}.settings-shell{width:min(1050px,calc(100% - 64px));margin:0 auto;padding:54px 0 80px}.settings-header{display:flex;align-items:center;gap:22px;padding-bottom:28px;border-bottom:1px solid rgba(210,205,255,.14)}.settings-header h1{margin:4px 0 0;font:500 clamp(34px,4vw,58px)/1 Georgia,serif;letter-spacing:.12em}.settings-back{width:48px;height:48px;border:1px solid rgba(205,198,255,.24);background:rgba(13,12,25,.65);color:#fff;font-size:25px;cursor:pointer}.settings-tabs{display:flex;gap:4px;margin-top:30px;border-bottom:1px solid rgba(210,205,255,.12)}.settings-tab{position:relative;padding:15px 28px;border:0;background:transparent;color:#858296;font:700 12px/1 Arial,sans-serif;letter-spacing:.18em;cursor:pointer}.settings-tab.active{color:#fff}.settings-tab.active::after{content:"";position:absolute;left:15px;right:15px;bottom:-1px;height:2px;background:#a78cff;box-shadow:0 0 14px #7d63ff}.settings-content{padding-top:38px}.settings-pane{display:none;max-width:820px}.settings-pane.active{display:block}.settings-pane h2{font:500 30px/1.1 Georgia,serif;letter-spacing:.08em;margin:7px 0 28px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:35px;padding:25px 0;border-top:1px solid rgba(210,205,255,.11);border-bottom:1px solid rgba(210,205,255,.11)}.setting-row strong{display:block;font:700 13px Arial,sans-serif;letter-spacing:.12em}.setting-row small{display:block;margin-top:7px;color:#918da1}.volume-control{display:flex;align-items:center;gap:16px;min-width:330px}.volume-control input{width:260px;accent-color:#9d7cff}.volume-control output{width:48px;text-align:right;color:#d9d2ff;font:700 12px Arial,sans-serif}.settings-pane .account-action{margin:4px 0 28px}.settings-pane .danger-zone{max-width:620px}.friends-dock-button{top:24px!important;right:26px!important;width:52px!important;height:52px!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:rgba(7,8,17,.78)!important;border:1px solid rgba(221,218,255,.28)!important;backdrop-filter:blur(14px);box-shadow:0 8px 28px rgba(0,0,0,.35)!important;transform:none!important}.friends-dock-button svg{width:24px;height:24px;fill:none;stroke:#f7f5ff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.friends-dock-button:hover,.friends-dock-button[aria-expanded="true"]{background:rgba(35,27,59,.92)!important;border-color:rgba(182,153,255,.72)!important;box-shadow:0 0 22px rgba(138,104,255,.25),0 8px 28px rgba(0,0,0,.35)!important}.friends-online-count{display:none!important}.friends-dock-button.has-attention::after{top:-3px!important;right:-3px!important;min-width:18px!important;height:18px!important}.friends-sidebar{top:0!important;right:0!important;height:100vh!important;width:min(360px,100vw)!important;padding-top:0!important}.friends-sidebar.open{transform:translateX(0)!important}.friends-head{padding-top:24px!important}.friends-dock-button[aria-expanded="true"]{right:376px!important}.friends-dock-button[aria-expanded="true"]::before{content:"";position:absolute;inset:-8px}.friends-sidebar .friends-panel{min-height:100vh!important}@media(max-width:700px){.settings-shell{width:calc(100% - 32px);padding-top:28px}.setting-row{align-items:flex-start;flex-direction:column}.volume-control{min-width:0;width:100%}.volume-control input{width:100%}.friends-dock-button[aria-expanded="true"]{right:12px!important;z-index:12010!important}.friends-sidebar{width:100vw!important}}

/* === UX HOTFIX 2026-09-26: FRIENDS DRAWER + ACCOUNT ACTION WIDTH === */
/* Closed state: compact circular social button fixed at the top-right. */
.friends-dock-button {
  top: 24px !important;
  right: 24px !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  transform: none !important;
}
.friends-dock-button svg {
  width: 23px !important;
  height: 23px !important;
}
/* Open state: drawer starts at the very top and visually replaces the button. */
.friends-sidebar {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100vh !important;
  width: min(390px, 100vw) !important;
  z-index: 12000 !important;
}
.friends-sidebar.open {
  transform: translateX(0) !important;
}
.friends-sidebar .friends-panel {
  min-height: 100vh !important;
  height: 100% !important;
}
.friends-dock-button[aria-expanded="true"] {
  visibility: hidden !important;
  pointer-events: none !important;
}
/* Keep the drawer close button usable above all drawer content. */
.friends-sidebar.open .friends-head > button {
  position: relative;
  z-index: 2;
}
/* Account actions share the same visual column width. */
.settings-pane[data-settings-pane="account"] .account-action,
.settings-pane[data-settings-pane="account"] .danger-zone {
  width: min(620px, 100%) !important;
  max-width: 620px !important;
  box-sizing: border-box !important;
}
.settings-pane[data-settings-pane="account"] .account-action {
  display: block !important;
}
@media (max-width: 700px) {
  .friends-dock-button {
    top: 16px !important;
    right: 16px !important;
  }
  .friends-sidebar {
    width: 100vw !important;
  }
}


/* === FRIENDS MAIN-MENU-ONLY FIX 2026-09-26 === */
/* Must beat the dock button's display:grid !important rule. */
#friends-button.friends-ui-hidden,
#friends-overlay.friends-ui-hidden {
  display: none !important;
}

/* === FRIENDS DRAWER FLUSH TO VIEWPORT TOP — 2026-09-26 === */
/* Override older main-menu-specific rules (top:74/78px; right:26px). */
body:has(#main-menu.active) #friends-overlay.friends-sidebar,
body:has(#main-menu.active) .friends-sidebar {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100vh !important;
}

/* === FRIEND BUTTON PERFECT CIRCLE FINAL FIX — 2026-09-27 === */
/* Older main-menu rules set min-width:190px; override every sizing axis here. */
body:has(#main-menu.active) #friends-button.friends-dock-button {
  box-sizing: border-box !important;
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  aspect-ratio: 1 / 1 !important;
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
  font-size: 0 !important;
  overflow: visible !important;
  transform: none !important;
}
body:has(#main-menu.active) #friends-button.friends-dock-button svg {
  width: 23px !important;
  height: 23px !important;
  margin: 0 !important;
  flex: 0 0 23px !important;
}
body:has(#main-menu.active) #friends-button.friends-dock-button[aria-expanded="true"] {
  display: none !important;
}


/* ============================================================
   SEASON KNIGHTLY — ONLINE PLAYER BATTLE THEME
   Only applied when fighting another player.
============================================================ */
#battle-screen.player-duel-theme {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 50% 18%, rgba(255,223,152,.16), transparent 23%),
        radial-gradient(circle at 50% 110%, rgba(70,88,126,.30), transparent 34%),
        linear-gradient(180deg, #10131b 0%, #141926 42%, #0a0d14 100%);
}

#battle-screen.player-duel-theme::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 16%, rgba(255,233,179,.14), transparent 16%),
        linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.34)),
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,.02) 0 1px,
            transparent 1px 108px
        );
    opacity: .95;
}

#battle-screen.player-duel-theme::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at center, transparent 0 26%, rgba(191,153,84,.08) 26.2%, transparent 27%),
        linear-gradient(90deg, transparent 49.6%, rgba(191,153,84,.14) 50%, transparent 50.4%),
        linear-gradient(0deg, transparent 49.6%, rgba(191,153,84,.12) 50%, transparent 50.4%);
    mix-blend-mode: screen;
    opacity: .55;
}

#battle-screen.player-duel-theme .battle-topbar {
    border-bottom: 1px solid rgba(200,171,109,.32);
    background:
        linear-gradient(180deg, rgba(32,37,50,.92), rgba(15,18,28,.94));
    box-shadow:
        0 14px 30px rgba(0,0,0,.34),
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 -1px 0 rgba(185,149,84,.18);
}

#battle-screen.player-duel-theme .battle-topbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(219,191,124,.8), transparent);
    opacity: .65;
    pointer-events: none;
}

#battle-screen.player-duel-theme .battle-exit-button {
    width: auto;
    min-width: 84px;
    padding: 0 14px;
    border-color: rgba(200,171,109,.35);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(62,26,28,.94), rgba(33,14,18,.96));
    color: rgba(247,231,208,.9);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 10px 18px rgba(0,0,0,.22);
}

#battle-screen.player-duel-theme .battle-exit-button:hover {
    border-color: rgba(233,204,139,.7);
    color: #fff8e8;
    background:
        linear-gradient(180deg, rgba(93,37,42,.96), rgba(51,20,24,.98));
}

#battle-screen.player-duel-theme .round-display span,
#battle-screen.player-duel-theme .action-label,
#battle-screen.player-duel-theme .side-energy-label,
#battle-screen.player-duel-theme .side-energy-gauge small {
    color: rgba(226,205,164,.68);
}

#battle-screen.player-duel-theme .round-display strong,
#battle-screen.player-duel-theme #turn-indicator,
#battle-screen.player-duel-theme #selected-character,
#battle-screen.player-duel-theme .side-energy-gauge strong,
#battle-screen.player-duel-theme .ability-name {
    color: #f9edd0;
    text-shadow: 0 1px 10px rgba(0,0,0,.34);
}

#battle-screen.player-duel-theme .turn-decoration {
    background: linear-gradient(90deg, transparent, rgba(232,206,142,.8));
}

#battle-screen.player-duel-theme .battle-arena {
    background-image: url("assets/images/arena-background.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#battle-screen.player-duel-theme .battle-arena::before {
    width: min(1180px,82vw);
    height: 3px;
    background:
        linear-gradient(90deg, transparent, rgba(223,194,131,.72) 18%, rgba(248,231,179,.92) 50%, rgba(223,194,131,.72) 82%, transparent);
    box-shadow:
        0 0 18px rgba(230,203,146,.36),
        0 0 36px rgba(230,203,146,.16);
}

#battle-screen.player-duel-theme .battle-center::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(220px, 24vw, 340px);
    height: clamp(220px, 24vw, 340px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(213,183,122,.18);
    box-shadow: inset 0 0 40px rgba(255,238,191,.05), 0 0 44px rgba(0,0,0,.2);
    opacity: .6;
    pointer-events: none;
}

#battle-screen.player-duel-theme .battle-team {
    filter: drop-shadow(0 18px 24px rgba(0,0,0,.18));
}

#battle-screen.player-duel-theme .battle-card {
    border: 1px solid rgba(198,171,112,.34);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(68,73,86,.18), rgba(17,20,28,.82)),
        linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.008));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 0 0 1px rgba(235,210,157,.07),
        0 16px 40px rgba(0,0,0,.42);
}

#battle-screen.player-duel-theme .battle-card-image-wrapper {
    border: 1px solid rgba(223,196,138,.24);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(10,11,16,.5), rgba(4,4,6,.8));
    box-shadow: 0 10px 26px rgba(0,0,0,.46);
}

#battle-screen.player-duel-theme .dynamic-stat {
    border: 1px solid rgba(244,224,173,.84);
    background:
        radial-gradient(circle at 35% 28%, #79603f, #2d2418 70%, #140f0a 100%);
    color: #fff7e4;
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,.16),
        0 4px 12px rgba(0,0,0,.85),
        0 0 14px rgba(224,190,121,.18);
}

#battle-screen.player-duel-theme .selectable-fighter:hover,
#battle-screen.player-duel-theme .battle-card.selected {
    border-color: rgba(245,220,155,.74) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 18px 48px rgba(0,0,0,.56),
        0 0 26px rgba(224,190,121,.18) !important;
}

#battle-screen.player-duel-theme .battle-card.selected .battle-card-image-wrapper {
    border-color: rgba(255,229,168,.92);
    box-shadow: 0 0 26px rgba(245,210,139,.24);
}

#battle-screen.player-duel-theme .side-energy-gauge {
    border-color: rgba(202,173,114,.34);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(31,36,49,.94), rgba(11,13,20,.95));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        inset 0 0 0 1px rgba(222,194,135,.05),
        0 18px 45px rgba(0,0,0,.46);
}

#battle-screen.player-duel-theme .player-energy-gauge {
    border-left: 3px solid rgba(92,122,198,.65);
}

#battle-screen.player-duel-theme .enemy-energy-gauge {
    border-right: 3px solid rgba(163,67,74,.68);
}

#battle-screen.player-duel-theme .energy-segments {
    border-color: rgba(220,194,139,.22);
    background:
        linear-gradient(180deg, rgba(0,0,0,.28), rgba(255,255,255,.03));
    box-shadow:
        inset 0 0 16px rgba(0,0,0,.7),
        0 0 18px rgba(0,0,0,.12);
}

#battle-screen.player-duel-theme .player-energy-gauge .energy-segments::after {
    background: linear-gradient(0deg, rgba(79,108,181,.98), rgba(178,202,255,.98));
    box-shadow: 0 0 18px rgba(130,168,255,.34), inset 0 0 8px rgba(255,255,255,.24);
}

#battle-screen.player-duel-theme .enemy-energy-gauge .energy-segments::after {
    background: linear-gradient(0deg, rgba(125,42,48,.98), rgba(255,156,165,.98));
    box-shadow: 0 0 18px rgba(255,110,120,.28), inset 0 0 8px rgba(255,255,255,.18);
}

#battle-screen.player-duel-theme .battle-message {
    padding: 12px 22px;
    border: 1px solid rgba(210,181,121,.32);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(45,50,64,.78), rgba(19,22,31,.82));
    color: #f6ead0;
    letter-spacing: .06em;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 14px 30px rgba(0,0,0,.34);
}

#battle-screen.player-duel-theme .action-panel {
    border-top: 1px solid rgba(200,171,109,.24);
    background:
        linear-gradient(180deg, rgba(31,36,49,.94), rgba(11,13,20,.96));
    box-shadow:
        0 -15px 40px rgba(0,0,0,.4),
        inset 0 1px 0 rgba(255,255,255,.06),
        inset 0 2px 0 rgba(225,198,141,.05);
}

#battle-screen.player-duel-theme .ability-button {
    border: 1px solid rgba(197,170,112,.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(59,65,81,.34), rgba(18,21,30,.92));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        inset 0 0 0 1px rgba(244,219,160,.03),
        0 8px 20px rgba(0,0,0,.22);
}

#battle-screen.player-duel-theme .ability-button::after {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(241,213,150,.92), transparent);
}

#battle-screen.player-duel-theme .ability-button:hover:not(:disabled) {
    border-color: rgba(240,211,149,.55);
    background:
        linear-gradient(180deg, rgba(84,91,109,.45), rgba(29,33,46,.95));
    box-shadow: 0 10px 26px rgba(0,0,0,.32);
}

#battle-screen.player-duel-theme .ability-button.selected-ability {
    border-color: rgba(251,225,160,.76);
    background:
        linear-gradient(180deg, rgba(97,76,34,.52), rgba(41,32,18,.96));
    box-shadow:
        0 0 26px rgba(220,190,123,.18),
        0 8px 22px rgba(0,0,0,.26);
}

#battle-screen.player-duel-theme .ability-cost {
    color: rgba(236,218,183,.72);
}

@media (max-width: 760px) {
    #battle-screen.player-duel-theme .battle-message {
        padding: 10px 16px;
    }
}


.starter-shield { color:#70c8f5; background:#101925; padding:3px; border:1px solid #70c8f5; }

/* Printed stat numbers have different positions on the starter card frames. */
#battle-screen .starter-stat-layout .dynamic-stat,
.hq-card-inspection.starter-stat-layout .hq-inspection-stat {
    top:var(--stat-y) !important; width:var(--stat-w) !important;
}
#battle-screen .starter-stat-layout .dynamic-atk,
.hq-card-inspection.starter-stat-layout .hq-inspection-atk { left:var(--stat-atk-x) !important; right:auto !important; }
#battle-screen .starter-stat-layout .dynamic-hp,
.hq-card-inspection.starter-stat-layout .hq-inspection-hp { left:var(--stat-hp-x) !important; right:auto !important; }

/* Shield decoration stays outside artwork and never intercepts card clicks. */
#battle-screen .shield-protected .battle-card-image-wrapper { overflow:visible; isolation:isolate; }
.card-shield-barrier { position:absolute; inset:-5px; border:2px solid #79d9ff; border-radius:18px; pointer-events:none; z-index:11; box-shadow:0 0 9px #48bcff,0 0 22px #2693e870,inset 0 0 12px #59ceff44; background:linear-gradient(135deg,#8ee5ff20,transparent 14%,transparent 86%,#5dcfff20); }
.card-shield-barrier::after { content:''; position:absolute; inset:3px; border:1px solid #b8efff66; border-radius:14px; }
.card-shield-hp { position:absolute; left:50%; top:0; transform:translate(-50%,-100%); z-index:14; display:flex; align-items:center; justify-content:center; gap:4px; padding:3px 9px; min-width:52px; border:1px solid #79d9ff; border-bottom:0; border-radius:16px 16px 0 0; background:linear-gradient(180deg,#143d67,#071626); color:#d5f5ff; font-size:clamp(10px,.85vw,16px); font-weight:800; line-height:1.1; box-shadow:0 0 10px #45bfff88,inset 0 0 6px #71d6ff33; pointer-events:none; }
/* Shield HP tab is attached to the frame, without masking the card itself. */
#battle-screen .shield-protected { overflow:visible; }
#battle-screen .shield-protected .card-shield-hp { box-shadow:0 -3px 10px #45bfff66,inset 0 0 6px #71d6ff33; }
/* Concave, outward-sweeping lower corners connect the raised tab to the frame. */
#battle-screen .shield-protected .card-shield-hp::before,
#battle-screen .shield-protected .card-shield-hp::after {
    content:''; position:absolute; top:calc(100% - 1px);
    width:12px; height:12px; pointer-events:none;
    border-top:1px solid #79d9ff;
}
#battle-screen .shield-protected .card-shield-hp::before {
    right:100%; border-right:1px solid #79d9ff;
    border-top-right-radius:12px;
    box-shadow:4px -4px 6px -6px #45bfff;
}
#battle-screen .shield-protected .card-shield-hp::after {
    left:100%; border-left:1px solid #79d9ff;
    border-top-left-radius:12px;
    box-shadow:-4px -4px 6px -6px #45bfff;
}
.card-shield-hp svg { width:16px; height:19px; color:#81dcff; flex-shrink:0; }
@media(max-width:700px){.card-shield-hp{padding:2px 5px;min-width:38px;font-size:10px;gap:2px}.card-shield-hp svg{width:12px;height:14px}.card-shield-barrier{inset:-3px}}

/* Final layout rules: viewport height and width both constrain the interface. */
html, body, #game { height:100%; min-height:0; }
#main-menu.active, #battle-screen.active { height:100dvh; min-height:0; }
#main-menu { overflow:auto !important; }
#main-menu .main-menu-content {
    position:relative !important; inset:auto !important; min-height:100% !important;
    width:min(500px,90vw) !important; max-width:100% !important;
    padding:clamp(12px,3dvh,32px) clamp(20px,4vw,70px) 18px !important;
    gap:clamp(8px,2dvh,24px) !important; overflow:visible !important;
}
#main-menu .game-title-container { width:100% !important; margin:0 !important; padding:0 !important; }
#main-menu .rift-main-logo { width:100% !important; max-width:380px !important; max-height:23dvh !important; object-position:left center !important; }
#main-menu .main-navigation { width:100% !important; min-width:0 !important; padding-left:clamp(10px,2vw,24px) !important; gap:0 !important; }
#main-menu .menu-button, #main-menu .menu-button-primary {
    height:clamp(44px,11dvh,90px) !important; min-height:0 !important;
    padding:0 12px !important; grid-template-columns:auto minmax(0,1fr) auto !important;
}
#main-menu .menu-button-content { min-width:0; }
#main-menu .menu-button-content strong { font-size:clamp(16px,2.6dvh,26px) !important; }
#main-menu .menu-button-content small { margin-top:clamp(3px,.7dvh,8px) !important; font-size:clamp(10px,1.6dvh,13px) !important; }
#main-menu .menu-footer { position:static !important; margin-top:auto !important; padding-top:6px; font-size:10px !important; }
#battle-screen.active { display:grid !important; grid-template-rows:clamp(40px,7dvh,58px) minmax(0,1fr) !important; overflow:hidden; }
#battle-screen .battle-topbar { min-height:0 !important; height:100% !important; padding:4px clamp(6px,2vw,24px) !important; }
#battle-screen .battle-arena {
    display:grid !important; min-height:0 !important; height:100% !important;
    grid-template-rows:minmax(0,1fr) clamp(36px,6dvh,54px) minmax(0,1fr) !important;
    row-gap:6px; padding:12px 0 6px !important; overflow:hidden;
}
#battle-screen .battle-team {
    align-self:stretch !important; align-items:center !important; justify-content:center !important;
    height:100% !important; min-height:0 !important; padding:12px 0 0 !important;
    width:calc(100% - clamp(92px,14vw,190px)) !important;
    gap:clamp(6px,2vw,38px) !important; margin:0 auto !important;
}
#battle-screen .enemy-team { grid-row:1 !important; }
#battle-screen .player-team { grid-row:3 !important; }
#battle-screen .battle-center { grid-row:2 !important; min-height:0; height:100%; align-self:center !important; z-index:2; }
#battle-screen .battle-message { max-width:calc(100vw - 110px); margin:0 auto; padding:6px 12px !important; font-size:clamp(10px,1.5dvh,15px) !important; line-height:1.2; overflow-wrap:anywhere; }
#battle-screen .battle-center::before { display:none !important; }
#battle-screen .battle-card { width:var(--responsive-card-width,120px) !important; min-width:0 !important; max-width:none !important; flex:0 0 var(--responsive-card-width,120px) !important; padding:3px !important; transform:none !important; }
#battle-screen .battle-card-image-wrapper { aspect-ratio:2 / 3 !important; }
#battle-screen .active-effects { min-height:18px !important; margin-top:3px !important; max-height:42px; overflow-y:auto; display:flex !important; flex-wrap:wrap !important; position:static !important; width:100% !important; }
#battle-screen .effect-chip { min-height:16px !important; font-size:clamp(7px,1.05dvh,10px) !important; padding:2px 4px !important; line-height:1.1; }
#battle-screen .side-energy-gauge { width:clamp(34px,5vw,64px) !important; height:min(64dvh,540px) !important; min-height:0 !important; padding:8px 4px !important; gap:5px !important; }
#battle-screen .player-energy-gauge { left:6px !important; }
#battle-screen .enemy-energy-gauge { right:6px !important; }
#battle-screen .action-panel { max-height:calc(100dvh - 80px) !important; overflow-y:auto !important; }
.screen.active:not(#main-menu):not(#battle-screen) { overflow-y:auto; overflow-x:hidden; min-width:0; }
.collection-tools { min-width:0; }
@media(max-width:600px){
    #main-menu .main-menu-content { width:min(410px,100vw) !important; padding-right:66px !important; }
    #battle-screen .battle-topbar { gap:5px !important; }
    #battle-screen .round-display, #battle-screen .turn-indicator { font-size:10px !important; }
    #collection-grid.collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
    .settings-tabs { flex-wrap:wrap; }
}
@media(max-height:420px){
    #main-menu .rift-main-logo { max-height:19dvh !important; }
    #main-menu .main-menu-content { gap:6px !important; padding-top:8px !important; }
    #main-menu .menu-button, #main-menu .menu-button-primary { height:44px !important; }
    #battle-screen .battle-arena { row-gap:3px; padding-top:8px !important; }
}

/* Use the full formation height; retain the central message gap. */
#battle-screen .battle-team { padding-top:4px !important; }
#battle-screen .battle-arena { padding-top:8px !important; row-gap:4px; }
#battle-screen .battle-card { min-height:0 !important; height:auto !important; }
/* Anchor the menu to the left even when its parent uses centered flex layout. */
#main-menu .main-menu-content {
    position:absolute !important; inset:0 auto 0 0 !important;
    margin:0 !important; transform:none !important;
    width:clamp(320px,30vw,480px) !important; max-width:100vw !important;
    padding-left:clamp(24px,3.5vw,64px) !important;
    padding-right:20px !important;
    align-items:flex-start !important; text-align:left !important;
}
#main-menu .main-navigation { max-width:100% !important; flex:none !important; margin:0 !important; }
#main-menu .game-title-container { max-width:100% !important; align-self:flex-start !important; }
#main-menu .menu-button, #main-menu .menu-button-primary { max-width:100% !important; box-sizing:border-box !important; }
@media(max-width:600px){#main-menu .main-menu-content{width:min(370px,100vw) !important;padding-left:20px !important;padding-right:60px !important;}}

.training-mode .mode-kicker,.training-mode .mode-state {color:#83dfca;}
.training-mode{border-color:rgba(131,223,202,.3);}
#mode-screen .mode-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
#mode-screen .game-mode-card {min-height:clamp(180px,26vh,300px);padding:28px 22px;}
@media(max-width:680px){#mode-screen .mode-grid{grid-template-columns:1fr;}}
/* Match introduction and named turns: animation layers do not resize the board. */
.versus-intro {position:fixed;inset:0;z-index:13000;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-content:center;align-items:center;gap:clamp(12px,4vw,70px);padding:30px 7vw;background:radial-gradient(ellipse at 25% 50%,#213e6699,transparent 55%),radial-gradient(ellipse at 75% 50%,#69283399,transparent 55%),#060a14f5;animation:versus-fade 2.1s both;pointer-events:auto;}
.versus-caption {position:absolute;top:20%;left:0;right:0;text-align:center;color:#d1b67f;letter-spacing:.5em;font:600 12px Arial;}
.versus-player {min-width:0;padding:28px 12px;border-top:1px solid #c7a26777;border-bottom:1px solid #c7a26777;}
.versus-player small {display:block;color:#9fbad9;font:700 10px Arial;letter-spacing:.25em;margin-bottom:12px;}
.versus-player strong {display:block;color:#ecf5ff;font:700 clamp(20px,4.5vw,68px)/1.15 Georgia,serif;overflow-wrap:anywhere;text-shadow:0 0 28px #7ca9fa88;}
.versus-player-left {text-align:right;animation:versus-slide-left .6s cubic-bezier(.16,1,.3,1) both;}
.versus-player-right {text-align:left;animation:versus-slide-right .6s cubic-bezier(.16,1,.3,1) both;}
.versus-player-right strong {text-shadow:0 0 28px #ff6c8388;}.versus-player-right small{color:#e4a5af;}
.versus-mark {font:italic 800 clamp(30px,7vw,105px) Georgia,serif;color:#ffe1a1;text-shadow:0 0 35px #d4a04c99;animation:versus-mark-in .7s .2s both;}
.named-turn-banner {position:fixed;left:50%;top:42%;transform:translate(-50%,-50%);z-index:12500;width:min(640px,86vw);padding:16px 28px;text-align:center;background:linear-gradient(90deg,transparent,#101e32f5 20%,#101e32f5 80%,transparent);border-block:1px solid #97c5ff77;pointer-events:none;animation:named-turn 3s both;}
.named-turn-banner small {display:block;color:#99caff;font:700 9px Arial;letter-spacing:.4em;margin-bottom:6px;}
.named-turn-banner strong {display:block;color:#f3f8ff;font:600 clamp(18px,3vw,36px)/1.2 Georgia,serif;overflow-wrap:anywhere;}
.named-turn-opponent{background:linear-gradient(90deg,transparent,#32131ff5 20%,#32131ff5 80%,transparent);border-color:#fca6b577;}.named-turn-opponent small{color:#ffa6b5;}
@keyframes versus-fade{0%{opacity:0}12%,85%{opacity:1}100%{opacity:0}}
@keyframes versus-slide-left{from{opacity:0;transform:translateX(-90px)}to{opacity:1;transform:none}}
@keyframes versus-slide-right{from{opacity:0;transform:translateX(90px)}to{opacity:1;transform:none}}
@keyframes versus-mark-in{from{opacity:0;transform:scale(1.8)}to{opacity:1;transform:scale(1)}}
@keyframes named-turn{0%{opacity:0;transform:translate(-60%,-50%)}20%,72%{opacity:1;transform:translate(-50%,-50%)}100%{opacity:0;transform:translate(-40%,-50%)}}
@media(prefers-reduced-motion:reduce){.versus-player,.versus-mark{animation:none}.versus-intro{animation:none}.named-turn-banner{animation:none}}

#turn-indicator {max-width:45vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* Beta Season 2: the puppet choice happens before the turn is committed. */
.s2-choice-dialog{background:#14101d;color:#f4effa;border:1px solid #9c76b9;border-radius:1rem;padding:1.3rem;width:min(34rem,90vw);max-height:85vh;overflow:auto;box-shadow:0 1rem 4rem #000b}
.s2-choice-dialog::backdrop{background:#000b}
.s2-choice-dialog h2{margin:0 0 .7rem;font-size:1.3rem}
.s2-choice-dialog p{line-height:1.5}
.s2-choice-dialog button{display:block;width:100%;text-align:left;margin:.5rem 0;padding:.75rem;background:#2b2039;border:1px solid #68517d;border-radius:.5rem;color:white;cursor:pointer}

.s2-puppet-dialog{width:min(42rem,92vw);}
.s2-puppet-dialog .s2-puppet-actions{margin:.9rem 0;}
.s2-puppet-dialog .ability-button{min-height:5rem;text-align:left;}
.s2-puppet-dialog .ability-button strong,.s2-puppet-target strong{display:block;font-size:1rem;margin-bottom:.3rem;}
.s2-puppet-dialog .ability-button span,.s2-puppet-target span{display:block;font-size:.78rem;opacity:.78;line-height:1.4;}
.s2-puppet-dialog .s2-puppet-targets{display:grid;grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));gap:.6rem;margin:.9rem 0;}
.s2-puppet-dialog .s2-puppet-target{min-height:4.3rem;text-align:left;}
.s2-puppet-dialog .s2-puppet-cancel{width:auto;display:inline-block;margin:.4rem .4rem 0 0;padding:.55rem .8rem;background:#201a29;border-color:#5b4a69;}
.s2-choice-dialog button:hover,.s2-choice-dialog button:focus-visible{background:#49305e;outline:2px solid #d8b4f0}
@media(max-width:520px){.s2-puppet-dialog .s2-puppet-actions{grid-template-columns:1fr}.s2-puppet-dialog .s2-puppet-targets{grid-template-columns:1fr 1fr}}


/* Disabled cards remain discoverable, but cannot be used in any team. */
.collection-card.card-unavailable{position:relative;filter:grayscale(1);opacity:.6;}
.team-card.card-unavailable{cursor:not-allowed!important;}
.collection-card.card-unavailable:hover{transform:none;box-shadow:none;}
.card-unavailable-label{position:absolute;left:.4rem;right:.4rem;top:.5rem;padding:.35rem;background:#111e;color:#eee;border:1px solid #888;text-align:center;font-size:.65rem;letter-spacing:.1em;pointer-events:none;}
.card-unavailable-preview{filter:grayscale(1);opacity:.7;}

/* ============================================================
   COLLECTION — EDITION / REALITY CASCADING FILTERS
============================================================ */
#collection-screen .collection-filter-group {
    display: grid;
    gap: 9px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    color: rgba(255,255,255,.48);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .20em;
}
#collection-screen .collection-filter-group[hidden] { display: none !important; }
#collection-screen .collection-filter-group legend { margin: 0 0 3px; padding: 0; }
/* Standard / Alternative: two full-width tab buttons under the header. */
#collection-screen .collection-edition-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}
#collection-screen .edition-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(210,180,255,.18);
    border-radius: 5px;
    color: rgba(255,255,255,.62);
    background: rgba(15,12,20,.45);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
#collection-screen .edition-tab:hover {
    color: rgba(255,255,255,.92);
    border-color: rgba(190,140,245,.38);
}
#collection-screen .edition-tab:has(input:checked) {
    color: rgba(250,240,255,1);
    border-color: rgba(205,165,255,.85);
    background: linear-gradient(135deg, rgba(120,65,190,.42), rgba(185,115,255,.22));
    box-shadow: 0 0 18px rgba(165,95,255,.28), inset 0 0 12px rgba(255,255,255,.05);
}
#collection-screen .edition-tab:has(input:focus-visible) {
    outline: 2px solid rgba(205,165,255,.9);
    outline-offset: 2px;
}
#collection-screen .edition-tab input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
@media (max-width: 680px) {
    #collection-screen .edition-tab { min-height: 44px; font-size: 11px; letter-spacing: .12em; }
    #collection-screen .rarity-checkboxes { gap: 4px 8px; }
}

/* ============================================================
   COLLECTION V2 — STACKED LAYOUT
   Edition tabs → search bar → rarity row → realities row
   (Alternative only) → cards. Replaces the old left sidebar.
============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#collection-screen .collection-content {
    gap: 18px;
}

#collection-screen .collection-filters {
    display: flex;
    flex-direction: column;
    width: 100%;
}
#collection-screen .collection-filters > .collection-filter-group {
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-top: 1px solid rgba(185,135,245,.20);
    text-align: left;
}
#collection-screen .collection-filters > .collection-filter-group:last-child:not([hidden]) {
    border-bottom: 1px solid rgba(185,135,245,.20);
}
#collection-screen .collection-filters > .collection-filter-group[hidden] {
    display: none !important;
}
#collection-screen .collection-filters .rarity-checkboxes,
#collection-screen .collection-filters .reality-checkboxes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px 12px;
}

#collection-screen #collection-grid.collection-grid {
    margin-top: 12px;
}

@media (max-width: 680px) {
    #collection-screen .collection-content { gap: 14px; }
    #collection-screen .collection-filters > .collection-filter-group { padding: 8px 6px; }
}

/* Realities row: single line, scrolls left/right (mouse wheel, touch, drag of the bar). */
#collection-screen .collection-filters .reality-checkboxes {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(185,135,245,.45) transparent;
    padding-bottom: 4px;
}
#collection-screen .collection-filters .reality-checkboxes::-webkit-scrollbar { height: 4px; }
#collection-screen .collection-filters .reality-checkboxes::-webkit-scrollbar-thumb {
    background: rgba(185,135,245,.45);
    border-radius: 2px;
}
#collection-screen .collection-filters .reality-checkboxes .rarity-check {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ============================================================
   COLLECTION V2.1 — SLANTED STANDARD / ALTERNATIVE TABS
   Not rectangles: the seam between the two tabs is a "/" diagonal.
============================================================ */
#collection-screen .collection-edition-tabs {
    --tab-h: 52px;
    --slant: 16px;
    --slant-angle: 17deg; /* atan(slant / tab-h) */
    position: relative;
    gap: 0;
}
#collection-screen .collection-edition-tabs .edition-tab {
    min-height: var(--tab-h);
    border-radius: 0;
}
#collection-screen .collection-edition-tabs .edition-tab:first-child {
    border-right: 0;
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
#collection-screen .collection-edition-tabs .edition-tab:last-child {
    border-left: 0;
    margin-left: calc(-1 * var(--slant));
    clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%);
}
/* The diagonal line itself, drawn over both tabs. */
#collection-screen .collection-edition-tabs::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - var(--slant) / 2);
    width: 1px;
    background: rgba(205,165,255,.55);
    transform: skewX(calc(-1 * var(--slant-angle)));
    pointer-events: none;
}
/* clip-path would cut the outer glow, so the active tab keeps only its inner glow. */
#collection-screen .edition-tab:has(input:checked) {
    box-shadow: inset 0 0 14px rgba(255,255,255,.06), inset 0 -2px 0 rgba(205,165,255,.85);
}
@media (max-width: 680px) {
    #collection-screen .collection-edition-tabs {
        --tab-h: 44px;
        --slant: 13px;
        --slant-angle: 16.5deg;
    }
}

/* ============================================================
   COLLECTION V2.2 — BIGGER TABS, FULL-WIDTH RARITY ROW
============================================================ */
#collection-screen .collection-edition-tabs {
    --tab-h: 66px;
    --slant: 22px;
    --slant-angle: 18.4deg; /* atan(22 / 66) */
}
#collection-screen .collection-edition-tabs .edition-tab {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .24em;
}
/* Rarities spread over the whole row width. */
#collection-screen .collection-filters #collection-rarity {
    justify-content: space-between;
}
@media (max-width: 680px) {
    #collection-screen .collection-edition-tabs {
        --tab-h: 54px;
        --slant: 16px;
        --slant-angle: 16.5deg; /* atan(16 / 54) */
    }
    #collection-screen .collection-edition-tabs .edition-tab {
        font-size: 13px;
        letter-spacing: .16em;
    }
}

/* ============================================================
   MODE SELECT V2 — SLANTED PARALLELOGRAM BAND
   Four "/" panels joined into one big parallelogram, thin slanted
   gaps between them (see the SELECT GAME MODE mockup).
============================================================ */
#mode-screen .mode-selection-content {
    padding: clamp(24px, 5vh, 70px) clamp(18px, 3vw, 60px);
}
#mode-screen .mode-grid {
    --slant: clamp(40px, 5.5vw, 96px);
    --seam: 6px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    width: min(1280px, 100%);
}
#mode-screen .game-mode-card {
    flex: 1 1 0;
    min-width: 0;
    min-height: clamp(300px, 52vh, 520px);
    padding: 28px calc(var(--slant) + 6px);
    border: 0;
    border-radius: 0;
    /* the card background is the 1px outline; ::before is the fill */
    background: rgba(211, 175, 242, .30);
    box-shadow: none;
    clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
#mode-screen .game-mode-card + .game-mode-card {
    margin-left: calc(var(--seam) - var(--slant));
}
#mode-screen .game-mode-card::before {
    inset: 1px;
    clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
    background:
        radial-gradient(circle at 50% 28%, rgba(188, 126, 232, .18), transparent 40%),
        linear-gradient(180deg, #2a1c36 0%, #0f0b14 100%);
}
#mode-screen .game-mode-card.available:hover {
    transform: translateY(-7px);
    background: rgba(220, 177, 255, .75);
    box-shadow: none;
}
#mode-screen .game-mode-card.training-mode { background: rgba(131, 223, 202, .38); }
#mode-screen .game-mode-card.training-mode.available:hover { background: rgba(131, 223, 202, .85); }
#mode-screen .game-mode-card strong {
    font-size: clamp(18px, 2.1vw, 32px);
    letter-spacing: .06em;
}
#mode-screen .game-mode-card .mode-description { max-width: 100%; }
#mode-screen .game-mode-card .mode-state { min-width: 0; width: 100%; max-width: 150px; }
#mode-screen .game-mode-card.unavailable::after {
    top: 14px;
    right: calc(var(--slant) + 8px);
}

@media (max-width: 850px) {
    #mode-screen .mode-selection-content { align-items: flex-start; overflow-y: auto; }
    #mode-screen .mode-grid {
        --slant: 28px;
        flex-direction: column;
        gap: 10px;
        max-width: 520px;
    }
    #mode-screen .game-mode-card {
        flex: 0 0 auto;
        min-height: 190px;
    }
    #mode-screen .game-mode-card + .game-mode-card { margin-left: 0; }
}

/* Mode select: same text baseline on every panel, band a bit narrower. */
#mode-screen .mode-grid { width: min(1120px, 100%); }
#mode-screen .game-mode-card {
    justify-content: flex-start;
    padding-top: clamp(56px, 15vh, 130px);
}

/* ============================================================
   MODE SELECT V2.1 — TOP 2/3 = IMAGE, BOTTOM 1/3 = TEXT
   Drop an <img class="mode-art" src="..." alt=""> as the first child of a
   .game-mode-card to fill the top two thirds (it is clipped to the slant).
============================================================ */
#mode-screen .mode-grid { --card-h: clamp(400px, 64vh, 620px); }
#mode-screen .game-mode-card {
    height: var(--card-h);
    min-height: 0;
    justify-content: flex-start;
    gap: 7px;
    /* text starts at the top of the bottom third */
    padding-top: calc(var(--card-h) * 2 / 3 + 8px);
    padding-bottom: 14px;
    /* centre the text on the slanted band at that height, not on the box */
    padding-left: 12px;
    padding-right: calc(12px + var(--slant) * .7);
}
#mode-screen .game-mode-card .mode-description { min-height: 0; }
#mode-screen .game-mode-card .mode-state {
    margin-top: 6px;
    padding: 8px 14px;
}
#mode-screen .game-mode-card .mode-art {
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: calc(var(--card-h) * 2 / 3);
    width: calc(100% - 2px);
    object-fit: cover;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
            mask-image: linear-gradient(to bottom, #000 78%, transparent);
}
@media (max-width: 850px) {
    #mode-screen .mode-grid { --card-h: 300px; }
}

/* ============================================================
   COLLECTION V2.3 — SORT SELECT (replaces the big search bar)
============================================================ */
#collection-screen .collection-sort-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
}
#collection-screen .collection-sort-label {
    color: rgba(255,255,255,.48);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .22em;
    white-space: nowrap;
}
#collection-screen #collection-sort {
    width: min(320px, 100%);
    height: 42px;
    padding: 0 38px 0 14px;
    border: 1px solid rgba(210,180,255,.22);
    border-radius: 5px;
    outline: none;
    color: rgba(255,255,255,.9);
    background-color: rgba(15,12,20,.68);
    background-image: linear-gradient(45deg, transparent 50%, rgba(205,165,255,.8) 50%),
                      linear-gradient(135deg, rgba(205,165,255,.8) 50%, transparent 50%);
    background-position: calc(100% - 19px) 18px, calc(100% - 14px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .04em;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
#collection-screen #collection-sort:focus-visible {
    border-color: rgba(210,180,255,.6);
    box-shadow: 0 0 0 2px rgba(150,100,215,.18);
}
#collection-screen #collection-sort option { background: #100d15; color: #f0e8f8; }
@media (max-width: 680px) {
    #collection-screen .collection-sort-wrap { gap: 10px; }
    #collection-screen #collection-sort { flex: 1; width: auto; height: 40px; }
}

/* ============================================================
   COLLECTION V2.4 — SEARCH (narrower) + SORT ON ONE ROW
============================================================ */
#collection-screen .collection-toolbar {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2vw, 30px);
    width: 100%;
}
#collection-screen .collection-toolbar .collection-search-wrap {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 520px;
    margin: 0;
}
#collection-screen .collection-toolbar .collection-search-wrap input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(210,180,255,.18);
    border-radius: 5px;
    outline: none;
    font-size: 12px;
    color: rgba(255,255,255,.9);
    background: rgba(15,12,20,.68);
    backdrop-filter: blur(16px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 28px rgba(0,0,0,.25);
}
#collection-screen .collection-toolbar .collection-search-wrap input:focus {
    border-color: rgba(210,180,255,.5);
    box-shadow: 0 0 0 2px rgba(150,100,215,.10), 0 10px 28px rgba(0,0,0,.3);
}
#collection-screen .collection-toolbar .collection-sort-wrap { flex: 0 0 auto; }
@media (max-width: 680px) {
    #collection-screen .collection-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    #collection-screen .collection-toolbar .collection-search-wrap { max-width: none; }
    #collection-screen .collection-toolbar .collection-sort-wrap { width: 100%; }
}


/* ============================================================
   TEAM SCREEN V2 — LINEUP ON TOP, SEARCH + RARITIES, CARD LIST
   3 big slots, PLAY under the middle one, a search | rarities bar,
   then the cards (4 per row, rarity highest first). The top block
   stays visible while the list scrolls.
============================================================ */
#team-screen .team-selection-layout {
    display: block;
    flex: 0 0 auto;
    min-height: auto;
    padding: 0;
}

#team-screen .team-top {
    position: sticky;
    top: 0;
    z-index: 6;
    background: rgba(8, 7, 11, .94);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
}

#team-screen .team-lineup {
    --slot-h: clamp(170px, 30vh, 300px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 22px 20px 18px;
}

#team-screen .team-slots {
    display: flex;
    justify-content: center;
    gap: clamp(28px, 8vw, 130px);
}

#team-screen .team-slot {
    width: calc(var(--slot-h) * 2 / 3);
    height: auto;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(210, 180, 255, .20);
    border-radius: 6px;
    font-size: clamp(18px, 2.4vw, 32px);
    color: rgba(255, 255, 255, .22);
}
#team-screen .team-slot:has(img) {
    border-color: rgba(210, 180, 255, .55);
    box-shadow: 0 0 26px rgba(155, 105, 225, .22);
}

#team-screen .start-battle-button {
    width: clamp(200px, 24vw, 300px);
    height: 46px;
    margin-top: 0;
    font-size: 13px;
    letter-spacing: .26em;
}

#team-screen .team-toolbar {
    display: grid;
    grid-template-columns: minmax(200px, 29%) minmax(0, 1fr);
    align-items: stretch;
    min-height: 54px;
    border-top: 1px solid rgba(185, 135, 245, .22);
    border-bottom: 1px solid rgba(185, 135, 245, .22);
}

#team-screen .team-search-wrap {
    display: block;
    border-right: 1px solid rgba(185, 135, 245, .22);
}
#team-screen .team-search-wrap input {
    width: 100%;
    height: 100%;
    min-height: 54px;
    padding: 0 clamp(14px, 2vw, 28px);
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    letter-spacing: .06em;
}
#team-screen .team-search-wrap input:focus {
    background: rgba(145, 90, 210, .08);
}

#team-screen .team-rarity-wrap {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding: 0 clamp(10px, 2vw, 30px);
    border: 0;
}
#team-screen .rarity-checkboxes {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
}

#team-screen #team-card-grid.collection-grid {
    width: min(1180px, calc(100% - 2 * clamp(18px, 4vw, 60px)));
    max-height: none;
    margin: 28px auto 70px;
    overflow: visible;
    padding: 8px;
    align-self: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px clamp(16px, 2vw, 30px);
}

@media (max-width: 980px) {
    #team-screen #team-card-grid.collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    #team-screen .team-top { position: static; }
    #team-screen .team-lineup { --slot-h: 150px; gap: 12px; padding: 16px 12px 14px; }
    #team-screen .team-slots { gap: 12px; }
    #team-screen .team-toolbar { grid-template-columns: 1fr; }
    #team-screen .team-search-wrap { border-right: 0; border-bottom: 1px solid rgba(185, 135, 245, .22); }
    #team-screen .team-rarity-wrap { padding: 8px 10px; }
    #team-screen .rarity-checkboxes { gap: 4px 8px; }
    #team-screen #team-card-grid.collection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 12px;
        margin-top: 18px;
    }
}

/* rarity checkboxes: same look as the Collection */
#team-screen .rarity-check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: rgba(255,255,255,.68);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .06em;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
#team-screen .rarity-check:hover {
    color: rgba(255,255,255,.96);
    background: rgba(145,90,210,.08);
    border-color: rgba(190,140,245,.16);
    transform: translateX(2px);
}
#team-screen .rarity-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
#team-screen .rarity-box {
    position: relative;
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    border: 1px solid rgba(210,180,255,.32);
    border-radius: 3px;
    background: rgba(15,12,20,.75);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    transition: all .18s ease;
}
#team-screen .rarity-check input:checked + .rarity-box {
    border-color: rgba(205,165,255,.92);
    background: linear-gradient(135deg, rgba(120,65,190,.92), rgba(185,115,255,.92));
    box-shadow: 0 0 12px rgba(165,95,255,.42), inset 0 0 8px rgba(255,255,255,.16);
}
#team-screen .rarity-check input:checked + .rarity-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
#team-screen .rarity-check:has(input:checked) {
    color: rgba(240,225,255,.98);
    background: rgba(145,90,210,.09);
}

/* ============================================================
   TEAM SCREEN V2.1 — HEADER (YOUR TEAM) ALSO STAYS FIXED
   Header sticks to the top, the lineup/search block sticks right below it.
============================================================ */
#team-screen {
    --team-header-h: 78px;
}
@media (max-width: 760px) {
    #team-screen { --team-header-h: 62px; }
}
#team-screen .secondary-header {
    position: sticky;
    top: 0;
    z-index: 8;
    /* opaque base so cards never show through while scrolling */
    background:
        linear-gradient(180deg, rgba(22, 18, 27, .55), rgba(8, 7, 11, .45)),
        #0a080d;
}
#team-screen .team-top {
    top: var(--team-header-h);
}

/* On narrow screens the generic rules let the whole page scroll (height:auto), which
   breaks position:sticky. Keep the team screen as its own scroll area at every width,
   so its header stays fixed everywhere. */
#team-screen.screen {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
}

/* Fully opaque, so scrolling cards never show through the fixed blocks. */
#team-screen .team-top {
    background: #08070b;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
}
#team-screen .secondary-header {
    background: #0a080d;
}

/* ============================================================
   BATTLE CARDS — ROUNDED ART, TALLER EFFECTS ZONE
   The radius applies to the card art only (not the effects strip below).
   Outer frame radius = art radius + frame padding, so the corners stay concentric.
============================================================ */
#battle-screen .battle-card {
    border-radius: 17px;
}
#battle-screen .battle-card .battle-card-image-wrapper {
    border-radius: 14px;
    overflow: hidden;
}
/* shielded cards let effects overflow the wrapper: round the image itself too */
#battle-screen .battle-card .battle-card-image-wrapper > img {
    border-radius: inherit;
}
/* effects zone a little taller */
#battle-screen .active-effects {
    min-height: 28px !important;
    margin-top: 5px !important;
}


/* PLAYER PROFILE + AVATAR CUSTOMIZATION */
.social-profile-card{display:flex;align-items:center;gap:12px;margin:8px 0 20px;padding:0;border:0;background:none;box-shadow:none}
.social-profile-avatar{width:54px;height:54px;flex:0 0 54px;padding:2px;border:1px solid rgba(194,160,255,.55);border-radius:50%;background:linear-gradient(135deg,#a98aff,#302044);box-shadow:0 0 18px rgba(151,112,255,.18)}
.social-profile-avatar img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.social-profile-info{display:grid;min-width:0;gap:5px;flex:1}
.social-profile-info strong{overflow:hidden;color:#f4edff;font:700 20px Georgia,serif;letter-spacing:.04em;text-overflow:ellipsis}
.social-profile-info small{color:#a99bbd;font:700 10px Arial,sans-serif;letter-spacing:.12em}
.social-profile-presence{display:flex;align-items:center;gap:6px;color:#9de8ba;font:700 8px Arial,sans-serif;letter-spacing:.1em}
.social-profile-presence i{width:6px;height:6px;border-radius:50%;background:#72e8a7;box-shadow:0 0 8px #72e8a7}
.friends-head h2{margin:0 0 8px;font-size:27px;letter-spacing:.16em}
.friend-main{position:relative}
.friend-avatar{width:54px;height:54px;flex:0 0 54px;border:1px solid rgba(194,160,255,.55);border-radius:50%;object-fit:cover}
.friend-main>span:nth-child(3){display:grid;min-width:0;flex:1;gap:5px}
.friend-main strong{overflow:hidden;color:#f4edff;font:700 16px Georgia,serif;letter-spacing:.04em;text-overflow:ellipsis}
.friend-main small{color:#a99bbd;font:700 10px Arial,sans-serif;letter-spacing:.12em}
.friend-main .presence{position:absolute;left:43px;bottom:15px;z-index:1;width:9px;height:9px;border:2px solid #0d0b19}
.avatar-crop-modal{position:fixed;inset:0;z-index:13000;display:grid;place-items:center;padding:18px;background:rgba(3,3,9,.88);backdrop-filter:blur(10px)}
.avatar-crop-modal[hidden]{display:none}
.avatar-crop-panel{width:min(420px,94vw);padding:22px;border:1px solid rgba(174,132,255,.35);background:linear-gradient(145deg,#171329,#080912);box-shadow:0 24px 70px rgba(0,0,0,.65)}
.avatar-crop-panel h3{font-size:16px;letter-spacing:.14em}
.avatar-crop-panel p{margin:9px 0 16px;color:#a99fb8;font-size:12px;line-height:1.5}
.avatar-crop-viewport{position:relative;width:280px;height:280px;max-width:100%;margin:0 auto 18px;overflow:hidden;border:1px solid rgba(194,160,255,.65);border-radius:50%;background:#080912;touch-action:none;cursor:grab}
.avatar-crop-viewport:active{cursor:grabbing}
.avatar-crop-viewport img{position:absolute;max-width:none;max-height:none;user-select:none;-webkit-user-drag:none;pointer-events:none}
.avatar-crop-zoom{display:flex;align-items:center;gap:12px;color:#cfc3e4;font-size:10px;letter-spacing:.12em}
.avatar-crop-zoom input{flex:1;accent-color:#b99aff}
.avatar-crop-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px}
.avatar-crop-actions button{min-height:38px;padding:0 14px;border:1px solid rgba(172,132,255,.36);background:rgba(107,62,190,.15);color:#eee;font-size:10px;font-weight:700;letter-spacing:.1em;cursor:pointer}
.avatar-crop-actions button:last-child{background:rgba(133,91,207,.32);border-color:rgba(194,160,255,.65)}

.profile-editor{display:grid;gap:15px;max-width:620px;margin:0 0 28px;padding:20px;border:1px solid rgba(190,155,255,.18);background:rgba(13,11,24,.55)}
.profile-editor-preview{display:flex;align-items:center;gap:14px}
.profile-editor-preview img{width:68px;height:68px;border:1px solid rgba(194,160,255,.55);border-radius:50%;object-fit:cover;background:#171125}
.profile-editor-preview strong,.profile-editor-preview small{display:block}
.profile-editor-preview strong{font-size:11px;letter-spacing:.14em}
.profile-editor-preview small{margin-top:6px;color:#91879f;font-size:11px}
.avatar-gallery{display:flex;flex-wrap:wrap;gap:9px}
.avatar-gallery button{width:48px;height:48px;border:1px solid rgba(190,155,255,.24);border-radius:50%;background:linear-gradient(145deg,#302348,#10101d);color:#eee3ff;font-size:25px;cursor:pointer;transition:.18s ease}
.avatar-gallery button:hover,.avatar-gallery button.selected{border-color:#c2a0ff;box-shadow:0 0 16px rgba(169,133,255,.35);transform:translateY(-2px)}
.avatar-upload-button,.avatar-reset-button{display:grid;place-items:center;min-height:40px;border:1px solid rgba(172,132,255,.36);background:rgba(107,62,190,.15);color:#e9e0f7;font:700 10px Arial,sans-serif;letter-spacing:.14em;cursor:pointer}
.avatar-reset-button{min-height:34px;border-color:rgba(255,255,255,.1);background:transparent;color:#968ba4}
@media(max-width:600px){.social-profile-card{gap:9px;padding:11px}.social-profile-presence{font-size:7px}.profile-editor{padding:14px}}


/* ROADMAP: Career, player avatar dock, card-based avatars and combat HP bars */
.friends-dock-button { width:64px !important; min-width:64px !important; max-width:64px !important; height:64px !important; min-height:64px !important; }
.friends-dock-button #friends-dock-avatar { display:block; width:100%; height:100%; padding:3px; border-radius:50%; object-fit:cover; }
.friends-dock-button > span:last-child { position:absolute; right:-4px; bottom:-4px; margin:0; }
.avatar-card-picker { display:grid; gap:8px; }
.avatar-card-picker>strong { color:#e9ddff; font-size:11px; letter-spacing:.12em; }
.avatar-card-picker>p { color:#a99fb8; font-size:12px; line-height:1.45; }
.avatar-card-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); gap:9px; max-height:300px; overflow:auto; padding:2px; }
.avatar-card-option { min-width:0; padding:5px; border:1px solid rgba(190,155,255,.2); border-radius:4px; background:rgba(255,255,255,.035); color:#eee; cursor:pointer; }
.avatar-card-option:hover { border-color:rgba(194,160,255,.75); background:rgba(140,95,205,.16); }
.avatar-card-option img { display:block; width:100%; aspect-ratio:2/3; object-fit:cover; }
.avatar-card-option span { display:block; overflow:hidden; margin-top:5px; font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.career-content { flex:1; display:grid; place-items:center; padding:32px; }
.career-panel { width:min(620px,100%); padding:54px 28px; text-align:center; border:1px solid rgba(190,155,255,.2); background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(15,12,20,.42)); box-shadow:0 20px 60px rgba(0,0,0,.35); }
.career-emblem { display:block; margin-bottom:18px; color:#c6a5ff; font-size:42px; }
.career-panel h1 { color:#f4edff; font:700 clamp(20px,3vw,30px) Georgia,serif; letter-spacing:.12em; }
.career-panel p { margin:14px auto 22px; max-width:420px; color:rgba(239,231,249,.62); font-size:13px; line-height:1.6; }
.career-status { color:#c6a5ff; font-size:10px; font-weight:700; letter-spacing:.2em; }
.battle-hp-bar { width:100%; height:5px; margin-top:5px; overflow:hidden; border:1px solid rgba(255,255,255,.12); border-radius:99px; background:rgba(0,0,0,.72); }
.battle-hp-bar span { display:block; height:100%; background:linear-gradient(90deg,#b52c48,#e75d76); box-shadow:0 0 8px rgba(231,93,118,.35); transition:width .2s ease; }
#battle-screen .active-effects { margin-top:4px !important; }
@media(max-width:700px) { .friends-dock-button { width:54px !important; min-width:54px !important; max-width:54px !important; height:54px !important; min-height:54px !important; } }


/* FRIENDS AVATAR — larger and more visible */
body:has(#main-menu.active) #friends-button.friends-dock-button {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  height: 92px !important;
  min-height: 92px !important;
  max-height: 92px !important;
  top: 22px !important;
  right: 22px !important;
}
body:has(#main-menu.active) #friends-button.friends-dock-button #friends-dock-avatar {
  width: 84px !important;
  height: 84px !important;
  padding: 2px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}


/* ============================================================
   CAREER — FULL MENU
============================================================ */
#career-screen.screen { height:100vh; height:100dvh; min-height:0; overflow:hidden; background:radial-gradient(ellipse at 70% 0%,rgba(105,65,155,.12),transparent 48%),#09080d; }
#career-screen .career-header { position:relative; z-index:3; flex:0 0 auto; background:rgba(10,8,13,.96); }
.career-header-mark { color:rgba(198,165,255,.65); font:700 9px Arial,sans-serif; letter-spacing:.18em; }
#career-screen .career-content { display:flex; align-items:stretch; justify-content:flex-start; gap:0; min-height:0; overflow:hidden; padding:0; }
.career-sidebar { flex:0 0 220px; padding:28px 14px; overflow-y:auto; border-right:1px solid rgba(190,155,255,.13); background:rgba(14,11,20,.88); }
.career-sidebar-label { padding:0 12px 12px; color:#756985; font:700 9px Arial,sans-serif; letter-spacing:.17em; }
.career-sidebar-label-spaced { margin-top:28px; }
.career-tab { display:flex; align-items:center; gap:12px; width:100%; min-height:43px; margin:3px 0; padding:0 12px; border:1px solid transparent; border-radius:3px; background:transparent; color:#a69ab6; text-align:left; font:600 12px Arial,sans-serif; cursor:pointer; transition:background .18s,border-color .18s,color .18s; }
.career-tab>span { width:19px; color:#b89ce8; font-size:16px; text-align:center; }
.career-tab:hover { color:#f4edff; background:rgba(151,105,220,.08); }
.career-tab.active { border-color:rgba(191,155,255,.23); background:linear-gradient(90deg,rgba(135,86,205,.22),rgba(135,86,205,.04)); color:#f4edff; box-shadow:inset 2px 0 #b99aff; }
.career-main { flex:1; min-width:0; overflow-y:auto; padding:clamp(20px,3vw,42px); scrollbar-color:rgba(171,135,218,.35) transparent; }
.career-pane { display:none; width:min(1200px,100%); margin:0 auto; animation:careerFadeIn .22s ease; }
.career-pane.active { display:block; }
.career-pane[hidden] { display:none !important; }
@keyframes careerFadeIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }
.career-kicker { color:#b99aff; font:700 9px Arial,sans-serif; letter-spacing:.2em; }
.career-welcome { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:28px; }
.career-welcome h1,.career-page-heading h1 { margin:8px 0 9px; color:#f7f1ff; font:700 clamp(27px,3vw,40px) Georgia,serif; letter-spacing:.025em; }
.career-welcome p,.career-page-heading p { margin:0; color:#a69bb5; font:13px/1.6 Arial,sans-serif; }
.career-welcome-symbol { display:grid; place-items:center; flex:0 0 72px; width:72px; height:72px; border:1px solid rgba(190,155,255,.3); background:linear-gradient(145deg,rgba(163,121,229,.16),rgba(20,15,30,.2)); color:#d4bdff; font-size:34px; box-shadow:0 0 38px rgba(153,102,220,.1); }
.career-profile-strip { display:flex; align-items:center; gap:15px; flex-wrap:wrap; margin-bottom:34px; padding:17px 19px; border:1px solid rgba(190,155,255,.2); background:linear-gradient(100deg,rgba(107,70,150,.17),rgba(255,255,255,.025)); }
.career-profile-icon { display:grid; place-items:center; width:47px; height:47px; border:1px solid rgba(190,155,255,.35); border-radius:50%; background:#171022; color:#cbb1ff; font-size:22px; }
.career-profile-copy { display:grid; gap:5px; min-width:110px; }
.career-profile-copy strong { max-width:220px; overflow:hidden; color:#f5edff; font:700 15px Georgia,serif; text-overflow:ellipsis; white-space:nowrap; }
.career-profile-copy span,.career-level>span,.career-xp>div:first-child span { color:#8e819f; font:700 8px Arial,sans-serif; letter-spacing:.15em; }
.career-level { display:grid; gap:5px; margin-left:auto; padding-left:20px; border-left:1px solid rgba(190,155,255,.16); }
.career-level strong { color:#e4d4ff; font:700 24px Georgia,serif; }
.career-xp { flex:1 1 200px; min-width:150px; display:grid; gap:9px; }
.career-xp>div:first-child { display:flex; justify-content:space-between; gap:12px; }
.career-xp>div:first-child strong { color:#cfc1e5; font:600 10px Arial,sans-serif; }
.career-progress-track { height:5px; overflow:hidden; border-radius:8px; background:rgba(255,255,255,.08); }
.career-progress-track i { display:block; height:100%; background:linear-gradient(90deg,#8060c0,#d0b2ff); box-shadow:0 0 12px rgba(185,154,255,.45); }
.career-section-heading { display:flex; align-items:end; justify-content:space-between; gap:12px; margin:0 0 16px; }
.career-section-heading h2 { margin:6px 0 0; color:#f2eafa; font:700 20px Georgia,serif; }
.career-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:34px; }
.career-stat-card { display:grid; align-content:start; gap:10px; min-width:0; padding:18px; border:1px solid rgba(190,155,255,.14); background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(15,12,20,.4)); }
.career-stat-icon { color:#c3a5f3; font-size:20px; }
.career-stat-label { color:#8f829f; font:700 8px Arial,sans-serif; letter-spacing:.12em; }
.career-stat-card>strong { overflow-wrap:anywhere; color:#f4edff; font:700 clamp(18px,2vw,26px) Georgia,serif; }
.career-stat-card>strong small { color:#93869f; font-size:13px; }
.career-stat-card>small { color:#81768e; font:11px/1.5 Arial,sans-serif; }
.career-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.career-shortcuts button { display:grid; justify-items:start; gap:9px; padding:18px; border:1px solid rgba(190,155,255,.17); background:rgba(255,255,255,.025); text-align:left; cursor:pointer; transition:transform .18s,border-color .18s,background .18s; }
.career-shortcuts button:hover { transform:translateY(-2px); border-color:rgba(190,155,255,.5); background:rgba(137,90,205,.08); }
.career-shortcuts button>span { color:#c6a5ff; font-size:22px; }
.career-shortcuts strong { color:#f1e9fb; font:700 14px Georgia,serif; }
.career-shortcuts small { min-height:30px; color:#92869f; font:11px/1.5 Arial,sans-serif; }
.career-shortcuts b { color:#b99aff; font:700 9px Arial,sans-serif; letter-spacing:.13em; }
.career-page-heading { margin-bottom:28px; }
.career-page-heading p { max-width:650px; }
.career-empty { display:grid; justify-items:center; padding:clamp(34px,6vw,72px) 24px; border:1px solid rgba(190,155,255,.15); background:linear-gradient(145deg,rgba(255,255,255,.035),rgba(15,12,20,.32)); text-align:center; }
.career-empty>span { display:grid; place-items:center; width:58px; height:58px; margin-bottom:16px; border:1px solid rgba(190,155,255,.24); color:#c6a5ff; font-size:27px; }
.career-empty h2 { margin:0 0 10px; color:#eee5fa; font:700 21px Georgia,serif; }
.career-empty p { max-width:500px; margin:0; color:#94889f; font:12px/1.7 Arial,sans-serif; }
.career-ranked-card { display:grid; justify-items:center; padding:42px 22px; border:1px solid rgba(190,155,255,.2); background:radial-gradient(ellipse at 50% 0%,rgba(147,99,207,.15),transparent 55%),rgba(255,255,255,.02); text-align:center; }
.career-rank-emblem { display:grid; place-items:center; width:100px; height:100px; margin-bottom:20px; border:1px solid rgba(190,155,255,.3); border-radius:50%; color:#c6a5ff; font-size:44px; box-shadow:0 0 32px rgba(153,102,220,.13); }
.career-ranked-card h2 { margin:8px 0; color:#f4edff; font:700 30px Georgia,serif; }
.career-ranked-card p { max-width:480px; color:#9b8fac; font:12px/1.7 Arial,sans-serif; }
.career-rank-track { display:flex; align-items:center; gap:12px; width:min(480px,100%); margin-top:24px; color:#776a87; font:700 8px Arial,sans-serif; letter-spacing:.12em; }
.career-rank-track i { flex:1; height:1px; background:rgba(190,155,255,.25); }
.career-mastery-note { display:flex; gap:14px; align-items:start; margin-bottom:18px; padding:14px 16px; border:1px solid rgba(190,155,255,.2); background:rgba(137,90,205,.06); }
.career-mastery-note strong { flex:0 0 auto; color:#c9afff; font:700 9px Arial,sans-serif; letter-spacing:.12em; }
.career-mastery-note span { color:#a69ab4; font:11px/1.6 Arial,sans-serif; }
.career-mastery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:10px; }
.career-mastery-card { display:flex; align-items:center; gap:12px; min-width:0; padding:10px; border:1px solid rgba(190,155,255,.14); background:rgba(255,255,255,.025); }
.career-mastery-card>img { flex:0 0 58px; width:58px; height:82px; object-fit:cover; background:#17121e; }
.career-mastery-details { display:grid; min-width:0; gap:6px; }
.career-mastery-details>strong { overflow:hidden; color:#f1e9fb; font:700 13px Georgia,serif; text-overflow:ellipsis; white-space:nowrap; }
.career-mastery-details>span { color:#b99aff; font:700 8px Arial,sans-serif; letter-spacing:.12em; }
.career-mastery-details>small { color:#8b8098; font:8px Arial,sans-serif; letter-spacing:.05em; }
.career-mastery-levels { display:flex; gap:4px; }
.career-mastery-levels i { display:grid; place-items:center; width:20px; height:20px; border:1px solid rgba(190,155,255,.22); color:#80738f; font:700 8px Arial,sans-serif; font-style:normal; }
.career-mastery-levels i.reached { border-color:rgba(190,155,255,.75); background:rgba(157,112,232,.2); color:#eadcff; box-shadow:0 0 10px rgba(157,112,232,.12); }
.career-mastery-progress { width:100%; height:4px; overflow:hidden; background:rgba(255,255,255,.08); }
.career-mastery-progress i { display:block; height:100%; background:linear-gradient(90deg,#8e67d2,#d0b5ff); transition:width .25s ease; }
.career-mastery-evolve { width:max-content; max-width:100%; padding:7px 10px; border:1px solid rgba(208,181,255,.55); background:rgba(142,103,210,.2); color:#eadcff; font:700 8px Arial,sans-serif; letter-spacing:.1em; cursor:pointer; }
.career-mastery-evolve:hover:not(:disabled) { background:rgba(142,103,210,.38); border-color:#d0b5ff; }
.career-mastery-evolve:disabled { opacity:.55; cursor:wait; }

.career-inventory-grid { display:grid; gap:12px; }
.career-inventory-card { display:flex; align-items:center; gap:15px; padding:18px; border:1px solid rgba(190,155,255,.16); background:rgba(255,255,255,.025); }
.career-inventory-card>span { display:grid; place-items:center; width:46px; height:46px; flex:0 0 46px; border:1px solid rgba(190,155,255,.22); color:#c6a5ff; font-size:22px; }
.career-inventory-card>div { display:grid; gap:6px; min-width:0; flex:1; }
.career-inventory-card strong { color:#f1e9fb; font:700 15px Georgia,serif; }
.career-inventory-card small { color:#9589a3; font:11px/1.5 Arial,sans-serif; }
.career-inventory-card>b { color:#b99aff; font:700 8px Arial,sans-serif; letter-spacing:.12em; text-align:right; }
.career-pass-hero { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:26px; border:1px solid rgba(190,155,255,.25); background:radial-gradient(ellipse at 85% 40%,rgba(147,99,207,.2),transparent 45%),linear-gradient(120deg,rgba(65,43,91,.3),rgba(255,255,255,.02)); }
.career-pass-hero h2 { margin:9px 0; color:#f5edff; font:700 26px Georgia,serif; }
.career-pass-hero p { margin:0; color:#a69ab4; font:12px/1.6 Arial,sans-serif; }
.career-pass-seal { display:grid; place-items:center; width:76px; height:76px; flex:0 0 76px; border:1px solid rgba(190,155,255,.4); border-radius:50%; color:#d0b7ff; font-size:34px; box-shadow:0 0 32px rgba(153,102,220,.15); }
.career-pass-progress { margin:14px 0 28px; padding:18px; border:1px solid rgba(190,155,255,.14); background:rgba(255,255,255,.02); }
.career-pass-progress>div:first-child { display:flex; justify-content:space-between; gap:10px; margin-bottom:12px; color:#9d90ab; font:700 9px Arial,sans-serif; letter-spacing:.12em; }
.career-pass-progress>div:first-child strong { color:#e7dafa; }
.career-pass-progress>div:first-child small { color:#8e819f; }
.career-pass-progress p { margin:11px 0 0; color:#82768e; font:11px Arial,sans-serif; }
.career-mission-list { display:grid; gap:9px; margin-bottom:30px; }
.career-mission-list>div { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid rgba(190,155,255,.12); }
.career-mission-list>div>span { color:#c6a5ff; font-size:18px; }
.career-mission-list strong { color:#eee5fa; font:700 12px Arial,sans-serif; }
.career-mission-list small { flex:1; color:#92869f; font:11px Arial,sans-serif; }
.career-mission-list b { color:#b99aff; font:700 8px Arial,sans-serif; letter-spacing:.12em; }
.career-pass-tiers { margin-top:6px; }
.career-pass-tiers .career-section-heading>span { color:#92869f; font:700 8px Arial,sans-serif; letter-spacing:.12em; }
.career-tier-track { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; }
.career-tier-track>div { display:grid; justify-items:center; gap:8px; padding:15px 6px; border:1px solid rgba(190,155,255,.15); background:rgba(255,255,255,.02); }
.career-tier-track>div>span { color:#9e91ad; font:700 9px Arial,sans-serif; }
.career-tier-track b { display:grid; place-items:center; width:38px; height:38px; border:1px solid rgba(190,155,255,.22); color:#c6a5ff; font-size:18px; }
.career-tier-track small { color:#877b94; font:700 8px Arial,sans-serif; letter-spacing:.1em; }
@media(max-width:900px) { .career-sidebar { flex-basis:185px; } .career-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .career-main { padding:22px; } }
@media(max-width:650px) { #career-screen.screen { overflow:auto; } #career-screen .career-content { display:block; overflow:visible; } .career-sidebar { display:flex; gap:5px; width:100%; padding:9px; overflow-x:auto; border-right:0; border-bottom:1px solid rgba(190,155,255,.13); } .career-sidebar-label { display:none; } .career-tab { flex:0 0 auto; width:auto; min-height:38px; gap:7px; padding:0 10px; white-space:nowrap; } .career-tab>span { width:auto; } .career-main { overflow:visible; padding:20px 14px 34px; } .career-header-mark { display:none; } .career-welcome-symbol { flex-basis:48px; width:48px; height:48px; font-size:24px; } .career-profile-strip { gap:10px; padding:12px; } .career-level { margin-left:0; padding-left:12px; } .career-xp { flex-basis:100%; } .career-shortcuts { grid-template-columns:1fr; } .career-shortcuts button { grid-template-columns:30px 1fr auto; align-items:center; } .career-shortcuts button>span { grid-row:span 2; } .career-shortcuts small { grid-column:2; } .career-shortcuts b { grid-column:3; grid-row:1 / span 2; } .career-mastery-note { display:grid; gap:7px; } .career-inventory-card { flex-wrap:wrap; } .career-inventory-card>b { margin-left:61px; text-align:left; } .career-mission-list>div { flex-wrap:wrap; } .career-mission-list small { flex-basis:100%; padding-left:30px; } }


/* CAREER NAV — seven equal-width diagonal tabs, matching the supplied sketch */
#career-screen .career-header { min-height:56px; justify-content:center; }
#career-screen .career-header .back-button { position:absolute; left:18px; }
#career-screen .career-header>div { text-align:center; }
#career-screen .career-header>div .section-eyebrow,
#career-screen .career-header-mark { display:none; }
#career-screen .career-header h2 { margin:0; color:#17131d; font:500 30px Arial,sans-serif; letter-spacing:0; text-transform:none; }
#career-screen .career-content { display:flex; flex-direction:column; }
#career-screen .career-tabs { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:0; flex:0 0 auto; width:100%; padding:7px 0; border-top:7px solid #08070b; border-bottom:7px solid #08070b; background:#08070b; }
#career-screen .career-tab { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:62px; margin:0; padding:7px 4px; border:0; border-right:7px solid #08070b; border-radius:0; background:#f4f1f7; color:#2a2332; text-align:center; clip-path:polygon(14% 0,100% 0,86% 100%,0 100%); font:600 10px Arial,sans-serif; transition:background .18s,color .18s; }
#career-screen .career-tab:first-child { clip-path:polygon(9% 0,100% 0,86% 100%,0 100%); }
#career-screen .career-tab:last-child { border-right:0; clip-path:polygon(14% 0,100% 0,100% 100%,0 100%); }
#career-screen .career-tab>span { width:auto; color:#746080; font-size:17px; line-height:1; }
#career-screen .career-tab>b { display:block; max-width:100%; overflow:hidden; color:inherit; font:700 clamp(8px,.85vw,11px) Arial,sans-serif; text-overflow:ellipsis; white-space:nowrap; }
#career-screen .career-tab:hover { background:#e6d9f7; color:#241b30; }
#career-screen .career-tab.active { border-color:#08070b; background:linear-gradient(145deg,#d9c5f4,#b79bdf); color:#21172e; box-shadow:inset 0 -4px #7650a8; }
#career-screen .career-tab.active>span { color:#4e3475; }
#career-screen .career-main { width:100%; flex:1; }
@media(max-width:650px) {
  #career-screen .career-content { display:flex; overflow:hidden; }
  #career-screen .career-tabs { grid-template-columns:repeat(7,minmax(0,1fr)); overflow:visible; padding:5px 0; }
  #career-screen .career-tab { min-height:54px; padding:5px 1px; border-right-width:4px; gap:4px; }
  #career-screen .career-tab>span { font-size:14px; }
  #career-screen .career-tab>b { font-size:7px; white-space:normal; line-height:1.1; overflow-wrap:anywhere; }
  #career-screen .career-main { min-height:0; overflow-y:auto; }
}
@media(max-width:390px) {
  #career-screen .career-tab { min-height:49px; }
  #career-screen .career-tab>b { font-size:6px; }
}


/* Career header follows the same secondary-header pattern as Collection */
#career-screen .career-header {
  min-height:78px;
  height:78px;
  display:grid;
  grid-template-columns:120px 1fr 120px;
  justify-content:stretch;
  padding:0 clamp(24px,5vw,80px);
  border-top:0;
  border-bottom:1px solid rgba(255,255,255,.075);
  background:linear-gradient(180deg,rgba(22,18,27,.55),rgba(8,7,11,.45));
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.025);
}
#career-screen .career-header .back-button {
  position:static;
  left:auto;
  justify-self:start;
}
#career-screen .career-header>div { text-align:center; }
#career-screen .career-header>div .section-eyebrow { display:block; }
#career-screen .career-header h2 {
  margin:0;
  color:inherit;
  font-family:Georgia,serif;
  font-size:18px;
  font-weight:400;
  letter-spacing:.16em;
  text-transform:uppercase;
}
#career-screen .career-header-mark {
  display:block;
  justify-self:end;
  color:rgba(240,230,250,.42);
  font-size:8px;
  letter-spacing:.13em;
}
@media(max-width:650px) {
  #career-screen .career-header {
    height:78px;
    min-height:78px;
    grid-template-columns:44px 1fr 44px;
    padding:0 14px;
  }
  #career-screen .career-header-mark { display:none; }
}


/* Keep the Career title header on its own row, like Collection.
   The seven navigation tabs belong immediately underneath it. */
#career-screen.screen.active {
  display:flex;
  flex-direction:column;
  align-items:stretch;
}
#career-screen > .career-header {
  order:0;
  flex:0 0 78px;
  width:100%;
}
#career-screen > .career-content {
  order:1;
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  align-items:stretch;
  width:100%;
  min-height:0;
}
#career-screen .career-tabs {
  order:0;
  flex:0 0 auto;
  width:100%;
}
#career-screen .career-main {
  order:1;
  flex:1 1 auto;
  width:100%;
  min-height:0;
}


/* ============================================================
   BANNERS (Convene) - gacha layout
   left thumbnails | centre featured stage | bottom wish buttons
============================================================ */
#banners-screen { flex-direction:column; min-height:100%; background:#070a0d; color:#f1f4f2; overflow:hidden !important; }
#banners-screen .banners-topbar { position:relative; z-index:6; flex:0 0 auto; display:flex; align-items:center; gap:18px; padding:16px clamp(16px,3vw,44px); }
.banners-title { display:flex; align-items:center; gap:12px; margin-right:auto; }
.banners-title span { color:#d8c08a; font-size:22px; }
.banners-title h2 { margin:0; font:500 clamp(20px,2.2vw,28px) Georgia,serif; letter-spacing:.04em; }
.banners-currency { display:flex; gap:14px; }
.currency-pill { display:flex; align-items:center; justify-content:space-between; gap:14px; min-width:clamp(110px,12vw,170px); padding:7px 16px; border:1px solid rgba(255,255,255,.22); border-radius:6px; background:rgba(8,12,14,.7); backdrop-filter:blur(8px); }
.currency-pill i { color:#8fe1d3; font-style:normal; font-size:19px; }
.currency-pill:nth-child(2) i { color:#e6c577; }
.currency-pill b { font:600 clamp(16px,1.7vw,22px) Arial,sans-serif; }
#banners-screen .banners-close { position:static; width:44px; height:44px; padding:0; border:0; background:transparent; color:#fff; font-size:26px; opacity:.85; cursor:pointer; }
#banners-screen .banners-close:hover { opacity:1; transform:scale(1.08); }

#banners-screen .banners-content { position:relative; flex:1 1 auto; display:grid; grid-template-columns:clamp(150px,16vw,230px) minmax(0,1fr); min-height:0; width:100%; margin:0; padding:0; overflow:hidden; }

/* ---- left: banner thumbnails ---- */
.banner-thumbs { position:relative; z-index:5; display:flex; flex-direction:column; gap:14px; padding:20px 18px 20px clamp(16px,3vw,44px); border-right:0; background:transparent; overflow-y:auto; }
.banner-thumb { position:relative; flex:0 0 auto; aspect-ratio:16/8; width:100%; padding:0; border:2px solid rgba(255,255,255,.18); background:#10141a; cursor:pointer; overflow:hidden; transition:transform .2s,border-color .2s,box-shadow .2s,filter .2s; filter:brightness(.72) saturate(.85); }
.banner-thumb:hover { filter:brightness(.92); }
.banner-thumb.active { border-color:#fff; filter:none; transform:scale(1.07); box-shadow:0 0 0 1px rgba(255,255,255,.25),0 10px 28px rgba(0,0,0,.5); z-index:2; }
.banner-thumb.legendary.active { box-shadow:none; }
.banner-thumb.mythic.active { box-shadow:none; }
.banner-thumb:focus-visible { outline:2px solid #8fe1d3; outline-offset:3px; }
.banner-thumb-art { position:absolute; inset:0; background-image:var(--art); background-repeat:no-repeat; background-size:var(--zoom) auto; background-position:var(--fx) var(--fy); }
.banner-thumb::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,.7)); }
.banner-thumb-tag { position:absolute; z-index:2; left:0; top:0; padding:3px 9px; background:#e0a83a; color:#2a1c05; font:800 10px Arial,sans-serif; font-style:normal; letter-spacing:.06em; }
.banner-thumb.mythic .banner-thumb-tag { background:#c93636; color:#fff; }
.banner-thumb-name { position:absolute; z-index:2; left:9px; bottom:6px; right:9px; text-align:left; color:#fff; font:600 11px Arial,sans-serif; letter-spacing:.06em; text-shadow:0 1px 4px #000; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ---- centre: featured stage ---- */
.banner-stage { position:relative; min-width:0; min-height:0; overflow:hidden; isolation:isolate; --glow:rgba(215,170,90,.32); --accent:#e8c677; }
.banner-stage.mythic { --glow:rgba(210,45,55,.42); --accent:#e0444b; }
.banner-stage-bg { position:absolute; inset:-6%; z-index:-3; background-image:var(--art); background-size:cover; background-position:50% 30%; filter:blur(34px) saturate(1.25) brightness(.5); transform:scale(1.1); }
.banner-stage::before { content:""; position:absolute; inset:0; z-index:-2; background:radial-gradient(60% 80% at 72% 45%,var(--glow),transparent 70%),linear-gradient(90deg,rgba(5,8,10,.88) 0%,rgba(5,8,10,.25) 48%,rgba(5,8,10,.55) 100%); }
.banner-stage::after { content:""; position:absolute; inset:auto 0 0 0; height:38%; z-index:-1; background:linear-gradient(0deg,rgba(4,6,8,.92),transparent); pointer-events:none; }
.banner-stage-figure { position:absolute; z-index:-1; right:2%; top:0; bottom:0; width:min(58%,calc((100vh - 70px) * 1.02)); background-image:var(--art); background-repeat:no-repeat; background-size:var(--zoom) auto; background-position:var(--fx) var(--fy); -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 30%,#000 88%,transparent 100%),linear-gradient(180deg,#000 62%,transparent 98%); -webkit-mask-composite:source-in; mask-image:linear-gradient(90deg,transparent 0,#000 30%,#000 88%,transparent 100%),linear-gradient(180deg,#000 62%,transparent 98%); mask-composite:intersect; }
.banner-stage-copy { position:absolute; left:clamp(20px,3.5vw,56px); top:clamp(16px,6%,56px); max-width:min(46%,520px); }
.banner-kicker { color:var(--accent); font:600 clamp(15px,1.5vw,21px) Georgia,serif; text-shadow:none !important; background:transparent !important; }
.banner-stage-copy h1 { margin:8px 0 14px; font:500 clamp(30px,4vw,58px)/1.05 Georgia,serif; color:#fff; text-shadow:0 4px 18px rgba(0,0,0,.6); }
.banner-remaining { margin:0 0 16px; color:var(--accent); font:600 clamp(14px,1.4vw,19px) Arial,sans-serif; }
.banner-remaining b { font-weight:600; }
.banner-rules { margin:0; color:#eef2f0; font:500 clamp(14px,1.45vw,20px)/1.5 Arial,sans-serif; text-shadow:0 2px 8px #000; }
.banner-rules b { color:var(--accent); font-weight:700; }

.banner-upcard { position:absolute; z-index:2; right:clamp(18px,4%,60px); bottom:25%; display:flex; align-items:center; gap:12px; padding:8px 28px 8px 8px; border:1px solid rgba(255,255,255,.18); background:linear-gradient(90deg,rgba(6,9,11,.92),rgba(6,9,11,.55)); }
.banner-upcard-crest { display:grid; place-items:center; width:46px; height:46px; background:var(--accent); color:#151008; font-size:24px; }
.banner-upcard strong { display:block; font:600 clamp(18px,2vw,28px) Arial,sans-serif; }
.banner-stars { display:block; margin-top:2px; color:var(--accent); font-size:13px; letter-spacing:.14em; }
.banner-upcard i { position:absolute; right:6px; top:-13px; color:var(--accent); font:italic 800 15px Arial,sans-serif; text-shadow:0 2px 6px #000; }

.banner-rateup { position:absolute; left:clamp(20px,3.5vw,56px); bottom:clamp(80px,13%,124px); }
.banner-rateup h3 { margin:0 0 10px; color:#eaeeee; font:600 clamp(13px,1.3vw,18px) Arial,sans-serif; text-shadow:0 2px 6px #000; }
.banner-rateup>div { display:flex; gap:10px; }
.banner-rateup-face { width:clamp(46px,5.4vw,78px); aspect-ratio:1; border:1px solid rgba(255,255,255,.28); border-bottom:3px solid #b07ae8; background-color:#14101c; background-image:var(--art); background-repeat:no-repeat; background-size:var(--zoom) auto; background-position:var(--fx) var(--fy); }

.banner-tools { position:absolute; left:clamp(20px,3.5vw,56px); bottom:clamp(14px,3%,28px); display:flex; gap:clamp(10px,1.4vw,22px); }
.banner-tools button { width:clamp(36px,3.6vw,48px); aspect-ratio:1; border:0; border-radius:50%; background:#f4f6f5; color:#1a1d1f; font:700 clamp(15px,1.5vw,20px) Georgia,serif; cursor:not-allowed; opacity:.82; }

.banner-wish-buttons { position:absolute; right:clamp(18px,3%,48px); bottom:clamp(14px,3%,28px); display:flex; gap:clamp(10px,1.4vw,22px); }
.banner-wish-buttons button { display:flex; align-items:center; gap:10px; min-width:clamp(150px,17vw,250px); padding:12px clamp(16px,2vw,32px); border:0; clip-path:polygon(14px 0,100% 0,calc(100% - 14px) 100%,0 100%); background:linear-gradient(180deg,#f8f8f4,#cfd2cb); color:#1b1d1e; font:700 clamp(14px,1.5vw,21px) Arial,sans-serif; cursor:not-allowed; opacity:1; }
.banner-wish-buttons .wish-cost { display:inline-flex; align-items:center; gap:6px; color:#a07426; font-weight:800; }
.banner-wish-buttons .wish-cost img { display:block; width:clamp(22px,2.2vw,30px); height:clamp(22px,2.2vw,30px); object-fit:contain; flex:0 0 auto; }

/* ---- small screens: thumbnails go horizontal on top ---- */
@media(max-width:820px) {
  #banners-screen .banners-topbar { padding:10px 14px; gap:10px; }
  .currency-pill { min-width:0; padding:5px 10px; gap:8px; }
  #banners-screen .banners-content { grid-template-columns:1fr; grid-template-rows:auto minmax(0,1fr); }
  .banner-thumbs { flex-direction:row; padding:10px 14px; gap:8px; border-right:0; border-bottom:1px solid rgba(255,255,255,.08); overflow-x:auto; overflow-y:hidden; }
  .banner-thumb { flex:0 0 118px; width:118px; }
  .banner-thumb.active { transform:none; }
  .banner-stage-figure { width:100%; right:0; top:auto; bottom:20%; height:auto; aspect-ratio:1/1; opacity:.6; }
  .banner-stage-copy { max-width:88%; top:14px; }
  .banner-stage-copy h1 { font-size:30px; margin-bottom:8px; }
  .banner-remaining { margin-bottom:8px; }
  .banner-rules { font-size:12px; }
  .banner-upcard { right:12px; bottom:31%; padding:5px 18px 5px 5px; }
  .banner-upcard-crest { width:34px; height:34px; font-size:18px; }
  .banner-upcard strong { font-size:16px; }
  .banner-rateup { bottom:20%; }
  .banner-rateup-face { width:44px; }
  .banner-tools { display:none; }
  .banner-wish-buttons { left:12px; right:12px; bottom:12px; }
  .banner-wish-buttons button { flex:1; min-width:0; padding:10px 8px; font-size:13px; justify-content:center; }
}
@media(prefers-reduced-motion:reduce) { .banner-thumb { transition:none; } }

/* BATTLE PASS — full 50-tier seasonal reward track */
#career-screen .career-tier-track {
  display:grid;
  grid-template-columns:repeat(10,minmax(0,1fr));
  gap:8px;
  margin-top:14px;
}
#career-screen .career-tier-tile {
  display:grid;
  justify-items:center;
  align-content:center;
  gap:7px;
  min-height:94px;
  padding:10px 4px;
  border:1px solid rgba(190,155,255,.16);
  background:linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.015));
  color:#91869e;
}
#career-screen .career-tier-tile>span {
  color:#9c90aa;
  font:700 9px Arial,sans-serif;
  letter-spacing:.12em;
}
#career-screen .career-tier-tile>b {
  color:#a992d1;
  font:22px Georgia,serif;
}
#career-screen .career-tier-tile>small {
  color:#81768d;
  font:700 7px Arial,sans-serif;
  letter-spacing:.1em;
}
#career-screen .career-tier-tile.earned {
  border-color:rgba(183,151,239,.5);
  background:linear-gradient(145deg,rgba(125,93,174,.24),rgba(255,255,255,.025));
}
#career-screen .career-tier-tile.earned>b { color:#e0caff; }
#career-screen .career-tier-tile.final { border-color:rgba(224,185,115,.45); }
#career-screen .career-tier-tile.final>b { color:#e6c27e; }
#career-screen .career-pass-tier-note {
  margin:12px 0 0;
  color:#92869e;
  font:11px/1.6 Arial,sans-serif;
}
@media(max-width:700px) {
  #career-screen .career-tier-track { grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px; }
  #career-screen .career-tier-tile { min-height:76px; }
}

/* Dream Sparks beta unlock test card */
.collection-card.card-dream-locked { position:relative; cursor:default; }
.collection-card.card-dream-locked>img { filter:grayscale(.82) brightness(.42); }
.card-dream-lock { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:10px; background:rgba(8,7,12,.48); color:#fff; text-align:center; }
.card-dream-lock strong { font:800 13px Arial,sans-serif; letter-spacing:.18em; }
.dream-unlock-button { padding:9px 13px; border:1px solid rgba(255,221,145,.75); background:linear-gradient(135deg,#f6df9d,#bd8c39); color:#241907; font:800 11px Arial,sans-serif; cursor:pointer; }
.dream-unlock-button:disabled { opacity:.65; cursor:wait; }
#banners-screen .banners-currency { flex-wrap:wrap; justify-content:flex-end; gap:7px; }
#banners-screen .currency-pill { min-width:95px; gap:8px; padding:6px 10px; }
#banners-screen .currency-pill i { font-size:15px; }
#banners-screen .currency-pill b { font-size:15px; }
@media(max-width:820px) {
  #banners-screen .banners-currency { gap:5px; }
  #banners-screen .currency-pill { min-width:0; padding:4px 7px; }
  #banners-screen .currency-pill b { font-size:12px; }
}

/* Persistent top-right wallet */
#currency-hud { position:fixed; z-index:1200; top:14px; right:18px; display:flex; align-items:center; gap:8px; pointer-events:none; }
#currency-hud .currency-pill { display:grid; grid-template-columns:auto auto; grid-template-rows:auto auto; align-items:center; column-gap:7px; row-gap:1px; min-width:104px; padding:7px 10px; border:1px solid rgba(206,177,255,.24); border-radius:8px; background:rgba(13,10,22,.88); color:#eee5ff; box-shadow:0 5px 20px #0006; backdrop-filter:blur(10px); }
#currency-hud .currency-pill i { grid-row:1 / 3; font-style:normal; font-size:17px; }
#currency-hud .currency-pill b { font:700 14px Arial,sans-serif; }
#currency-hud .currency-pill small { color:#a99bbd; font:9px Arial,sans-serif; white-space:nowrap; }
.collection-card.card-dream-locked { cursor:pointer; }
.card-dream-lock { pointer-events:none; }
.card-dream-lock .dream-unlock-button { pointer-events:auto; }
.card-dream-lock strong { margin-bottom:0; }
.dream-unlock-button { min-width:104px; padding:10px 18px; letter-spacing:.12em; }
.card-unlock-modal { position:fixed; inset:0; z-index:2500; display:none; align-items:center; justify-content:center; padding:20px; }
.card-unlock-modal.open { display:flex; }
.unlock-modal-background { position:absolute; inset:0; background:rgba(4,3,9,.78); backdrop-filter:blur(7px); }
.unlock-modal-panel { position:relative; width:min(420px,100%); padding:30px; border:1px solid rgba(198,164,255,.38); border-radius:14px; background:linear-gradient(145deg,#211a30,#100e18); color:#f4edff; box-shadow:0 20px 70px #000b; }
.unlock-modal-close { position:absolute; top:10px; right:13px; border:0; background:none; color:#cfc2df; font-size:26px; cursor:pointer; }
.unlock-modal-eyebrow { margin:0 0 8px; color:#b69add; font:700 10px Arial,sans-serif; letter-spacing:.2em; }
.unlock-modal-panel h2 { margin:0; font:700 23px Cinzel,serif; }
.unlock-modal-copy { margin:10px 0 22px; color:#bcb1c9; font:13px Arial,sans-serif; }
.unlock-currency-option { display:flex; align-items:center; gap:12px; margin:10px 0; padding:13px; border:1px solid rgba(255,255,255,.13); border-radius:8px; background:rgba(255,255,255,.035); cursor:pointer; }
.unlock-currency-option:has(input:checked) { border-color:#b89be7; background:rgba(150,113,204,.15); }
.unlock-currency-option input { accent-color:#b99be9; }
.unlock-currency-option span { display:flex; flex-direction:column; gap:5px; }
.unlock-currency-option b { font:700 13px Arial,sans-serif; }
.unlock-currency-option small { color:#a99eb5; font:11px Arial,sans-serif; }
.unlock-confirm-button { width:100%; margin-top:17px; padding:13px; border:1px solid #d8c0ff; border-radius:7px; background:linear-gradient(110deg,#a987d4,#72549f); color:white; font:800 12px Arial,sans-serif; letter-spacing:.16em; cursor:pointer; }
.unlock-confirm-button:disabled { opacity:.4; cursor:not-allowed; }
@media(max-width:600px) {
 #currency-hud { top:8px; right:8px; gap:4px; }
 #currency-hud .currency-pill { min-width:0; padding:5px 7px; column-gap:5px; }
 #currency-hud .currency-pill small { font-size:8px; }
 #currency-hud .currency-pill b { font-size:12px; }
}

 
/* Wallet is shown only in the Collection header, never as a persistent overlay. */
#currency-hud.collection-currency {
  position:static;
  z-index:auto;
  display:flex;
  align-items:center;
  gap:8px;
  margin-left:auto;
  pointer-events:none;
}
#currency-hud.collection-currency .currency-pill {
  display:grid;
  grid-template-columns:auto auto;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:7px;
  row-gap:1px;
  min-width:104px;
  padding:7px 10px;
  border:1px solid rgba(206,177,255,.24);
  border-radius:8px;
  background:rgba(13,10,22,.88);
  color:#eee5ff;
  box-shadow:0 5px 20px #0006;
  backdrop-filter:blur(10px);
}
#currency-hud.collection-currency .currency-pill i { grid-row:1 / 3; font-style:normal; font-size:17px; }
#currency-hud.collection-currency .currency-pill b { font:700 14px Arial,sans-serif; }
#currency-hud.collection-currency .currency-pill small { color:#a99bbd; font:9px Arial,sans-serif; white-space:nowrap; }
#banners-screen .banners-currency [hidden] { display:none !important; }
#banners-screen .banners-currency .currency-pill { display:flex; }
#banners-screen .banners-currency .currency-pill small { color:#c5b8d6; font:9px Arial,sans-serif; white-space:nowrap; }
@media(max-width:820px) {
  #currency-hud.collection-currency { gap:4px; }
  #currency-hud.collection-currency .currency-pill { min-width:0; padding:5px 7px; column-gap:5px; }
  #currency-hud.collection-currency .currency-pill b { font-size:12px; }
  #currency-hud.collection-currency .currency-pill small { font-size:8px; }
}


/* Collection header: reserve a real column for the wallet to prevent right overflow. */
#collection-screen .secondary-header {
    grid-template-columns: 48px minmax(0, 1fr) auto auto;
    column-gap: 14px;
}
#collection-screen .secondary-header > div:not(.collection-currency) {
    min-width: 0;
}
#collection-screen .collection-currency {
    justify-self: end;
    min-width: 0;
    max-width: 100%;
}
#collection-screen #collection-count {
    white-space: nowrap;
}
@media (max-width: 760px) {
    #collection-screen .secondary-header {
        height: auto;
        min-height: 62px;
        grid-template-columns: 38px minmax(0, 1fr) auto;
        grid-template-rows: 58px auto;
        column-gap: 8px;
        row-gap: 0;
        padding: 6px 12px 8px;
    }
    #collection-screen .secondary-header > div:not(.collection-currency) {
        grid-column: 2;
        grid-row: 1;
        text-align: left;
    }
    #collection-screen #collection-count {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }
    #collection-screen .collection-currency {
        grid-column: 2 / 4;
        grid-row: 2;
        justify-self: end;
        margin-left: 0;
        gap: 6px;
    }
    #collection-screen .collection-currency .currency-pill {
        padding: 5px 7px;
        column-gap: 5px;
    }
}
@media (max-width: 390px) {
    #collection-screen .collection-currency {
        width: 100%;
        justify-content: flex-end;
        gap: 4px;
    }
    #collection-screen .collection-currency .currency-pill {
        padding: 4px 5px;
        column-gap: 4px;
    }
    #collection-screen .collection-currency .currency-pill small {
        font-size: 7px;
    }
}


/* Keep the Collection title visually centered across the full header. */
#collection-screen .secondary-header {
    position: relative;
}
#collection-screen .secondary-header > div:not(.collection-currency) {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: calc(100% - 360px);
    text-align: center;
    pointer-events: none;
}
@media (max-width: 760px) {
    #collection-screen .secondary-header > div:not(.collection-currency) {
        position: static;
        transform: none;
        width: auto;
        max-width: none;
        grid-column: 2;
        grid-row: 1;
        text-align: center;
    }
}


/* Player avatar beside the name in turn announcements and versus intro. */
.named-turn-identity {display:flex;align-items:center;justify-content:center;gap:12px;min-width:0;}
.battle-player-avatar {width:48px;height:48px;flex:0 0 48px;object-fit:cover;border-radius:50%;border:2px solid rgba(190,211,255,.75);background:#171322;box-shadow:0 0 18px rgba(125,165,255,.28);}
.named-turn-opponent .battle-player-avatar,.versus-player-right .battle-player-avatar {border-color:rgba(255,166,181,.8);box-shadow:0 0 18px rgba(255,100,130,.25);}
.named-turn-identity .battle-player-name {display:block;min-width:0;overflow-wrap:anywhere;}
.versus-player .battle-player-avatar {width:58px;height:58px;flex-basis:58px;margin:10px auto;}
@media(max-width:600px){.named-turn-banner{padding:12px 14px}.named-turn-identity .battle-player-avatar{width:38px;height:38px;flex-basis:38px}.versus-player .battle-player-avatar{width:46px;height:46px;flex-basis:46px}}


/* Battle Pass: single horizontal reward timeline, centered on the current tier. */
#career-screen .career-tier-track {
  display:flex;
  flex-wrap:nowrap;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:12px 8px 18px;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  scrollbar-width:thin;
  scrollbar-color:rgba(190,155,255,.55) rgba(255,255,255,.06);
}
#career-screen .career-tier-tile {
  flex:0 0 116px;
  min-height:126px;
  scroll-snap-align:center;
  border-radius:8px;
  transition:border-color .2s,background .2s,transform .2s,box-shadow .2s;
}
#career-screen .career-tier-tile.current {
  border:1px solid rgba(238,205,139,.95);
  background:linear-gradient(145deg,rgba(174,127,61,.28),rgba(255,255,255,.035));
  box-shadow:0 0 0 1px rgba(238,205,139,.2),0 0 22px rgba(220,169,91,.16);
  transform:translateY(-3px);
}
#career-screen .career-tier-tile.current>span,
#career-screen .career-tier-tile.current>b {color:#ffe0a3;}
#career-screen .career-tier-tile.current>small {color:#f0d5a5;}

#career-screen .career-tier-tile.rarity-singularity {
  border:1px solid transparent;
  background:
    linear-gradient(155deg,rgba(12,14,28,.94),rgba(18,10,28,.96)) padding-box,
    linear-gradient(110deg,#ff4f72,#ffd84f,#63f28d,#54c8ff,#a96dff,#ff4fbc,#ff4f72) border-box;
  background-size:100% 100%,240% 100%;
  box-shadow:inset 0 0 18px rgba(130,100,255,.14),0 0 13px rgba(145,105,255,.2);
  animation:singularity-rarity-flow 7s linear infinite;
}
#career-screen .career-tier-tile.rarity-singularity .career-tier-level,
#career-screen .career-tier-tile.rarity-singularity .career-tier-name {
  color:#e8dfff;
  text-shadow:0 0 8px rgba(180,125,255,.45);
}
#career-screen .career-tier-tile.rarity-singularity .career-tier-amount {
  color:#fff;
  text-shadow:0 0 10px rgba(180,125,255,.55);
}

@media(max-width:700px) {
  #career-screen .career-tier-track {gap:8px;padding-inline:6px;}
  #career-screen .career-tier-tile {flex-basis:100px;min-height:112px;}
}


/* Battle Pass dashboard: keep the complete tab inside the available screen height. */
#career-screen .career-main:has([data-career-pane="pass"].active) {
  overflow:hidden;
  padding:clamp(12px,1.8vh,22px) clamp(16px,2.4vw,34px);
}
#career-screen [data-career-pane="pass"].active {
  width:100%;
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  grid-template-rows:auto auto auto auto minmax(0,1fr);
  gap:clamp(8px,1.2vh,14px) clamp(12px,1.5vw,20px);
  overflow:hidden;
}
#career-screen [data-career-pane="pass"]>.career-page-heading {
  grid-column:1 / -1;
  margin:0;
}
#career-screen [data-career-pane="pass"]>.career-page-heading h1 {
  margin:2px 0 3px;
  font-size:clamp(22px,2.2vw,30px);
}
#career-screen [data-career-pane="pass"]>.career-page-heading p {
  font-size:11px;
  line-height:1.35;
}
#career-screen [data-career-pane="pass"]>.career-pass-hero {
  grid-column:1;
  min-height:0;
  padding:clamp(10px,1.4vh,16px);
}
#career-screen [data-career-pane="pass"] .career-pass-hero h2 {
  margin:4px 0;
  font-size:clamp(18px,1.8vw,24px);
}
#career-screen [data-career-pane="pass"] .career-pass-hero p {
  font-size:10px;
}
#career-screen [data-career-pane="pass"] .career-pass-seal {
  width:48px;
  height:48px;
  flex-basis:48px;
  font-size:24px;
}
#career-screen [data-career-pane="pass"]>.career-pass-progress {
  grid-column:2;
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:center;
  margin:0;
  padding:12px 16px;
}
#career-screen [data-career-pane="pass"] .career-pass-progress p {
  margin-top:7px;
  font-size:10px;
}
#career-screen [data-career-pane="pass"]>.career-section-heading {
  grid-column:1 / -1;
  margin:0;
}
#career-screen [data-career-pane="pass"]>.career-section-heading h2 {
  font-size:17px;
}
#career-screen [data-career-pane="pass"]>.career-mission-list {
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
#career-screen [data-career-pane="pass"] .career-mission-list>div {
  min-width:0;
  padding:10px 12px;
  gap:8px;
}
#career-screen [data-career-pane="pass"] .career-mission-list small {
  min-width:0;
  font-size:9px;
}
#career-screen [data-career-pane="pass"]>.career-pass-tiers {
  grid-column:1 / -1;
  display:flex;
  flex-direction:column;
  min-height:0;
  margin:0;
}
#career-screen [data-career-pane="pass"] .career-pass-tiers .career-section-heading {
  flex:0 0 auto;
  margin:0;
}
#career-screen [data-career-pane="pass"] .career-tier-track {
  flex:1 1 auto;
  min-height:0;
  align-items:stretch;
  margin-top:6px;
  padding:7px 8px 12px;
  overflow-x:auto;
  overflow-y:hidden;
}
#career-screen [data-career-pane="pass"] .career-tier-tile {
  min-height:78px;
  padding:7px 4px;
}
#career-screen [data-career-pane="pass"] .career-pass-tier-note {
  flex:0 0 auto;
  margin-top:5px;
  font-size:9px;
  line-height:1.3;
}
@media(max-height:760px) and (min-width:701px) {
  #career-screen .career-main:has([data-career-pane="pass"].active) {padding-top:8px;padding-bottom:8px;}
  #career-screen [data-career-pane="pass"].active {gap:7px 14px;}
  #career-screen [data-career-pane="pass"]>.career-page-heading h1 {font-size:22px;}
  #career-screen [data-career-pane="pass"]>.career-page-heading p {display:none;}
  #career-screen [data-career-pane="pass"] .career-mission-list>div {padding:7px 10px;}
  #career-screen [data-career-pane="pass"] .career-tier-tile {min-height:66px;}
  #career-screen [data-career-pane="pass"] .career-pass-tier-note {display:none;}
}
@media(max-width:700px) {
  #career-screen .career-main:has([data-career-pane="pass"].active) {overflow-y:auto;}
  #career-screen [data-career-pane="pass"].active {
    height:auto;
    min-height:100%;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto;
    overflow:visible;
  }
  #career-screen [data-career-pane="pass"]>.career-pass-hero,
  #career-screen [data-career-pane="pass"]>.career-pass-progress,
  #career-screen [data-career-pane="pass"]>.career-section-heading,
  #career-screen [data-career-pane="pass"]>.career-mission-list,
  #career-screen [data-career-pane="pass"]>.career-pass-tiers {grid-column:1;}
  #career-screen [data-career-pane="pass"]>.career-mission-list {grid-template-columns:1fr;}
  #career-screen [data-career-pane="pass"]>.career-pass-tiers {min-height:180px;}
}


/* Battle Pass: remove the two large intro panels and give missions a three-row scroll window. */
#career-screen [data-career-pane="pass"].active {
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto minmax(0,1fr) minmax(0,1fr);
}
#career-screen [data-career-pane="pass"]>.career-pass-progress-inline {
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:auto minmax(100px,1fr) auto;
  align-items:center;
  gap:12px;
  margin:0;
  padding:0 2px 4px;
  border:0;
  background:none;
}
#career-screen [data-career-pane="pass"] .career-pass-progress-inline>div:first-child {
  margin:0;
  gap:12px;
  white-space:nowrap;
}
#career-screen [data-career-pane="pass"] .career-pass-progress-inline .career-progress-track {min-width:80px;}
#career-screen [data-career-pane="pass"] .career-pass-progress-inline p {margin:0;white-space:nowrap;}
#career-screen [data-career-pane="pass"]>.career-section-heading {grid-column:1;}
#career-screen [data-career-pane="pass"]>.career-mission-list {
  grid-column:1;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-auto-rows:minmax(48px,auto);
  align-content:start;
  gap:8px;
  max-height:calc(3 * 48px + 2 * 8px);
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:2px 8px 2px 2px;
  margin:0;
  scrollbar-width:thin;
  scrollbar-color:rgba(190,155,255,.5) rgba(255,255,255,.05);
}
#career-screen [data-career-pane="pass"] .career-mission-list>div {
  min-height:48px;
  padding:8px 12px;
}
#career-screen [data-career-pane="pass"]>.career-pass-tiers {grid-column:1;}
@media(max-width:700px) {
  #career-screen [data-career-pane="pass"].active {grid-template-rows:auto auto minmax(150px,auto) minmax(180px,auto);}
  #career-screen [data-career-pane="pass"]>.career-pass-progress-inline {
    grid-template-columns:1fr auto;
    row-gap:6px;
  }
  #career-screen [data-career-pane="pass"] .career-pass-progress-inline .career-progress-track {grid-column:1 / -1;grid-row:2;}
  #career-screen [data-career-pane="pass"] .career-pass-progress-inline p {grid-column:1 / -1;grid-row:3;white-space:normal;}
  #career-screen [data-career-pane="pass"]>.career-mission-list {max-height:calc(3 * 48px + 2 * 8px);}
}


/* Battle Pass layout after removing the progress panel: bring missions directly under the page heading. */
#career-screen [data-career-pane="pass"].active {
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto auto minmax(0,1fr);
  row-gap:clamp(8px,1.2vh,14px);
}
#career-screen [data-career-pane="pass"]>.career-page-heading {grid-column:1;grid-row:1;}
#career-screen [data-career-pane="pass"]>.career-section-heading {grid-column:1;grid-row:2;margin:0;}
#career-screen [data-career-pane="pass"]>.career-mission-list {
  grid-column:1;
  grid-row:3;
  align-self:start;
  margin:0;
}
#career-screen [data-career-pane="pass"]>.career-pass-tiers {grid-column:1;grid-row:4;min-height:0;}
@media(max-width:700px) {
  #career-screen [data-career-pane="pass"].active {grid-template-rows:auto auto auto auto;}
  #career-screen [data-career-pane="pass"]>.career-pass-tiers {grid-row:4;}
}


/* Reserve the full space for three missions, even when fewer are currently shown. */
#career-screen [data-career-pane="pass"].active {
  grid-template-rows:auto auto 160px minmax(0,1fr);
}
#career-screen [data-career-pane="pass"]>.career-mission-list {
  height:160px;
  min-height:160px;
  max-height:160px;
  box-sizing:border-box;
  align-self:start;
}
@media(max-width:700px) {
  #career-screen [data-career-pane="pass"].active {
    grid-template-rows:auto auto 160px minmax(180px,auto);
  }
  #career-screen [data-career-pane="pass"]>.career-mission-list {
    height:160px;
    min-height:160px;
    max-height:160px;
  }
}


/* Battle Pass missions: Daily on the left, Weekly on the right. */
#career-screen [data-career-pane="pass"]>.career-mission-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-flow:row;
  grid-auto-rows:1fr;
  align-items:stretch;
  gap:12px;
  overflow:visible;
  height:160px;
  min-height:160px;
  max-height:160px;
}
#career-screen [data-career-pane="pass"] .career-mission-list>div {
  min-width:0;
  height:100%;
  box-sizing:border-box;
}
@media(max-width:700px) {
  #career-screen [data-career-pane="pass"]>.career-mission-list {
    grid-template-columns:repeat(2,minmax(0,1fr));
    height:160px;
    min-height:160px;
    max-height:160px;
    gap:8px;
  }
}


/* Battle Pass: three daily quests in the left column, weekly quests on the right. */
#career-screen [data-career-pane="pass"]>.career-mission-list {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  grid-template-rows:1fr;
  gap:12px;
  height:160px;
  min-height:160px;
  max-height:160px;
  overflow:hidden;
}
#career-screen [data-career-pane="pass"] .career-mission-group {
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  gap:6px;
}
#career-screen [data-career-pane="pass"] .career-mission-group-heading {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:22px;
  font-weight:700;
}
#career-screen [data-career-pane="pass"] .career-mission-entry {
  display:flex;
  flex:1 1 0;
  flex-direction:column;
  justify-content:center;
  min-height:0;
  min-width:0;
  padding:6px 10px;
  border:1px solid rgba(190,155,255,.18);
  border-radius:8px;
  background:rgba(255,255,255,.035);
  gap:3px;
}
#career-screen [data-career-pane="pass"] .career-mission-entry strong {
  font-size:12px;
  line-height:1.25;
}
#career-screen [data-career-pane="pass"] .career-mission-entry small,
#career-screen [data-career-pane="pass"] .career-mission-empty small {
  font-size:10px;
  opacity:.7;
}
#career-screen [data-career-pane="pass"] .career-mission-empty {
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:8px;
  border:1px dashed rgba(190,155,255,.2);
  border-radius:8px;
  text-align:center;
  padding:10px;
}
#career-screen [data-career-pane="pass"] .career-mission-empty b {
  font-size:9px;
  letter-spacing:.12em;
  opacity:.65;
}
@media(max-width:700px) {
  #career-screen [data-career-pane="pass"]>.career-mission-list {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    height:180px;
    min-height:180px;
    max-height:180px;
    gap:8px;
  }
  #career-screen [data-career-pane="pass"] .career-mission-entry {padding:5px 7px;}
  #career-screen [data-career-pane="pass"] .career-mission-entry strong {font-size:10px;}
}


/* Battle Pass mission rows: clean list layout with progress aligned on the right. */
#career-screen [data-career-pane="pass"] .career-mission-group-heading {
  padding:0 2px 8px;
  border-bottom:1px solid rgba(190,155,255,.32);
  font-size:13px;
  letter-spacing:.04em;
}
#career-screen [data-career-pane="pass"] .career-mission-entry {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  column-gap:16px;
  width:100%;
  box-sizing:border-box;
  flex:1 1 0;
  padding:7px 10px;
  border:0;
  border-bottom:1px solid rgba(190,155,255,.16);
  border-radius:0;
  background:transparent;
}
#career-screen [data-career-pane="pass"] .career-mission-entry strong {
  display:block;
  min-width:0;
  text-align:left;
  font-size:12px;
  font-weight:500;
  line-height:1.3;
}
#career-screen [data-career-pane="pass"] .career-mission-entry small {
  display:block;
  justify-self:end;
  min-width:34px;
  margin:0;
  text-align:right;
  white-space:nowrap;
  font-size:11px;
  font-weight:700;
  opacity:.85;
  font-variant-numeric:tabular-nums;
}
#career-screen [data-career-pane="pass"] .career-mission-group {
  gap:0;
}
@media(max-width:700px) {
  #career-screen [data-career-pane="pass"] .career-mission-entry {gap:6px;padding:6px 5px;}
  #career-screen [data-career-pane="pass"] .career-mission-entry strong {font-size:10px;}
  #career-screen [data-career-pane="pass"] .career-mission-entry small {font-size:10px;min-width:28px;}
}


/* Career — saved match history */
#career-screen [data-career-pane="history"] .career-match-history {
  display:flex; flex-direction:column; gap:14px; width:100%; margin-top:22px;
}
#career-screen .career-match-row {
  position:relative; isolation:isolate; overflow:hidden; min-height:154px;
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
  gap:18px; padding:22px 24px; border:1px solid rgba(190,155,255,.25);
  border-radius:9px; background:linear-gradient(110deg,#211b34,#171426 65%,#211b34);
}
#career-screen .career-match-row.victory {border-left:3px solid #83e6ae;}
#career-screen .career-match-row.defeat {border-left:3px solid #ff858e;}
#career-screen .career-match-row.draw {border-left:3px solid #c5b5e8;}
#career-screen .career-match-art {position:absolute; z-index:0; inset:0 0 0 43%; display:flex; justify-content:flex-end; overflow:hidden; opacity:.9; filter:saturate(.82) brightness(.9); pointer-events:none;}
#career-screen .career-match-art-slice {position:relative; flex:0 0 36%; height:100%; min-width:0; margin-left:-6.48%; overflow:hidden; clip-path:polygon(18% 0,100% 0,82% 100%,0 100%); border:0;}
#career-screen .career-match-art-slice:first-child {margin-left:0;}
#career-screen .career-match-art-slice img {display:block !important; position:absolute; top:-14%; left:-27.5%; width:155% !important; height:155% !important; max-width:none !important; object-fit:cover; object-position:center 18%;}
#career-screen .career-match-row:after {content:""; position:absolute; z-index:1; inset:0; pointer-events:none; background:linear-gradient(90deg,#171426 0%,#171426 32%,rgba(23,20,38,.94) 47%,rgba(23,20,38,.48) 66%,rgba(23,20,38,.16) 100%);}
#career-screen .career-match-info, #career-screen .career-match-remaining {display:flex; flex-direction:column; gap:7px; min-width:0; position:relative; z-index:2;}
#career-screen .career-match-info {max-width:70%;}
#career-screen .career-match-topline {display:flex; align-items:center; gap:12px;}
#career-screen .career-match-result {font-size:11px; font-weight:800; letter-spacing:.1em;}
#career-screen .career-match-result.victory {color:#83e6ae;}
#career-screen .career-match-result.defeat {color:#ff858e;}
#career-screen .career-match-result.draw {color:#c5b5e8;}
#career-screen .career-match-mode {font-size:10px; letter-spacing:.12em; color:#b9aecf;}
#career-screen .career-match-info strong {font-size:17px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#fff;}
#career-screen .career-match-info small, #career-screen .career-match-remaining small {font-size:11px; opacity:.72;}
#career-screen .career-match-remaining {text-align:right; position:relative; z-index:2;}
#career-screen .career-match-remaining strong {font-size:17px;}
@media(max-width:600px) {
  #career-screen .career-match-row {min-height:140px; padding:16px 12px; gap:8px;}
  #career-screen .career-match-art {left:38%;}
  #career-screen .career-match-info {max-width:85%;}
  #career-screen .career-match-info strong {font-size:14px;}
  #career-screen .career-match-remaining strong {font-size:14px;}
  #career-screen .career-match-result {font-size:9px;}
}


/* INVENTORY — six item slots per row, populated from the player's item data */
#career-screen .career-inventory-summary { display:flex; align-items:center; justify-content:space-between; margin:22px 0 14px; padding:12px 16px; border:1px solid rgba(190,155,255,.14); background:rgba(255,255,255,.025); }
#career-screen .career-inventory-summary span { color:#9b8da9; font:700 9px Arial,sans-serif; letter-spacing:.14em; }
#career-screen .career-inventory-summary strong { color:#e8d9ff; font:700 18px Georgia,serif; }
#career-screen .career-inventory-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
#career-screen .career-inventory-item { position:relative; display:flex; min-width:0; aspect-ratio:1 / 1; min-height:0; flex-direction:column; align-items:center; justify-content:center; padding:12px 9px; border:1px solid rgba(190,155,255,.18); background:linear-gradient(155deg,rgba(125,92,164,.10),rgba(255,255,255,.018) 65%); text-align:center; transition:border-color .2s,background .2s,transform .2s; }
#career-screen .career-inventory-item:hover { transform:translateY(-3px); border-color:rgba(198,165,255,.5); background:linear-gradient(155deg,rgba(125,92,164,.18),rgba(255,255,255,.035) 65%); }

/* Inventory item rarity frames: Super Rare = blue, Legendary = gold. No rarity labels. */
#career-screen .career-inventory-item[data-rarity="super-rare"] {
  border:1px solid rgba(72,174,255,.9);
  background:linear-gradient(155deg,rgba(20,105,190,.18),rgba(8,15,30,.42) 68%);
  box-shadow:inset 0 0 18px rgba(45,155,255,.12),0 0 12px rgba(45,155,255,.16);
}
#career-screen .career-inventory-item[data-rarity="super-rare"]:hover {
  border-color:rgba(115,205,255,1);
  background:linear-gradient(155deg,rgba(30,130,220,.24),rgba(8,15,30,.48) 68%);
  box-shadow:inset 0 0 22px rgba(45,155,255,.18),0 0 18px rgba(45,155,255,.28);
}
#career-screen .career-inventory-item[data-rarity="legendary"] {
  border:1px solid rgba(255,190,65,.92);
  background:linear-gradient(155deg,rgba(180,105,20,.18),rgba(28,17,8,.44) 68%);
  box-shadow:inset 0 0 18px rgba(255,170,35,.12),0 0 12px rgba(255,170,35,.16);
}
#career-screen .career-inventory-item[data-rarity="legendary"]:hover {
  border-color:rgba(255,220,115,1);
  background:linear-gradient(155deg,rgba(210,135,30,.24),rgba(28,17,8,.5) 68%);
  box-shadow:inset 0 0 22px rgba(255,170,35,.18),0 0 18px rgba(255,170,35,.28);
}

#career-screen .career-inventory-item[data-rarity="singularity"] {
  border:1px solid transparent;
  background:
    linear-gradient(155deg,rgba(12,14,28,.94),rgba(18,10,28,.96)) padding-box,
    linear-gradient(110deg,#ff4f72,#ffd84f,#63f28d,#54c8ff,#a96dff,#ff4fbc,#ff4f72) border-box;
  background-size:100% 100%,240% 100%;
  box-shadow:inset 0 0 22px rgba(130,100,255,.16),0 0 15px rgba(145,105,255,.22);
  animation:singularity-rarity-flow 7s linear infinite;
}
#career-screen .career-inventory-item[data-rarity="singularity"]:hover {
  box-shadow:inset 0 0 26px rgba(130,100,255,.24),0 0 24px rgba(145,105,255,.38);
}
#career-screen .career-inventory-item[data-rarity="singularity"] .career-inventory-item-amount {
  color:#f4eaff;
  text-shadow:0 0 9px rgba(180,125,255,.65);
}
#career-screen .career-inventory-item-icon.anomaly img {
  filter:drop-shadow(0 0 5px rgba(255,105,210,.5)) drop-shadow(0 0 12px rgba(90,205,255,.38));
}

#career-screen .career-inventory-item-icon { display:grid; place-items:center; width:min(58%,76px); aspect-ratio:1 / 1; height:auto; margin:3px 0 9px; border:1px solid rgba(203,174,255,.28); background:radial-gradient(circle,rgba(183,145,255,.18),rgba(37,26,54,.55) 70%); color:#d8c2ff; font-size:38px; text-shadow:0 0 18px currentColor; }
#career-screen .career-inventory-item-icon.dream { color:#91e7ff; border-color:rgba(145,231,255,.38); background:radial-gradient(circle,rgba(91,205,255,.2),rgba(23,43,61,.55) 70%); }
#career-screen .career-inventory-item-icon.stars { color:#f6d58b; border-color:rgba(246,213,139,.38); background:radial-gradient(circle,rgba(246,213,139,.2),rgba(58,43,25,.55) 70%); }
#career-screen .career-inventory-item-icon.fragments { color:#d4a5ff; border-color:rgba(212,165,255,.38); background:radial-gradient(circle,rgba(166,100,255,.2),rgba(43,29,61,.55) 70%); }
#career-screen .career-inventory-item-amount { position:absolute; top:auto; right:auto; bottom:12px; left:50%; transform:translateX(-50%); color:#e8dcf7; font:700 14px Arial,sans-serif; white-space:nowrap; text-shadow:0 0 10px rgba(190,155,255,.28); }
#career-screen .career-inventory-item>strong { color:#f1e9fb; font:700 12px Georgia,serif; }
#career-screen .career-inventory-item>small { margin-top:5px; color:#9589a3; font:9px/1.4 Arial,sans-serif; }
@media(max-width:1050px) { #career-screen .career-inventory-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:700px) { #career-screen .career-inventory-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; } #career-screen .career-inventory-item { padding:8px 6px; } #career-screen .career-inventory-item-icon { width:58%; font-size:32px; } }
@media(max-width:420px) { #career-screen .career-inventory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }


/* Currency artwork — transparent WebP assets supplied for Rift Battleground. */
.currency-pill .currency-icon {
  display:block;
  flex:0 0 30px;
  width:30px;
  height:30px;
  object-fit:contain;
  filter:drop-shadow(0 0 7px rgba(155,112,255,.24));
}
#career-screen .career-inventory-item-icon {
  overflow:visible;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  text-shadow:none;
}
#career-screen .career-inventory-item-icon img {
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  filter:drop-shadow(0 0 10px rgba(165,105,255,.28));
}
#career-screen .career-inventory-item-icon.dream img {filter:drop-shadow(0 0 10px rgba(90,190,255,.32));}
#career-screen .career-inventory-item-icon.stars img {filter:drop-shadow(0 0 10px rgba(255,190,75,.32));}


/* Full-screen event splash art without moving the banner layout.
   Keep the stage in its grid column so the copy stays aligned with the sidebar. */
#banners-screen .banner-stage.custom-banner {
    overflow: visible;
}
#banners-screen .banner-stage.custom-banner .banner-stage-figure {
    position: fixed;
    inset: 0;
    width: auto;
    height: auto;
    z-index: -1;
}

/* Mythic portrait thumbnails: keep the face and upper torso in the wide banner crop. */
.banner-thumb.mythic.custom .banner-thumb-art {
    background-size: cover;
    background-position: center 18%;
}

/* Custom event artwork: use the complete supplied landscape illustration. */
.banner-thumb.custom .banner-thumb-art {
    background-size: cover;
    background-position: center;
}
/* The supplied splash art should remain unobstructed by the default stage overlays. */
.banner-stage.custom-banner .banner-stage-bg {
    display: none;
}
.banner-stage.custom-banner {
    background: transparent !important;
}
.banner-stage.custom-banner .banner-stage-copy {
    background: transparent !important;
    box-shadow: none !important;
}
.banner-stage.custom-banner .banner-stage-copy::before,
.banner-stage.custom-banner .banner-stage-copy::after {
    content: none !important;
    display: none !important;
}
.banner-stage.custom-banner::before {
    content: none !important;
}
/* Keep the bottom fade, stretched across the entire viewport. */
.banner-stage.custom-banner::after {
    position: fixed;
    inset: auto 0 0;
    height: 38vh;
    z-index: 0;
    background: linear-gradient(0deg,rgba(4,6,8,.92),transparent);
    pointer-events: none;
}
.banner-stage.custom-banner .banner-stage-copy,
.banner-stage.custom-banner .banner-rateup,
.banner-stage.custom-banner .banner-tools,
.banner-stage.custom-banner .banner-wish-buttons {
    z-index: 1;
}
.banner-stage.custom-banner .banner-stage-figure {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    background-size: cover;
    background-position: center;
    opacity: 1;
    -webkit-mask: none !important;
    mask: none !important;
}


/* Vhalen & Eldras: render the splash as a dedicated screen-level layer.
   This keeps the artwork behind the header instead of relying on the stage's
   negative-z-index figure (which can fall behind the screen/background). */
#banners-screen {
    position: relative;
    isolation: isolate;
    background: transparent !important;
}
#banners-screen::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: none !important;
}
#banners-screen::after {
    content: none !important;
    display: none !important;
}
#banners-screen .banners-topbar {
    position: relative;
    z-index: 20;
    isolation: isolate;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
#banners-screen .banners-content {
    position: relative;
    z-index: 4;
    background: transparent !important;
    box-shadow: none !important;
}
#banners-screen .banner-stage.custom-banner {
    background: transparent !important;
}
#banners-screen .banner-stage.custom-banner::before,
#banners-screen .banner-stage.custom-banner .banner-stage-bg,
#banners-screen .banner-stage.custom-banner .banner-stage-figure,
#banners-screen .banner-stage.custom-banner .banner-stage-copy::before,
#banners-screen .banner-stage.custom-banner .banner-stage-copy::after {
    content: none !important;
    display: none !important;
}


/* Bottom darkness belongs to the banner stage's own stacking context:
   above the full-screen video, below every interactive banner element. */
#banners-screen .banner-stage.custom-banner::after {
    content: "";
    display: block;
    position: fixed;
    inset: auto 0 0;
    height: 38vh;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(4,6,8,.92), transparent);
}
#banners-screen .banner-stage.custom-banner .banner-stage-copy,
#banners-screen .banner-stage.custom-banner .banner-rateup,
#banners-screen .banner-stage.custom-banner .banner-tools,
#banners-screen .banner-stage.custom-banner .banner-wish-buttons {
    z-index: 2;
}
#banners-screen .banner-stage.custom-banner .banner-upcard {
    z-index: 3;
}

/* Animated Vhalen & Eldras event banner */
#banners-screen .banner-stage.custom-banner .banner-stage-video {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}
#banners-screen .banner-stage.custom-banner .banner-stage-copy,
#banners-screen .banner-stage.custom-banner .banner-rateup,
#banners-screen .banner-stage.custom-banner .banner-tools,
#banners-screen .banner-stage.custom-banner .banner-wish-buttons {
    position: absolute;
    z-index: 2;
}
#banners-screen .banner-stage.custom-banner .banner-upcard {
    position: absolute;
    z-index: 3;
}

/* Banner copy readability: soft dark shadows separate the text from bright video frames. */
#banners-screen .banner-stage.custom-banner .banner-kicker {
    text-shadow: 0 2px 5px rgba(0,0,0,.95), 0 0 12px rgba(0,0,0,.65) !important;
}
#banners-screen .banner-stage.custom-banner .banner-stage-copy h1 {
    text-shadow: 0 3px 6px rgba(0,0,0,.95), 0 6px 18px rgba(0,0,0,.7);
}
#banners-screen .banner-stage.custom-banner .banner-remaining,
#banners-screen .banner-stage.custom-banner .banner-rules,
#banners-screen .banner-stage.custom-banner .banner-rules b,
#banners-screen .banner-stage.custom-banner .banner-remaining b {
    text-shadow: 0 2px 5px rgba(0,0,0,.95), 0 0 10px rgba(0,0,0,.7);
}
#banners-screen .banner-stage.custom-banner .banner-rateup h3 {
    text-shadow: 0 2px 6px rgba(0,0,0,.95), 0 0 12px rgba(0,0,0,.65);
}



/* Season 1 Battle Pass reward tiles */
#career-screen .career-tier-tile {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  min-height:166px;
  padding:10px 8px 12px;
  background:linear-gradient(160deg,rgba(22,27,42,.96),rgba(10,13,23,.98));
  border:1px solid rgba(155,169,204,.2);
  border-radius:9px;
  text-align:center;
}
#career-screen .career-tier-tile .career-tier-level {
  color:#9ca8c2;
  font:700 9px Arial,sans-serif;
  letter-spacing:.12em;
}
#career-screen .career-tier-reward-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:3px;
  width:54px;
  height:54px;
  margin:2px 0;
  border-radius:50%;
  background:radial-gradient(circle,rgba(160,178,224,.16),rgba(160,178,224,.025) 68%,transparent 70%);
}
#career-screen .career-tier-reward-icon img {
  display:block;
  width:46px;
  height:46px;
  object-fit:contain;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,.45));
}
#career-screen .career-tier-amount {
  max-width:100%;
  color:#f0eaf8;
  font:700 13px Arial,sans-serif;
  line-height:1.2;
  overflow-wrap:anywhere;
}
#career-screen .career-tier-name {
  max-width:100%;
  color:#a69ab9;
  font:700 8px/1.35 Arial,sans-serif;
  letter-spacing:.08em;
  overflow-wrap:anywhere;
}
#career-screen .career-tier-tile.milestone {
  border-color:rgba(187,151,239,.42);
  background:linear-gradient(155deg,rgba(74,53,105,.42),rgba(12,15,27,.98) 72%);
}
#career-screen .career-tier-tile.rift-fragments .career-tier-amount,
#career-screen .career-tier-tile.rift-stars .career-tier-amount {color:#d9c4ff;}
#career-screen .career-tier-tile.anomaly-coins {
  border-color:rgba(214,163,83,.48);
  background:linear-gradient(155deg,rgba(106,72,30,.38),rgba(12,15,27,.98) 72%);
}
#career-screen .career-tier-tile.anomaly-coins .career-tier-amount {color:#f0cb8a;}
#career-screen .career-tier-tile.current {
  border-color:rgba(238,205,139,.95);
  box-shadow:0 0 0 1px rgba(238,205,139,.2),0 0 22px rgba(220,169,91,.16);
  transform:translateY(-3px);
}
#career-screen .career-tier-tile.final {
  border-color:rgba(128,190,255,.8);
  background:linear-gradient(155deg,rgba(42,82,130,.55),rgba(8,15,29,.99) 76%);
  box-shadow:inset 0 0 22px rgba(92,164,255,.09);
}
#career-screen .career-tier-tile.final .career-tier-level,
#career-screen .career-tier-tile.final .career-tier-amount {color:#d9edff;}
#career-screen .career-tier-tile.final .career-tier-name {color:#9dcaff;}
/* Frost Hunter artwork is the tile's own full-bleed background. */
#career-screen .career-tier-tile.final.frost-hunter-artwork {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  min-height:148px;
  padding:8px 6px;
  display:grid;
  grid-template-rows:auto 1fr auto auto;
  align-items:stretch;
  justify-items:center;
  gap:4px;
  border:1px solid rgba(154,202,255,.7);
  border-radius:9px;
  background-color:#101a2d;
  background-image:
    linear-gradient(180deg,rgba(5,12,24,.28) 0%,transparent 34%,transparent 55%,rgba(5,12,24,.78) 100%),
    url("assets/ui/battle-pass/frost-hunter.webp");
  background-size:cover;
  background-position:center 35%;
  background-repeat:no-repeat;
}
#career-screen .career-tier-tile.final.frost-hunter-artwork .career-tier-level,
#career-screen .career-tier-tile.final.frost-hunter-artwork .career-tier-amount,
#career-screen .career-tier-tile.final.frost-hunter-artwork .career-tier-name {
  position:relative;
  z-index:1;
  justify-self:center;
  text-shadow:0 1px 5px rgba(0,0,0,.95),0 0 10px rgba(0,0,0,.85);
}
#career-screen .career-tier-tile.final.frost-hunter-artwork .career-tier-level {
  align-self:start;
  color:#e5f2ff;
  padding:3px 6px;
  border-radius:4px;
  background:rgba(5,12,24,.55);
}
#career-screen .career-tier-tile.final.frost-hunter-artwork .career-tier-amount {
  align-self:end;
  color:#fff;
  font-size:13px;
  padding:0;
  background:transparent;
}
#career-screen .career-tier-tile.final.frost-hunter-artwork .career-tier-name {
  align-self:end;
  color:#cfe6ff;
  font-size:8px;
  padding:0;
  background:transparent;
}
#career-screen .career-tier-tile.earned:not(.current) {
  border-color:rgba(151,190,220,.45);
  background:linear-gradient(155deg,rgba(63,96,122,.25),rgba(10,13,23,.98) 75%);
}
#career-screen .career-tier-tile.earned:not(.current) .career-tier-level {color:#c2d9ed;}
#career-screen .career-pass-tier-note {margin-top:8px;}
@media(max-width:700px) {
  #career-screen .career-tier-tile {min-height:148px;padding:8px 6px;}
  #career-screen .career-tier-reward-icon {width:46px;height:46px;}
  #career-screen .career-tier-reward-icon img {width:40px;height:40px;}
  #career-screen .career-tier-amount {font-size:12px;}
}


/* Battle Pass frames follow the rarity colors used by the card and inventory UI. */
#career-screen .career-tier-tile[data-rarity="super-rare"] {
  border-color:rgba(85,169,255,.82);
  background:linear-gradient(155deg,rgba(20,105,190,.24),rgba(8,15,30,.97) 72%);
  box-shadow:inset 0 0 18px rgba(45,155,255,.10),0 0 10px rgba(45,155,255,.12);
}
#career-screen .career-tier-tile[data-rarity="super-rare"] .career-tier-level,
#career-screen .career-tier-tile[data-rarity="super-rare"] .career-tier-amount {color:#8bc8ff;}
#career-screen .career-tier-tile[data-rarity="super-rare"] .career-tier-name {color:#70b8f5;}
#career-screen .career-tier-tile[data-rarity="legendary"] {
  border-color:rgba(255,190,65,.88);
  background:linear-gradient(155deg,rgba(180,105,20,.22),rgba(28,17,8,.97) 72%);
  box-shadow:inset 0 0 18px rgba(255,170,35,.10),0 0 10px rgba(255,170,35,.12);
}
#career-screen .career-tier-tile[data-rarity="legendary"] .career-tier-level,
#career-screen .career-tier-tile[data-rarity="legendary"] .career-tier-amount {color:#ffd65a;}
#career-screen .career-tier-tile[data-rarity="legendary"] .career-tier-name {color:#e8bd62;}
#career-screen .career-tier-tile[data-rarity="mythic"] {
  border-color:rgba(255,83,104,.9);
  background:linear-gradient(155deg,rgba(142,30,54,.38),rgba(22,8,17,.98) 74%);
  box-shadow:inset 0 0 22px rgba(255,60,90,.12),0 0 13px rgba(255,65,95,.18);
}
#career-screen .career-tier-tile[data-rarity="mythic"] .career-tier-level,
#career-screen .career-tier-tile[data-rarity="mythic"] .career-tier-amount {color:#ff7184;}
#career-screen .career-tier-tile[data-rarity="mythic"] .career-tier-name {color:#f18b9b;}
#career-screen .career-tier-tile[data-rarity="mythic"] .career-tier-reward-icon {
  border-color:rgba(255,83,104,.42);
  background:radial-gradient(circle,rgba(255,65,95,.2),rgba(45,10,22,.3));
}
#career-screen .career-tier-tile[data-rarity="mythic"].current {
  border-color:#ff7184;
  box-shadow:0 0 0 1px rgba(255,83,104,.25),0 0 22px rgba(255,65,95,.22);
}
#career-screen .career-tier-tile[data-rarity="mythic"] .frost-hunter-placeholder {
  color:#ff7184;
  border-color:rgba(255,83,104,.5);
  text-shadow:0 0 16px rgba(255,65,95,.8);
}
#career-screen .career-tier-tile[data-rarity="mythic"] .frost-hunter-placeholder em {color:#f18b9b;}


/* Singularity: seamless rainbow loop. */
@keyframes singularity-inventory-smooth {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 0 0, -360px 0, -360px 0; }
}
@keyframes singularity-bp-hue {
  from { filter:hue-rotate(0deg); }
  to   { filter:hue-rotate(360deg); }
}

/* Inventory: preserve the approved look, just make its movement quicker. */
#career-screen .career-inventory-item[data-rarity="singularity"] {
  border:1px solid transparent;
  background:
    linear-gradient(155deg,rgba(12,14,28,.94),rgba(18,10,28,.96)) padding-box,
    repeating-linear-gradient(90deg,
      rgba(255,79,114,.22) 0px,
      rgba(255,216,79,.18) 60px,
      rgba(99,242,141,.19) 120px,
      rgba(84,200,255,.22) 180px,
      rgba(169,109,255,.24) 240px,
      rgba(255,79,188,.22) 300px,
      rgba(255,79,114,.22) 360px) padding-box,
    repeating-linear-gradient(90deg,
      #ff4f72 0px,
      #ffd84f 60px,
      #63f28d 120px,
      #54c8ff 180px,
      #a96dff 240px,
      #ff4fbc 300px,
      #ff4f72 360px) border-box;
  background-size:100% 100%,720px 100%,720px 100%;
  background-position:0 0,0 0,0 0;
  box-shadow:inset 0 0 24px rgba(130,100,255,.20),0 0 16px rgba(145,105,255,.25);
  animation:singularity-inventory-smooth 8s linear infinite;
}
#career-screen .career-inventory-item[data-rarity="singularity"]:hover {
  box-shadow:inset 0 0 30px rgba(130,100,255,.28),0 0 25px rgba(145,105,255,.42);
}

/* Battle Pass: keep the tile background still and animate a masked rainbow border. */
@keyframes singularity-bp-border {
  from { background-position:0 0; }
  to   { background-position:-360px 0; }
}
#career-screen .career-tier-tile[data-rarity="singularity"],
#career-screen .career-tier-tile[data-rarity="singularity"].current,
#career-screen .career-tier-tile[data-rarity="singularity"].earned,
#career-screen .career-tier-tile[data-rarity="singularity"].milestone {
  position:relative;
  isolation:isolate;
  border:1px solid transparent !important;
  background:linear-gradient(155deg,rgba(12,14,28,.94),rgba(18,10,28,.96)) padding-box !important;
  box-shadow:inset 0 0 22px rgba(130,100,255,.20),0 0 16px rgba(145,105,255,.27) !important;
  animation:none !important;
}
#career-screen .career-tier-tile[data-rarity="singularity"]::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  padding:1px;
  border-radius:inherit;
  pointer-events:none;
  background:repeating-linear-gradient(90deg,
    #ff4f72 0px,
    #ffd84f 60px,
    #63f28d 120px,
    #54c8ff 180px,
    #a96dff 240px,
    #ff4fbc 300px,
    #ff4f72 360px);
  background-size:720px 100%;
  background-position:0 0;
  animation:singularity-bp-border 8s linear infinite;
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;
  mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  mask-composite:exclude;
}
#career-screen .career-tier-tile[data-rarity="singularity"] .career-tier-level,
#career-screen .career-tier-tile[data-rarity="singularity"] .career-tier-amount,
#career-screen .career-tier-tile[data-rarity="singularity"] .career-tier-name,
#career-screen .career-tier-tile[data-rarity="singularity"] .career-tier-reward-icon {
  position:relative;
  z-index:1;
}
#career-screen .career-tier-tile[data-rarity="singularity"] .career-tier-level,
#career-screen .career-tier-tile[data-rarity="singularity"] .career-tier-name {
  color:#e8dfff !important;
  text-shadow:0 0 8px rgba(180,125,255,.5);
}
#career-screen .career-tier-tile[data-rarity="singularity"] .career-tier-amount {
  color:#fff !important;
  text-shadow:0 0 10px rgba(180,125,255,.65);
}

/* Battle Pass: compact reward tiles; keep the horizontal reward track readable. */
#career-screen [data-career-pane="pass"] .career-tier-tile {
  flex:0 0 88px;
  min-height:76px;
  gap:4px;
  padding:6px 4px;
}
#career-screen [data-career-pane="pass"] .career-tier-reward-icon {
  width:40px;
  height:40px;
  margin:1px 0;
}
#career-screen [data-career-pane="pass"] .career-tier-reward-icon img {
  width:34px;
  height:34px;
}
#career-screen [data-career-pane="pass"] .career-tier-amount {
  font-size:11px;
}
#career-screen [data-career-pane="pass"] .career-tier-name {
  font-size:7px;
}

/* Battle Pass: control reward tile height, instead of stretching them to fill the track. */
#career-screen [data-career-pane="pass"] .career-tier-track {
  align-items:center;
}
#career-screen [data-career-pane="pass"] .career-tier-tile {
  height:92px;
  min-height:92px;
  align-self:center;
  box-sizing:border-box;
}
@media(max-height:760px) and (min-width:701px) {
  #career-screen [data-career-pane="pass"] .career-tier-tile {
    height:82px;
    min-height:82px;
  }
}

/* Battle Pass: increase reward tile height by 50% and center its contents vertically. */
#career-screen [data-career-pane="pass"] .career-tier-track {
  align-items:center;
}
#career-screen [data-career-pane="pass"] .career-tier-tile {
  height:138px;
  min-height:138px;
  align-self:center;
  justify-content:center;
}
@media(max-height:760px) and (min-width:701px) {
  #career-screen [data-career-pane="pass"] .career-tier-tile {
    height:123px;
    min-height:123px;
  }
}


/* Keep reward cards at full height. Career scrolls vertically; the tier track scrolls horizontally. */
#career-screen .career-main:has([data-career-pane="pass"].active) {
  overflow-x: hidden;
  overflow-y: auto;
}
#career-screen [data-career-pane="pass"].active {
  height: auto;
  min-height: 0;
  grid-template-rows: auto auto auto auto;
  align-content: start;
  overflow: visible;
}
#career-screen [data-career-pane="pass"] > .career-pass-tiers {
  min-width: 0;
}
#career-screen [data-career-pane="pass"] .career-tier-track {
  flex: 0 0 auto;
}


/* PLAYER PROFILE BANNERS */
.social-profile-card.has-profile-banner{position:relative;isolation:isolate;overflow:hidden;border:1px solid rgba(150,174,255,.42);border-radius:10px;background-image:linear-gradient(90deg,rgba(5,8,25,.82),rgba(5,8,25,.32)),var(--profile-banner-image,none);background-size:100% 100%,100% 100%;background-position:center top;background-repeat:no-repeat;box-shadow:0 0 22px rgba(91,119,255,.16)}
.social-profile-card.has-profile-banner .social-profile-info,.social-profile-card.has-profile-banner .social-profile-presence,.social-profile-card.has-profile-banner .social-profile-avatar{position:relative;z-index:1}
.profile-banner-editor{display:grid;gap:13px;max-width:760px;margin:0 0 28px;padding:20px;border:1px solid rgba(190,155,255,.18);background:rgba(13,11,24,.55)}
.profile-banner-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.profile-banner-heading>div{display:grid;gap:4px}
.profile-banner-heading strong{font-family:Cinzel,serif;letter-spacing:.08em}
.profile-banner-heading small{color:rgba(224,216,245,.62)}
.banner-unlocked-count{font-size:10px;letter-spacing:.12em;color:#b9caff}
.profile-banner-preview{min-height:116px;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding:14px;background-color:#090d20;background-size:100% 100%;background-repeat:no-repeat;background-position:center top;border:1px solid rgba(154,174,255,.3);border-radius:7px;color:#fff}
.profile-banner-preview strong{font:700 14px Cinzel,serif;text-shadow:0 2px 8px #000}
.profile-banner-preview span{font-size:9px;letter-spacing:.14em;text-shadow:0 1px 6px #000}
.profile-banner-preview.is-empty{align-items:center;justify-content:center;color:rgba(225,225,245,.55);background:linear-gradient(120deg,#121321,#090b16)}
.profile-banner-option{display:grid;grid-template-columns:92px 1fr;grid-template-rows:1fr auto;gap:7px 11px;align-items:center;text-align:left;padding:8px;border:1px solid rgba(190,155,255,.2);background:rgba(255,255,255,.025);color:#eee;border-radius:7px;cursor:pointer}
.profile-banner-option.selected{border-color:rgba(151,181,255,.85);background:rgba(95,130,255,.1)}
.profile-banner-option img{grid-row:1/3;width:92px;height:54px;object-fit:contain;object-position:center top;border-radius:4px}
.profile-banner-option span{display:grid;gap:3px}
.profile-banner-option strong{font:700 11px Cinzel,serif}
.profile-banner-option small,.profile-banner-option>b{font-size:9px;letter-spacing:.08em;color:#b9caff}
.profile-banner-option>b{justify-self:start}
.friend-main.has-friend-banner{position:relative;isolation:isolate;overflow:hidden;background-image:var(--profile-banner-image,none);background-size:100% 100%;background-position:center top;background-repeat:no-repeat;border:1px solid rgba(150,174,255,.3);border-radius:7px}
.friend-main.has-friend-banner>*{position:relative;z-index:1}


/* Fix friend banner row: keep identity beside the avatar and presence at the far right. */
.friend-main.has-friend-banner > span:nth-child(2) {
  flex: 0 0 auto;
}
.friend-main.has-friend-banner > span:nth-child(3) {
  min-width: 0;
  flex: 1 1 auto;
}

.friend-main.has-friend-banner strong,
.friend-main.has-friend-banner small,
.friend-main.has-friend-banner > b {
  color: #ffce55;
  -webkit-text-stroke: 1.5px #1b1006;
  paint-order: stroke fill;
  text-shadow: 0 1px 2px #1b1006;
}

@media (prefers-reduced-motion: no-preference) {
  .friend-main.has-friend-banner strong,
  .friend-main.has-friend-banner small,
  .friend-main.has-friend-banner > b {
    animation: social-friend-gold-shine 4.8s ease-in-out infinite;
  }
}

@keyframes social-friend-gold-shine {
  0%, 22%, 68%, 100% {
    color: #ffce55;
    text-shadow: 0 1px 2px #1b1006;
  }
  44% {
    color: #fff0ac;
    text-shadow: 0 1px 2px #1b1006, 0 0 7px #f6be56;
  }
}

@media (forced-colors: active) {
  .friend-main.has-friend-banner strong,
  .friend-main.has-friend-banner small,
  .friend-main.has-friend-banner > b {
    color: ButtonText;
    -webkit-text-stroke: 0;
    text-shadow: none;
    animation: none;
  }
}

.friend-main.has-friend-banner .presence {
  position:static;
  order:3;
  flex:0 0 9px;
  width:9px;
  height:9px;
  margin-left:auto;
  border:2px solid rgba(8,10,22,.9);
}
.friend-main.has-friend-banner > b {
  order: 4;
  flex: 0 0 22px;
  line-height: 22px;
  text-align: center;
}


/* Own profile banner fills the top of the Social drawer, behind its title and profile row. */
.friends-sidebar .friends-panel {
  position:relative;
  isolation:isolate;
}
.friends-sidebar .friends-panel:has(.social-profile-card.has-profile-banner)::before {
  content:"";
  position:absolute;
  z-index:0;
  top:0;
  left:0;
  right:0;
  height:165px;
  pointer-events:none;
  background:
    linear-gradient(180deg,rgba(5,8,25,.48) 0%,rgba(5,8,25,.30) 58%,rgba(6,7,15,.98) 100%),
    var(--profile-banner-image,none) center top / 100% 100% no-repeat;
  border-bottom:1px solid rgba(150,174,255,.28);
}
.friends-sidebar .friends-panel > * {
  position:relative;
  z-index:1;
}
.friends-sidebar .friends-head {
  background:linear-gradient(180deg,rgba(13,11,25,.18) 0%,rgba(13,11,25,.08) 78%,transparent 100%) !important;
}
.friends-sidebar .social-profile-card.has-profile-banner {
  border:0;
  border-radius:0;
  background:none !important;
  box-shadow:none !important;
}


/* Preserve the Social heading's original sticky position and leave breathing room below the profile banner. */
.friends-sidebar .friends-head {
  position:sticky !important;
  top:-25px !important;
  z-index:2 !important;
  margin:-25px -22px 0 !important;
  padding:25px 22px 14px !important;
}
.friends-sidebar .friends-panel:has(.social-profile-card.has-profile-banner)::before {
  height:150px;
}
.friends-sidebar .social-profile-card.has-profile-banner {
  margin-bottom:30px !important;
}


/* Zoom the banner artwork slightly so its horizontal crop can move left visibly. */
.friends-sidebar .friends-panel:has(.social-profile-card.has-profile-banner)::before {
  background-size: 100% 100%, 100% 100% !important;
  background-position: center, center top !important;
}


/* Profile banners in the battle intro and turn announcements. */
.versus-player .battle-player-avatar {margin:0;}
.versus-player {
  position:relative;
  isolation:isolate;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:hidden;
  border-radius:10px;
  text-align:left;
}
.versus-player.has-battle-banner {
  background:linear-gradient(90deg,rgba(5,8,20,.78),rgba(5,8,20,.48));
}
.versus-player::before,
.named-turn-banner.has-battle-banner::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:var(--battle-banner-image,none) center / cover no-repeat;
  pointer-events:none;
}
.versus-player.battle-banner-opponent::before,
.named-turn-banner.battle-banner-opponent::before {
  transform:scaleX(-1);
  transform-origin:center;
}
.versus-player-left {text-align:left;}
.versus-player-right {text-align:right;}
.battle-identity {
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  position:relative;
  z-index:1;
}
.battle-identity-player {justify-content:flex-start;}
.battle-identity-opponent {justify-content:flex-end;}
.battle-player-avatar {
  display:block;
  width:clamp(48px,5vw,76px);
  height:clamp(48px,5vw,76px);
  flex:0 0 clamp(48px,5vw,76px);
  object-fit:cover;
  border:2px solid rgba(210,220,255,.72);
  border-radius:50%;
  box-shadow:0 3px 16px rgba(0,0,0,.55);
}
.battle-player-name {
  min-width:0;
  overflow-wrap:anywhere;
  text-shadow:0 2px 10px #000;
}
.versus-player-right .battle-player-name {text-align:right;}
.named-turn-banner {
  isolation:isolate;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  text-align:left;
}
.named-turn-banner > small,
.named-turn-identity {position:relative;z-index:1;}
.named-turn-identity {display:flex;align-items:center;min-width:0;}
.named-turn-opponent {text-align:right;}
.named-turn-opponent .named-turn-identity {justify-content:flex-end;}
.named-turn-local .named-turn-identity {justify-content:flex-start;}
.named-turn-banner.has-battle-banner {
  background:linear-gradient(90deg,rgba(12,20,36,.88),rgba(12,20,36,.72));
}
.named-turn-banner.has-battle-banner::before {z-index:0;}
@media(max-width:600px) {
  .versus-intro {padding:20px 4vw;gap:10px;}
  .versus-player {padding:16px 8px;}
  .battle-identity {gap:8px;}
  .battle-player-avatar {width:38px;height:38px;flex-basis:38px;}
  .battle-player-name {font-size:clamp(14px,3vw,24px);}
  .named-turn-banner {width:min(640px,92vw);padding:12px 14px;}
}


/* Keep battle identity strips compact after adding profile banners and avatars. */
.versus-player {
  padding:14px 12px;
  gap:6px;
}
.versus-player small {margin-bottom:2px;}
.versus-player .battle-player-avatar {
  width:44px;
  height:44px;
  flex-basis:44px;
  margin:0;
}
.named-turn-banner {
  padding:10px 20px;
  gap:5px;
}
.named-turn-banner small {margin-bottom:2px;}
.named-turn-identity .battle-player-avatar {
  width:40px;
  height:40px;
  flex-basis:40px;
  margin:0;
}


/* Restore the original combat banner dimensions from before profile banners were added. */
.versus-player {
  padding:28px 12px;
  gap:0;
}
.versus-player small {margin-bottom:12px;}
.versus-player .battle-player-avatar {
  width:58px;
  height:58px;
  flex-basis:58px;
  margin:10px auto;
}
.named-turn-banner {
  padding:16px 28px;
  gap:0;
}
.named-turn-identity .battle-player-avatar {
  width:48px;
  height:48px;
  flex-basis:48px;
  margin:0;
}
@media(max-width:600px) {
  .versus-intro {
    padding:30px 7vw;
    gap:clamp(12px,4vw,70px);
  }
  .versus-player {padding:28px 12px;}
  .versus-player .battle-player-avatar {
    width:46px;
    height:46px;
    flex-basis:46px;
  }
  .named-turn-banner {padding:12px 14px;}
  .named-turn-identity .battle-player-avatar {
    width:38px;
    height:38px;
    flex-basis:38px;
  }
}


/* Tighten combat overlays: preserve the original compact height, with banners as backgrounds only. */
.versus-player {
  display:block;
  padding:12px 12px;
  gap:0;
}
.versus-player small {margin-bottom:6px;}
.versus-player .battle-player-avatar {
  width:48px;
  height:48px;
  flex-basis:48px;
  margin:0;
}
.battle-identity {gap:10px;}
.named-turn-banner {
  padding:8px 20px;
  gap:3px;
}
.named-turn-banner small {margin-bottom:2px;}
.named-turn-identity .battle-player-avatar {
  width:40px;
  height:40px;
  flex-basis:40px;
  margin:0;
}
@media(max-width:600px) {
  .versus-player {padding:10px 8px;}
  .versus-player .battle-player-avatar {
    width:40px;
    height:40px;
    flex-basis:40px;
  }
  .named-turn-banner {padding:8px 14px;}
  .named-turn-identity .battle-player-avatar {
    width:36px;
    height:36px;
    flex-basis:36px;
  }
}


/* Keep each battle avatar and player name on the same horizontal line. */
.versus-player .battle-identity,
.named-turn-banner .named-turn-identity {
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  min-width:0;
}
.versus-player .battle-player-name,
.named-turn-banner .battle-player-name {
  display:block;
  min-width:0;
  white-space:normal;
}


/* Force avatar and player name to share one row in both battle overlays. */
.versus-player > .battle-identity,
.named-turn-banner > .named-turn-identity {
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  width:100%;
  min-width:0;
}
.versus-player > .battle-identity > .battle-player-avatar,
.named-turn-banner > .named-turn-identity > .battle-player-avatar {
  display:block;
  flex:0 0 48px;
  width:48px;
  height:48px;
  margin:0;
}
.versus-player > .battle-identity > .battle-player-name,
.named-turn-banner > .named-turn-identity > .battle-player-name {
  display:block;
  flex:1 1 auto;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* The versus player container holds the label; keep avatar and name together below it. */
.versus-player {display:block !important;}
.versus-player > .battle-identity {
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:flex-start;
  gap:12px;
  width:100%;
  min-width:0;
}
.versus-player-right > .battle-identity {justify-content:flex-end;}
.versus-player > .battle-identity > .battle-player-avatar {
  display:block;
  flex:0 0 48px;
  width:48px;
  height:48px;
  margin:0;
}
.versus-player > .battle-identity > .battle-player-name {
  display:block;
  flex:0 1 auto;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* Refine versus identity proportions: larger avatar, smaller player name. */
.versus-player > .battle-identity > .battle-player-avatar {
  flex:0 0 76px;
  width:76px;
  height:76px;
}
.versus-player > .battle-identity > .battle-player-name {
  font-size:clamp(20px,2.8vw,40px);
  line-height:1.05;
}
@media(max-width:600px) {
  .versus-player > .battle-identity > .battle-player-avatar {
    flex-basis:60px;
    width:60px;
    height:60px;
  }
  .versus-player > .battle-identity > .battle-player-name {
    font-size:clamp(17px,4vw,26px);
  }
}


/* Give battle names a metallic outline so they remain readable over banner art. */
.versus-player-left .battle-player-name {
  -webkit-text-stroke:1.25px #d6ad58;
  paint-order:stroke fill;
  text-shadow:0 2px 5px #080b18,0 0 12px rgba(214,173,88,.45);
}
.versus-player-right .battle-player-name {
  -webkit-text-stroke:1.25px #c4ccd9;
  paint-order:stroke fill;
  text-shadow:0 2px 5px #080b18,0 0 12px rgba(196,204,217,.45);
}

/* ACHIEVEMENTS */
#career-screen .career-achievement-summary{display:flex;gap:12px;margin:0 0 26px}
#career-screen .career-achievement-summary>div{display:grid;gap:5px;min-width:130px;padding:14px 18px;border:1px solid rgba(190,155,255,.2);background:rgba(18,14,30,.72)}
#career-screen .career-achievement-summary span{color:#9688aa;font:700 9px Arial,sans-serif;letter-spacing:.16em}
#career-screen .career-achievement-summary strong{color:#f2eaff;font:700 26px Cinzel,serif}
#career-screen .career-achievement-groups{display:grid;gap:28px}
#career-screen .career-achievement-category-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
#career-screen .career-achievement-category-heading h2{margin:0;color:#eee4ff;font:700 18px Cinzel,serif}
#career-screen .career-achievement-category-heading span{color:#9d8bb8;font:700 10px Arial,sans-serif;letter-spacing:.12em}
#career-screen .career-achievement-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:10px}
#career-screen .career-achievement-card{display:flex;gap:13px;min-width:0;padding:15px;border:1px solid rgba(190,155,255,.13);background:linear-gradient(135deg,rgba(21,17,34,.9),rgba(9,10,19,.92));opacity:.72}
#career-screen .career-achievement-card.unlocked{opacity:1;border-color:rgba(225,190,112,.42);background:linear-gradient(135deg,rgba(77,56,30,.27),rgba(14,12,22,.94))}
#career-screen .career-achievement-emblem{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border:1px solid rgba(190,155,255,.28);color:#a991d4;font-size:18px}
#career-screen .career-achievement-card.unlocked .career-achievement-emblem{border-color:#cda95f;color:#f0cf83;text-shadow:0 0 12px rgba(240,207,131,.5)}
#career-screen .career-achievement-body{display:grid;gap:5px;min-width:0}
#career-screen .career-achievement-body strong{color:#eee7f7;font:700 12px Cinzel,serif}
#career-screen .career-achievement-body p{margin:0;color:#a69bb4;font:11px/1.5 Arial,sans-serif}
#career-screen .career-achievement-body small{color:#a68bce;font:700 8px Arial,sans-serif;letter-spacing:.12em}
#career-screen .career-achievement-card.unlocked .career-achievement-body small{color:#e5c47e}
#career-screen .career-achievement-card.secret:not(.unlocked) .career-achievement-body p{color:#82798d;font-style:italic}
#career-screen .career-achievement-track{height:3px;overflow:hidden;background:rgba(255,255,255,.08)}
#career-screen .career-achievement-track i{display:block;height:100%;background:linear-gradient(90deg,#8460c2,#d4b1ff)}
@media(max-width:600px){#career-screen .career-achievement-summary{gap:8px}#career-screen .career-achievement-summary>div{flex:1;min-width:0;padding:12px}#career-screen .career-achievement-list{grid-template-columns:1fr}}


/* Card Mastery — clearer progression hierarchy */
.career-mastery-grid { grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.career-mastery-card { align-items:flex-start; gap:14px; padding:14px; border-color:rgba(190,155,255,.18); border-radius:3px; transition:border-color .2s ease,background .2s ease; }
.career-mastery-card.is-ready { border-color:rgba(202,169,255,.72); background:rgba(137,90,205,.11); box-shadow:0 0 18px rgba(142,103,210,.1); }
.career-mastery-card.is-maxed { border-color:rgba(239,207,145,.45); }
.career-mastery-card>img { flex:0 0 76px; width:76px; height:106px; }
.career-mastery-details { flex:1; min-width:0; gap:9px; }
.career-mastery-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.career-mastery-identity { display:grid; gap:4px; min-width:0; }
.career-mastery-identity>strong { color:#f1e9fb; font:700 14px Georgia,serif; overflow-wrap:anywhere; }
.career-mastery-rarity { color:#aa9ab9; font:700 8px Arial,sans-serif; letter-spacing:.12em; }
.career-mastery-level-badge { flex:0 0 auto; padding:5px 7px; border:1px solid rgba(190,155,255,.3); color:#d9c5f6; font:700 8px Arial,sans-serif; letter-spacing:.08em; }
.career-mastery-card.is-ready .career-mastery-level-badge { border-color:rgba(202,169,255,.75); background:rgba(142,103,210,.2); color:#f0e4ff; }
.career-mastery-card.is-maxed .career-mastery-level-badge { border-color:rgba(239,207,145,.5); color:#f1d9a9; }
.career-mastery-progress-header { display:flex; justify-content:space-between; align-items:center; gap:8px; color:#94869f; font:700 8px Arial,sans-serif; letter-spacing:.08em; }
.career-mastery-progress-header strong { color:#e7d9f7; font-size:10px; letter-spacing:.02em; white-space:nowrap; }
.career-mastery-progress { height:7px; border-radius:8px; }
.career-mastery-progress i { border-radius:8px; }
.career-mastery-reward { color:#bba9ce; font:10px/1.5 Arial,sans-serif; }
.career-mastery-ready-label { margin:0; color:#d9c3f5; font:10px/1.5 Arial,sans-serif; }
.career-mastery-hint { margin:0; color:#83778f; font:10px/1.5 Arial,sans-serif; }
.career-mastery-evolve { min-height:30px; padding:8px 12px; border-radius:2px; font-size:9px; }
@media (max-width:600px) {
  .career-mastery-grid { grid-template-columns:1fr; }
  .career-mastery-card { gap:11px; padding:11px; }
  .career-mastery-card>img { flex-basis:64px; width:64px; height:90px; }
  .career-mastery-progress-header { flex-wrap:wrap; }
}

/* Shield frame: one continuous SVG silhouette, matching the stepped rounded reference. */
#battle-screen .shield-protected .card-shield-barrier {
    position:absolute; inset:-28px 0 0 0; z-index:12;
    border:0; border-radius:0; background:none;
    box-shadow:none; overflow:visible; pointer-events:none;
}
#battle-screen .shield-protected .card-shield-barrier::after { content:none; }
#battle-screen .shield-protected .shield-frame-outline {
    display:block; position:absolute; inset:0; width:100%; height:100%;
    overflow:visible; filter:drop-shadow(0 0 4px #48bcff);
}
#battle-screen .shield-protected .shield-frame-outline path {
    fill:none; stroke:#79d9ff; stroke-width:2.4;
    stroke-linecap:round; stroke-linejoin:round; vector-effect:non-scaling-stroke;
}
#battle-screen .shield-protected .card-shield-hp {
    top:-3px; min-width:0; width:64px; padding:2px 3px;
    height:23px; transform:translate(-50%,-100%);
    background:transparent; border:0; border-radius:0; box-shadow:none;
}
#battle-screen .shield-protected .card-shield-hp::before,
#battle-screen .shield-protected .card-shield-hp::after { content:none; }

/* Badge is centered in the raised portion of the single SVG outline. */
#battle-screen .shield-protected .card-shield-hp { top:-25px; height:22px; transform:translateX(-50%); z-index:14; align-items:center; }
#battle-screen .shield-protected .shield-frame-outline { height:100%; width:100%; }

/* Shield outline replaces the ordinary team card border, rather than overlaying it. */
#battle-screen #player-team .battle-card.shield-protected,
#battle-screen #enemy-team .battle-card.shield-protected {
    border-color:transparent !important;
    outline:none !important;
    box-shadow:none !important;
    overflow:visible;
}
#battle-screen #player-team .battle-card.shield-protected { --shield-stroke:#48dfff; --shield-glow:#35cfffaa; }
#battle-screen #enemy-team .battle-card.shield-protected { --shield-stroke:#ff879c; --shield-glow:#ff587caa; }
#battle-screen .battle-card.shield-protected .shield-frame-outline path {
    stroke:var(--shield-stroke); stroke-width:2.8;
}
#battle-screen .battle-card.shield-protected .shield-frame-outline {
    filter:drop-shadow(0 0 5px var(--shield-glow));
}
#battle-screen .battle-card.shield-protected .card-shield-hp {
    color:var(--shield-stroke);
    width:94px; min-width:94px;
    top:-25px; height:22px;
    display:flex; justify-content:center; align-items:center;
    padding:0 5px; box-sizing:border-box;
}
#battle-screen .battle-card.shield-protected .card-shield-hp span { color:#f6fbff; }

/* The shield is the card's ONLY exterior outline. The SVG follows the outer edge. */
#battle-screen #player-team > .battle-card.shield-protected,
#battle-screen #enemy-team > .battle-card.shield-protected,
#battle-screen .battle-team .battle-card.shield-protected {
  border:1px solid transparent !important;
  box-shadow:none !important;
  outline:0 !important;
  background-clip:padding-box;
}
#battle-screen .battle-team .battle-card.shield-protected .card-shield-barrier {
  inset:-28px -1px 0 -1px;
}
#battle-screen .battle-team .battle-card.shield-protected .shield-frame-outline {
  filter:drop-shadow(0 0 5px var(--shield-glow));
}

/* Ornate shield frame: layered neon, precision corner fittings, inset etching and crystals. */
#battle-screen .battle-card.shield-protected .shield-frame-outline { overflow:visible; filter:drop-shadow(0 0 4px var(--shield-glow)); }
#battle-screen .battle-card.shield-protected .shield-frame-outline path { fill:none; stroke:var(--shield-stroke); vector-effect:non-scaling-stroke; stroke-linecap:round; stroke-linejoin:round; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-halo { stroke-width:7; opacity:.13; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-core { stroke-width:2.6; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-inner { stroke-width:.85; opacity:.58; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-corner { stroke-width:2.2; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-crest { stroke-width:1.7; fill:color-mix(in srgb,var(--shield-stroke) 24%,#09121b); }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-gem { stroke-width:1.8; fill:var(--shield-stroke); filter:drop-shadow(0 0 3px var(--shield-stroke)); }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-detail { stroke-width:1.1; opacity:.85; }
#battle-screen .battle-card.shield-protected .card-shield-hp { top:-23px; color:var(--shield-stroke); text-shadow:0 0 7px var(--shield-glow); }

/* Polish: keep the HP readout unobstructed and the lower status chip clear. */
#battle-screen .battle-card.shield-protected .card-shield-hp {
    top:-16px; height:22px; width:94px; padding:0 6px;
    gap:5px; white-space:nowrap; z-index:15;
    background:transparent; border:0; box-shadow:none;
}
#battle-screen .battle-card.shield-protected .card-shield-hp svg { width:14px; height:16px; flex:none; }
#battle-screen .battle-card.shield-protected .card-shield-hp span { font-size:13px; line-height:1; font-weight:800; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-corner { stroke-width:1.35; opacity:.8; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-detail { stroke-width:.8; opacity:.5; }
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-gem { stroke-width:1.5; }

/* Refined upper shield crown: symmetrical etching and a small floating jewel.
   Decorations stay above the HP baseline and do not cross the number. */
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-crown {
    stroke-width:1.35; opacity:.9;
}
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-crown-inlay {
    stroke-width:.9; opacity:.55;
}
#battle-screen .battle-card.shield-protected .shield-frame-outline .shield-frame-crown-jewel {
    stroke-width:1.25; fill:var(--shield-stroke);
    filter:drop-shadow(0 0 2px var(--shield-stroke));
}

/* Card defeat: smooth fade instead of shattering into particles. */
#battle-screen .battle-card.dead {
    animation: none;
    opacity: .2;
    filter: grayscale(1) brightness(.42);
    pointer-events: none;
}
@keyframes battle-card-death-fade {
    0% { opacity: 1; filter: grayscale(0) brightness(1); }
    100% { opacity: .2; filter: grayscale(1) brightness(.42); }
}
@media (prefers-reduced-motion: reduce) {
    #battle-screen .battle-card.dead { animation: none; }
}

/* Only newly defeated cards animate. Kept mounted across battle rerenders. */
#battle-screen .battle-card.dead.death-fading {
    animation: battle-card-death-fade 850ms ease-out both;
}
@media (prefers-reduced-motion: reduce) {
    #battle-screen .battle-card.dead.death-fading { animation: none; }
}

/* Shion: display Normal and Demon cards together in the collection preview. */
#card-modal .modal-content.shion-collection-dual{display:flex;align-items:center;justify-content:center;gap:12px;max-width:96vw;max-height:92vh;box-sizing:border-box}
#card-modal .shion-collection-dual #modal-card-image,#card-modal .shion-collection-dual .shion-collection-second{display:block;width:auto;height:auto;max-height:85vh;max-width:calc((96vw - 48px)/2);object-fit:contain;min-width:0}
@media(max-width:600px){#card-modal .modal-content.shion-collection-dual{gap:5px;padding:5px}#card-modal .shion-collection-dual #modal-card-image,#card-modal .shion-collection-dual .shion-collection-second{max-width:calc((96vw - 20px)/2)}}

/* Kaname: fallen allies are selectable ONLY as Second Pulse targets. */
#battle-screen .battle-card.dead.revive-target {
    pointer-events: auto !important;
    cursor: pointer !important;
    opacity: .58;
    filter: grayscale(.35) brightness(.78);
    outline: 2px solid #ed75bc;
    outline-offset: 2px;
}
/* Move stat covers slightly outward, preserving their dimensions. */
#battle-screen .battle-card-image-wrapper .dynamic-atk { left: 18.5% !important; }
#battle-screen .battle-card-image-wrapper .dynamic-hp { left: 81.5% !important; }
.hq-inspection-atk { left: 18.5% !important; }
.hq-inspection-hp { left: 81.5% !important; }

/* Fine alignment: stat circles 1% further toward the card edges. */
#battle-screen .battle-card-image-wrapper .dynamic-atk { left: 17.5% !important; }
#battle-screen .battle-card-image-wrapper .dynamic-hp { left: 82.5% !important; }
.hq-inspection-atk { left: 17.5% !important; }
.hq-inspection-hp { left: 82.5% !important; }


/* Rift Battleground — unified neon scrollbar theme (feature branch). */
:root {
  scrollbar-width: thin;
  scrollbar-color: rgba(164, 103, 238, .78) rgba(11, 9, 25, .65);
}
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(164, 103, 238, .78) rgba(11, 9, 25, .65);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track {
  background: rgba(11, 9, 25, .65);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c184ff, #7541bb);
  border: 2px solid rgba(11, 9, 25, .65);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #dbadff, #a66af3);
}
::-webkit-scrollbar-corner { background: rgba(11, 9, 25, .65); }

/* Small persistent disclosure across all game screens. */
.ai-generated-watermark {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 2147483647;
  pointer-events: none;
  user-select: none;
  color: rgba(221, 213, 239, .58);
  font: 600 9px/1.2 system-ui, sans-serif;
  letter-spacing: .14em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}


/* Profile banner display: preserve original artwork proportions. */
.profile-banner-preview {
  width: 100%;
  min-height: 0;
  aspect-ratio: 12 / 5;
  box-sizing: border-box;
  background-size: contain;
  background-position: center top;
  background-repeat: no-repeat;
}
.profile-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profile-banner-option {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 96px) minmax(0, 1fr);
  box-sizing: border-box;
}
.profile-banner-option img {
  width: 100%;
  height: auto;
  aspect-ratio: 12 / 5;
  object-fit: contain;
  background: #090d20;
}
.profile-banner-option span { min-width: 0; }
.profile-banner-option strong { overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .profile-banner-grid { grid-template-columns: 1fr; }
}
.social-profile-card.has-profile-banner,
.friend-main.has-friend-banner {
  background-size: contain;
  background-position: center top;
}
.friends-sidebar .friends-panel:has(.social-profile-card.has-profile-banner)::before {
  background-size: 100% 100%, contain !important;
  background-position: center, center top !important;
}

/* Separate assets: SOCIAL 1200×500, FRIENDS 1600×400. */
.friends-sidebar .friends-panel:has(.social-profile-card.has-profile-banner)::before {
  background-size: 100% 100%, cover !important;
  background-position: center, center top !important;
}
.friend-main.has-friend-banner {
  background-size: cover;
  background-position: center top;
}

/* Wider VS artwork panels: give the two players more horizontal room without changing turn banners. */
@media (min-width: 901px) {
  .versus-intro {
    padding-left: 3vw;
    padding-right: 3vw;
    column-gap: clamp(10px, 1.5vw, 28px);
  }
  .versus-intro .versus-mark {
    font-size: clamp(40px, 5vw, 82px);
  }
}


/* Strong, even neon glow around all four arena borders; no center tint. */
#battle-screen.active .battle-arena.turn-glow-player {
  box-shadow:inset 0 0 75px 12px rgba(35,125,255,.70),inset 0 0 15px 3px rgba(85,180,255,.55);
  animation:arena-blue-turn-pulse 4s ease-in-out infinite;
}
#battle-screen.active .battle-arena.turn-glow-enemy {
  box-shadow:inset 0 0 75px 12px rgba(255,42,68,.70),inset 0 0 15px 3px rgba(255,105,115,.55);
  animation:arena-red-turn-pulse 4s ease-in-out infinite;
}
@keyframes arena-blue-turn-pulse {
  0%,100% {box-shadow:inset 0 0 75px 12px rgba(35,125,255,.56),inset 0 0 15px 3px rgba(85,180,255,.45)}
  50% {box-shadow:inset 0 0 75px 12px rgba(35,125,255,.85),inset 0 0 15px 3px rgba(85,180,255,.70)}
}
@keyframes arena-red-turn-pulse {
  0%,100% {box-shadow:inset 0 0 75px 12px rgba(255,42,68,.56),inset 0 0 15px 3px rgba(255,105,115,.45)}
  50% {box-shadow:inset 0 0 75px 12px rgba(255,42,68,.85),inset 0 0 15px 3px rgba(255,105,115,.70)}
}
@media(prefers-reduced-motion:reduce){
  #battle-screen.active .battle-arena.turn-glow-player,
  #battle-screen.active .battle-arena.turn-glow-enemy {animation:none;}
}

/* Battle Mastery — top-aligned stars OUTSIDE each card. */
#battle-screen .battle-card { position:relative; }
#battle-screen .battle-mastery-stars {
    position:absolute; top:0; right:calc(100% + 3px);
    display:flex; flex-direction:column; align-items:center; gap:1px;
    z-index:12; pointer-events:none; line-height:1;
    font-size:clamp(10px,1.15vw,16px); color:#f5c75a;
    text-shadow:0 0 5px rgba(255,190,57,.75),0 1px 2px #180e24;
}
.hq-card-inspection.has-mastery-inspection:not(.shion-dual) {
    left:calc(50% - min(13vw,145px)) !important;
}
.hq-card-inspection .battle-mastery-inspection-panel {
    position:absolute; left:calc(100% + 22px); top:0;
    box-sizing:border-box; width:clamp(235px,25vw,350px);
    max-height:100%; overflow:auto;
    padding:22px; border:1px solid rgba(194,153,255,.42);
    border-radius:12px; background:linear-gradient(145deg,#231b33,#11101b);
    color:#eee5fa; box-shadow:0 15px 50px rgba(0,0,0,.65);
    font:14px/1.5 Arial,sans-serif;
}
.battle-mastery-inspection-heading { display:flex; flex-direction:column; gap:7px; padding-bottom:16px; border-bottom:1px solid rgba(194,153,255,.2); }
.battle-mastery-inspection-heading span { color:#b6a0d7; font-size:10px; letter-spacing:.16em; }
.battle-mastery-inspection-heading strong { color:#f1d18a; font-size:23px; }
.battle-mastery-inspection-stars { color:#f1c45a; letter-spacing:4px; font-size:19px; }
.battle-mastery-inspection-bonuses { padding-top:14px; }
.battle-mastery-inspection-bonuses section { padding:10px 0; border-bottom:1px solid rgba(194,153,255,.15); }
.battle-mastery-inspection-bonuses b { display:block; color:#f2e5ff; }
.battle-mastery-inspection-bonuses p { margin:6px 0; color:#bcb1cc; }
.battle-mastery-inspection-bonuses strong { color:#7fe5b3; }
@media(max-width:850px) {
    .hq-card-inspection.has-mastery-inspection:not(.shion-dual) {
        left:33% !important; height:min(66vh,700px) !important;
    }
    .hq-card-inspection .battle-mastery-inspection-panel {
        left:calc(100% + 10px); width:min(40vw,280px); padding:12px;
    }
}

/* Iridescent/prismatic mastery stars, shared by battle and inspection. */
#battle-screen .battle-mastery-stars span,
.hq-card-inspection .battle-mastery-inspection-stars {
    color:transparent;
    background:linear-gradient(125deg,#ff83dd 0%,#caa0ff 19%,#8de9ff 38%,#b5ffdf 55%,#fff2a1 72%,#ffa5d9 89%,#b8a1ff 100%);
    background-size:220% 220%;
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-stroke:.35px rgba(255,255,255,.8);
    filter:drop-shadow(0 0 3px rgba(165,194,255,.85)) drop-shadow(0 0 5px rgba(220,133,255,.55));
    animation:rift-mastery-prism 4s ease-in-out infinite alternate;
}
@keyframes rift-mastery-prism {
    from {background-position:0% 45%;}
    to {background-position:100% 55%;}
}
@media(prefers-reduced-motion:reduce) {
    #battle-screen .battle-mastery-stars span,
    .hq-card-inspection .battle-mastery-inspection-stars {animation:none;}
}

/* Center the vertical Mastery column in the gap before its card. */
#battle-screen .battle-mastery-stars {
    right:calc(100% + clamp(8px, .8vw, 13px));
    top:0;
    color:transparent;
    text-shadow:none;
    overflow:visible;
}
#battle-screen .battle-mastery-stars span {
    display:block;
    color:transparent !important;
    -webkit-text-fill-color:transparent !important;
    background-image:linear-gradient(110deg,#ff56c8 0%,#8a67ff 18%,#40caff 36%,#60ffcd 53%,#fff17c 70%,#ff8d9e 86%,#ff56c8 100%) !important;
    background-size:350% 350%;
    -webkit-background-clip:text !important;
    background-clip:text !important;
    -webkit-text-stroke:.2px rgba(255,255,255,.35);
    text-shadow:none !important;
    filter:drop-shadow(0 0 2px rgba(255,255,255,.85)) drop-shadow(0 0 5px rgba(142,103,255,.8));
    animation:rift-mastery-prism 2.5s linear infinite alternate;
}
.hq-card-inspection .battle-mastery-inspection-stars {
    -webkit-text-fill-color:transparent;
    text-shadow:none;
}

/* Mastery: tighter gap alignment and coin-like localized iridescent glint. */
#battle-screen .battle-mastery-stars {
    right:calc(100% + clamp(4px, .42vw, 7px));
}
#battle-screen .battle-mastery-stars span,
.hq-card-inspection .battle-mastery-inspection-stars {
    color:transparent !important;
    -webkit-text-fill-color:transparent !important;
    /* Mostly luminous pearlescent silver; the narrow rainbow band travels across it. */
    background-image:linear-gradient(112deg,
        #e9e5ff 0%, #f9f5ff 31%,
        #f2eaff 38%, #f3b9fa 43%, #a7b4ff 47%,
        #8be7fa 51%, #a4f9d9 55%, #fff0a7 59%,
        #f8efff 65%, #e9e5ff 100%) !important;
    background-size:360% 100% !important;
    background-position:0% 50%;
    -webkit-background-clip:text !important;
    background-clip:text !important;
    text-shadow:none !important;
    -webkit-text-stroke:.2px rgba(255,255,255,.35);
    animation:rift-mastery-coin-glint 4s ease-in-out infinite !important;
}
@keyframes rift-mastery-coin-glint {
    0%, 12% { background-position:0% 50%; }
    75%, 100% { background-position:100% 50%; }
}
@media(prefers-reduced-motion:reduce) {
    #battle-screen .battle-mastery-stars span,
    .hq-card-inspection .battle-mastery-inspection-stars {animation:none !important;background-position:50% 50%;}
}

/* Final Mastery tuning: midpoint of the previous two horizontal offsets,
   with a broader, brighter, more saturated moving prism highlight. */
#battle-screen .battle-mastery-stars {
    right:calc(100% + clamp(6px, .61vw, 10px));
}
#battle-screen .battle-mastery-stars span,
.hq-card-inspection .battle-mastery-inspection-stars {
    background-image:linear-gradient(112deg,
        #eeeaff 0%, #f7f4ff 19%,
        #f8b3f2 29%, #e879fa 36%, #9a81ff 43%,
        #58c9ff 50%, #55f6e4 57%, #b5ff9d 64%,
        #ffe48b 71%, #ff9fc9 78%, #f9f2ff 88%,
        #eeeaff 100%) !important;
    background-size:220% 100% !important;
    filter:drop-shadow(0 0 3px rgba(255,255,255,.9)) drop-shadow(0 0 7px rgba(174,120,255,.95)) !important;
    animation:rift-mastery-coin-glint 3s ease-in-out infinite !important;
}
@media(prefers-reduced-motion:reduce) {
    #battle-screen .battle-mastery-stars span,
    .hq-card-inspection .battle-mastery-inspection-stars {animation:none !important;background-position:50% 50%;}
}

/* Account profile */
#player-menu-profile{position:absolute;left:24px;bottom:24px;z-index:5;display:flex;align-items:center;gap:16px;padding:12px 16px;background:transparent;border:1px solid transparent;color:#fff;cursor:pointer;text-align:left;max-width:calc(100% - 16px)}
#player-menu-avatar{width:72px;height:72px;flex:0 0 auto;object-fit:cover;border:1px solid #a58bd8;border-radius:3px}
.player-menu-progress{display:grid;gap:6px;width:240px;min-width:0}
#player-menu-level{font-size:18px}
#player-menu-profile .player-xp-track{height:10px}
.player-menu-progress small{font-size:13px;color:#c8bbdf}
.player-xp-track{display:block;height:7px;background:#383047;overflow:hidden;border-radius:3px}
.player-xp-track i{display:block;height:100%;width:0;background:#a78bfa;transition:width .25s}
#player-profile-screen [data-player-pane][hidden]{display:none!important}
#player-profile-screen [data-player-pane]{padding:16px}
#player-profile-screen .settings-content{overflow:auto}
#player-reward-track{display:flex;gap:14px;overflow-x:auto;padding:12px 2px 20px;scrollbar-color:#7861a7 #211c32}
.player-reward-tile{flex:0 0 126px;display:grid;gap:8px;text-align:center;color:#e7dcff;--tier:#504763}
.player-reward-square{box-sizing:border-box;width:126px;height:126px;border:2px solid var(--tier);background:#211c32;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px}
.player-reward-square span{display:flex;align-items:center;gap:6px;font-weight:bold}
.player-reward-square img{width:28px;height:28px;object-fit:contain}
.player-reward-tile[data-tier=standard]{--tier:#9b7ad6}
.player-reward-tile[data-tier=special]{--tier:#6fc8ec}
.player-reward-tile[data-tier=premium]{--tier:#d9ae65}
.player-reward-tile[data-tier=major]{--tier:#e9c67c}
.player-reward-tile[data-tier=prestige]{--tier:#ec7ca8}
.player-reward-tile[data-tier=legendary]{--tier:#fff0a3}
.player-reward-tile button,.player-reward-navigation button{background:#443362;border:1px solid #8c72bf;color:#fff;padding:7px;cursor:pointer}
.player-reward-tile button:disabled,.player-reward-navigation button:disabled{opacity:.5;cursor:default}
.player-reward-navigation{display:flex;align-items:center;gap:12px}
@media(max-width:600px){
    #player-menu-profile{padding:8px;gap:10px}
    #player-menu-avatar{width:48px;height:48px}
    .player-menu-progress{width:160px;gap:4px}
    #player-menu-level{font-size:15px}
    #player-menu-profile .player-xp-track{height:8px}
    .player-menu-progress small{font-size:12px}
}

/* Anchor player profile to the bottom-left edge of the menu. */
#main-menu #player-menu-profile{position:fixed;left:0;bottom:0;margin:0;border-radius:0;z-index:20!important;pointer-events:auto!important}

/* Player progression — dedicated Rift interface */
#player-profile-screen{background:radial-gradient(ellipse at 75% 0%,#39235b88,transparent 55%),radial-gradient(ellipse at 0% 100%,#251b4988,transparent 60%),#080a14}
#player-profile-screen .settings-shell{width:min(1440px,calc(100% - 80px));margin:clamp(24px,5vh,64px) auto}
#player-profile-screen .settings-header{padding-bottom:24px;border-bottom:1px solid #8e72b955}
#player-profile-screen .settings-header h1{font-size:clamp(28px,4vw,52px);letter-spacing:.09em}
#player-profile-screen .settings-tabs{display:flex;gap:12px;margin:24px 0}
#player-profile-screen .settings-tab{flex:1;max-width:260px;letter-spacing:.12em;padding:16px 24px;border:1px solid #655281;background:#161326;color:#b9accd}
#player-profile-screen .settings-tab.active{background:linear-gradient(110deg,#35224f,#1d1831);border-color:#b69ae9;color:#fff;box-shadow:inset 0 -3px #b69ae9,0 0 24px #9d72dc22}
#player-profile-screen .settings-content{background:transparent;border:0;box-shadow:none}
#player-profile-screen [data-player-pane="progression"]{padding:clamp(16px,3vw,36px);border:1px solid #665281;background:linear-gradient(145deg,#20182fdd,#0d101cdd);box-shadow:0 18px 60px #0006}
#player-profile-level{font-size:clamp(32px,5vw,64px);letter-spacing:.08em;color:#e5d4ff;text-shadow:0 0 25px #a477ed66;margin:0 0 18px}
#player-profile-screen .player-xp-track{height:13px;border:1px solid #72599d;background:#0b0b17;border-radius:0}
#player-profile-screen .player-xp-track i{background:linear-gradient(90deg,#6542b5,#c8a4ff);box-shadow:0 0 18px #b38aff}
#player-profile-xp{text-align:right;color:#c5b3e4;font-weight:600;margin:10px 0 36px}
#player-profile-screen [data-player-pane="progression"] h2:not(#player-profile-level){font-size:22px;letter-spacing:.13em;border-bottom:1px solid #8b71b455;padding-bottom:14px;margin-bottom:18px}
#player-profile-screen .player-reward-navigation{justify-content:flex-end;color:#c8b8e4;letter-spacing:.1em;font-size:12px}
#player-profile-screen .player-reward-navigation button{width:38px;height:38px;background:#211a35;border-color:#8065ad;font-size:20px}
#player-reward-track{gap:20px;padding:24px 4px 26px;scroll-snap-type:x proximity}
#player-profile-screen .player-reward-tile{flex-basis:154px;gap:10px;scroll-snap-align:start}
#player-profile-screen .player-reward-tile>strong{font-size:12px;letter-spacing:.12em;color:#d6c6ed}
#player-profile-screen .player-reward-square{position:relative;width:154px;height:154px;background:radial-gradient(ellipse at 50% 35%,#51406a88,transparent 75%),linear-gradient(145deg,#282039,#12111e);border:1px solid var(--tier);box-shadow:inset 0 0 0 4px #0c0b1555,inset 0 0 24px #0005;gap:8px}
#player-profile-screen .player-reward-square:before,#player-profile-screen .player-reward-square:after{content:"";position:absolute;width:13px;height:13px;border-color:var(--tier);border-style:solid;pointer-events:none}
#player-profile-screen .player-reward-square:before{top:3px;left:3px;border-width:2px 0 0 2px}
#player-profile-screen .player-reward-square:after{bottom:3px;right:3px;border-width:0 2px 2px 0}
#player-profile-screen .player-reward-square img{width:34px;height:34px;filter:drop-shadow(0 0 8px #b59ae34d)}
#player-profile-screen .player-reward-square span:only-child{flex-direction:column;font-size:22px;gap:10px}
#player-profile-screen .player-reward-square span:only-child img{width:64px;height:64px}
#player-profile-screen .player-reward-tile button{height:38px;font-weight:700;letter-spacing:.1em;font-size:11px;background:linear-gradient(110deg,#6546a1,#38265d);border:1px solid #ad8de2}
#player-profile-screen .player-reward-tile button:not(:disabled):hover{background:#8560c3;box-shadow:0 0 16px #ad8de255}
#player-profile-screen .player-reward-tile button:disabled{background:#151522;border-color:#4b405e;color:#a79bb9}
@media(max-width:600px){#player-profile-screen .settings-shell{width:calc(100% - 24px)}#player-profile-screen .settings-tab{padding:12px 8px;font-size:11px}}

/* Keep the progression view within one viewport; rewards scroll horizontally only. */
#player-profile-screen{height:100dvh;min-height:0;overflow:hidden!important}
#player-profile-screen .settings-shell{box-sizing:border-box;height:100%;min-height:0;margin:0 auto;padding:clamp(8px,2.5dvh,28px) 0;display:flex;flex-direction:column;gap:clamp(4px,1.2dvh,14px)}
#player-profile-screen .settings-header{flex:none;padding-bottom:clamp(4px,1.5dvh,16px);margin:0}
#player-profile-screen .settings-header h1{font-size:clamp(20px,5dvh,48px);margin:0}
#player-profile-screen .settings-tabs{flex:none;margin:0}
#player-profile-screen .settings-tab{padding:clamp(5px,1.4dvh,14px) 16px}
#player-profile-screen .settings-content{flex:1;min-height:0;overflow:hidden!important;padding:0}
#player-profile-screen [data-player-pane="progression"]:not([hidden]){box-sizing:border-box;height:100%;min-height:0;display:flex;flex-direction:column;padding:clamp(8px,2.5dvh,28px);overflow:hidden;--reward-size:clamp(60px,21dvh,154px)}
#player-profile-screen #player-profile-level{flex:none;font-size:clamp(22px,6dvh,58px);margin:0 0 clamp(4px,1.5dvh,14px)}
#player-profile-screen [data-player-pane="progression"] .player-xp-track{flex:none;height:clamp(6px,1.6dvh,13px)}
#player-profile-screen #player-profile-xp{flex:none;margin:4px 0 clamp(6px,2dvh,24px)}
#player-profile-screen [data-player-pane="progression"] h2:not(#player-profile-level){flex:none;font-size:clamp(14px,2.6dvh,22px);padding-bottom:clamp(3px,1dvh,10px);margin:0 0 4px}
#player-profile-screen .player-reward-navigation{flex:none}
#player-profile-screen .player-reward-navigation button{height:clamp(22px,4.5dvh,38px)}
#player-profile-screen #player-reward-track{flex:none;min-height:0;overflow-x:auto;overflow-y:hidden;padding:clamp(4px,1.5dvh,16px) 4px;gap:clamp(8px,2vw,20px)}
#player-profile-screen .player-reward-tile{flex-basis:var(--reward-size);gap:clamp(3px,1dvh,10px)}
#player-profile-screen .player-reward-square{width:var(--reward-size);height:var(--reward-size);gap:clamp(1px,.7dvh,8px)}
#player-profile-screen .player-reward-square img{width:clamp(15px,4dvh,34px);height:clamp(15px,4dvh,34px)}
#player-profile-screen .player-reward-square span:only-child img{width:clamp(24px,8dvh,64px);height:clamp(24px,8dvh,64px)}
#player-profile-screen .player-reward-square span:only-child{font-size:clamp(12px,2.8dvh,22px);gap:4px}
#player-profile-screen .player-reward-tile button{height:clamp(22px,4.5dvh,38px);padding:2px}
#player-profile-screen #player-reward-message{margin:0;font-size:12px}

/* Horizontal reward track and luminous claimable rewards */
#player-profile-screen #player-reward-track{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow-x:scroll!important;overflow-y:hidden!important;scroll-snap-type:none;touch-action:pan-x;scrollbar-width:auto;scrollbar-color:#9276c5 #191526;padding-inline:12px}
#player-profile-screen #player-reward-track::-webkit-scrollbar{height:10px}
#player-profile-screen #player-reward-track::-webkit-scrollbar-track{background:#191526}
#player-profile-screen #player-reward-track::-webkit-scrollbar-thumb{background:#9276c5;border-radius:5px}
#player-profile-screen .player-reward-tile{flex-shrink:0}
#player-profile-screen .player-reward-tile.claimable{--tier:#ffda78}
#player-profile-screen .player-reward-tile.claimable>strong{color:#ffe6a2;text-shadow:0 0 8px #ffc94e88}
#player-profile-screen .player-reward-tile.claimable .player-reward-square{border:2px solid #ffda78;background:radial-gradient(ellipse at center,#70501f66,transparent 80%),linear-gradient(145deg,#30263a,#17131f);box-shadow:0 0 10px #ffc64eaa,inset 0 0 18px #ffca4c44;animation:player-reward-glow 2s ease-in-out infinite alternate}
#player-profile-screen .player-reward-tile.claimable button{background:linear-gradient(110deg,#ffe6a2,#c58a30);border-color:#ffe7a4;color:#261704;box-shadow:0 0 10px #ffcf5766}
#player-profile-screen .player-reward-tile.claimable button:not(:disabled):hover{background:#fff0b7;color:#261704;box-shadow:0 0 16px #ffcf57aa}
@keyframes player-reward-glow{from{box-shadow:0 0 6px #ffc64e88,inset 0 0 12px #ffca4c33}to{box-shadow:0 0 12px #ffc64ecc,inset 0 0 22px #ffca4c55}}
@media(prefers-reduced-motion:reduce){#player-profile-screen .player-reward-tile.claimable .player-reward-square{animation:none}}

/* Shared profile shell, with two matching customization panels. */
#player-profile-screen [data-player-pane][hidden]{display:none!important}
#player-profile-screen [data-player-pane="customization"]:not([hidden]){box-sizing:border-box;height:100%;min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(8px,2vw,24px);padding:clamp(8px,2.5dvh,28px);border:1px solid #665281;background:linear-gradient(145deg,#20182fdd,#0d101cdd);box-shadow:0 18px 60px #0006;overflow:hidden}
#player-profile-screen [data-player-pane="customization"]>.profile-editor,
#player-profile-screen [data-player-pane="customization"]>.profile-banner-editor{box-sizing:border-box;min-width:0;min-height:0;margin:0;padding:clamp(8px,1.5dvh,18px);border:1px solid #665281;background:linear-gradient(145deg,#282039,#12111e);overflow:auto;scrollbar-color:#9276c5 #191526}
#player-profile-screen .profile-editor-preview strong,#player-profile-screen .profile-banner-heading strong{color:#e5d4ff;letter-spacing:.09em}
#player-profile-screen .avatar-upload-button,#player-profile-screen .avatar-reset-button{border:1px solid #8065ad;background:linear-gradient(110deg,#35224f,#1d1831);color:#e5d4ff}
@media(max-width:650px){#player-profile-screen [data-player-pane="customization"]:not([hidden]){grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr))}}

#player-profile-screen .profile-banner-editor{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:10px!important}
#player-profile-screen .profile-banner-heading{flex:none!important;margin:0!important}
#player-profile-screen .profile-banner-preview{position:relative!important;flex:none!important;width:100%!important;height:clamp(80px,20dvh,180px)!important;min-height:0!important;margin:0!important;box-sizing:border-box}
#player-profile-screen .profile-banner-grid{position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;flex:1 1 0!important;min-height:0!important;overflow:auto!important;align-content:start!important;gap:8px!important;margin:0!important}
#player-profile-screen .profile-banner-grid>*{position:relative!important;min-width:0!important;min-height:60px!important}
#player-profile-screen .profile-banner-editor>.avatar-reset-button{flex:none!important;margin:0!important;min-height:32px!important}
#player-profile-screen .profile-banner-editor>.auth-error{flex:none!important;margin:0!important}
#player-profile-screen .profile-editor{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;gap:12px!important}
#player-profile-screen .profile-editor>.avatar-card-picker{flex:1 1 0!important;min-height:0!important;overflow:auto!important}
#player-profile-screen .profile-editor>.avatar-upload-button,#player-profile-screen .profile-editor>.avatar-reset-button{flex:none!important;min-height:36px!important;padding:10px!important;margin:0!important}

#player-profile-screen .profile-banner-preview{height:auto!important;aspect-ratio:4/1!important;background-size:contain!important;background-position:center!important}
#player-profile-screen .avatar-card-picker{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;gap:8px!important}
#player-profile-screen .avatar-card-picker>strong,#player-profile-screen .avatar-card-picker>p{flex:none!important;margin:0!important}
#player-profile-screen .avatar-card-grid{flex:1 1 auto!important;min-height:0!important;max-height:none!important;align-content:start!important;grid-template-columns:repeat(auto-fill,minmax(80px,1fr))!important}

/* Temporarily hide card avatar selection until official avatar assets are ready. */
#player-profile-screen .avatar-card-picker{display:none!important}

/* Duo selection and card ownership. */
#team-screen .team-slot[hidden], #duo-draft-status[hidden] { display: none; }
#duo-draft-status { margin: 0 0 8px; text-align: center; }
#team-screen .duo-ally-slot { border-color: #8cb9ef; }
#team-screen .duo-card-taken { opacity: .45; cursor: default; }
#team-screen:has(.duo-ally-slot) .team-slot { max-width: 20vw; }
#battle-screen.duo-battle .battle-team {
    --duo-card-gap: clamp(16px, 2vw, 38px);
    gap: var(--duo-card-gap) !important;
    width: calc(100% - 16px) !important;
}
#battle-screen.duo-battle .battle-mastery-stars {
    right: calc(100% + var(--duo-card-gap) / 2);
    transform: translateX(50%);
}
#battle-screen.duo-battle .side-energy-gauge { display: none !important; }
.duo-card-owner {
    flex: 0 0 clamp(37px, 10vw, 146px);
    display: grid;
    gap: 4px;
    align-content: center;
    min-width: 0;
    margin-right: clamp(3px, 1.2vw, 22px);
    color: #a9daff;
    text-align: left;
}
.duo-card-owner-right {
    margin-right: 0;
    margin-left: clamp(3px, 1.2vw, 22px);
    text-align: right;
}
.duo-card-owner strong {
    display: block;
    padding-block: 4px;
    border-block: 1px solid currentColor;
    font-family: Georgia, serif;
    font-size: clamp(12px, 2vw, 27px);
    line-height: 1.1;
    text-shadow: 0 0 14px currentColor, 0 2px 4px #080b18;
    overflow-wrap: anywhere;
}
.duo-card-owner meter { width: 100%; height: 8px; }
.duo-card-owner meter::-webkit-meter-bar { background: #211932; border: 0; }
.duo-card-owner meter::-webkit-meter-optimum-value { background: currentColor; }
.duo-card-owner meter::-moz-meter-bar { background: currentColor; }
.duo-card-owner small { font-size: clamp(9px, 1.2vw, 13px); }
#enemy-team .duo-card-owner { color: #ffc0ca; }

#duo-room-form {
    display: grid;
    gap: 12px;
    min-width: min(300px, 75vw);
}
#duo-room-code {
    width: 100%;
    font: inherit;
    padding: 8px;
    text-transform: uppercase;
}
#matchmaking-title { user-select: text; }

:is(#one-mode-screen, #duo-mode-screen, #practice-mode-screen) {
    flex-direction: column;
    background: radial-gradient(ellipse at center, #241634, #0c0910 75%);
}
:is(#one-mode-screen, #duo-mode-screen, #practice-mode-screen) .mode-selection-content {
    min-height: 0;
    overflow-y: auto;
    align-items: safe center;
}
:is(#one-mode-screen, #duo-mode-screen, #practice-mode-screen) .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(#one-mode-screen, #duo-mode-screen, #practice-mode-screen) .game-mode-card {
    min-height: 180px;
    padding: clamp(18px, 3vw, 36px);
}
:is(#one-mode-screen, #duo-mode-screen, #practice-mode-screen) .game-mode-card strong { font-size: clamp(19px, 3vw, 36px); }

.duo-room-sides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 12px;
}
.duo-room-sides section {
    min-width: 0;
    padding: 12px;
    border: 1px solid #68517d;
    border-radius: 8px;
}
.duo-room-sides h3 { margin: 0; }
.duo-room-sides ul { list-style: none; padding: 0; overflow-wrap: anywhere; }
#duo-room-teams button {
    padding: 8px;
    color: inherit;
    background: #2b2039;
    border: 1px solid #9c76b9;
    border-radius: 6px;
    cursor: pointer;
}
#duo-room-teams button[aria-pressed="true"] { background: #51356c; }
#duo-room-teams button:disabled { opacity: .5; cursor: default; }

.versus-intro-duo .versus-caption {
    position: static;
    grid-column: 1 / -1;
}
.versus-team {
    display: grid;
    gap: clamp(6px, 2vh, 20px);
    min-width: 0;
}
.versus-team .versus-player {
    padding: clamp(6px, 2vh, 24px) clamp(4px, 1vw, 16px);
}
.versus-team .versus-player > .battle-identity { gap: clamp(4px, 1vw, 12px); }
.versus-team .versus-player > .battle-identity > .battle-player-avatar {
    flex-basis: clamp(24px, 5vw, 62px);
    width: clamp(24px, 5vw, 62px);
    height: clamp(24px, 5vw, 62px);
}
.versus-team .versus-player > .battle-identity > .battle-player-name {
    font-size: clamp(12px, 2.4vw, 32px);
}

.matchmaking-panel.duo-room-panel {
    width: min(730px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    padding: clamp(10px, 3vw, 24px);
}
#duo-room-unassigned h3 { margin: 12px 0 0; font-size: 13px; }
#duo-room-unassigned ul, .duo-room-sides ul {
    display: grid;
    gap: 6px;
    padding: 0;
    margin: 8px 0;
    list-style: none;
}
#duo-room-unassigned ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.duo-room-player {
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: clamp(46px, 8vh, 74px);
    padding: 6px;
    border: 1px solid #68517d;
    border-radius: 6px;
    background: linear-gradient(90deg, #140c25ce, #140c2544), var(--battle-banner-image, none) center / cover no-repeat, #231735;
}
.duo-room-empty { color: #b5a9c3; border-style: dashed; }
.duo-room-player .battle-identity { gap: 6px; }
.duo-room-player .battle-player-avatar { width: 28px; height: 28px; flex-basis: 28px; }
.duo-room-player .battle-player-name {
    font-size: clamp(12px, 2vw, 18px);
    text-align: left;
    overflow-wrap: anywhere;
}

#friendly-one-screen {
    flex-direction: column;
    background: radial-gradient(ellipse at center, #241634, #0c0910 75%);
}
.friendly-one-content {
    width: min(620px, 100%);
    margin-inline: auto;
    padding: 20px;
    overflow-y: auto;
}
.friendly-one-content .friends-group { margin-bottom: 16px; }

/* Battle Pass claims fit within the scrollable reward track. */
#career-screen [data-career-pane="pass"] .career-tier-tile { height: 164px; min-height: 164px; }
.career-tier-claim {
  padding: 5px 7px;
  border: 1px solid #a78bfa;
  border-radius: 4px;
  background: #30234d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  z-index: 1;
}
.career-tier-claim:disabled { opacity: .65; cursor: default; }
#career-pass-claim-status { margin: 5px 0 0; font-size: 13px; }
#career-pass-claim-status:empty { display: none; }

#duo-room-screen {
    flex-direction: column;
    background: radial-gradient(ellipse at center, #241634, #0c0910 75%);
}

#duo-room-content {
    min-height: 0;
    overflow-y: auto;
    align-items: safe center;
    padding-inline: clamp(16px, 5vw, 72px);
}

#duo-room-form:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: clamp(16px, 3vw, 36px);
    width: min(900px, 100%);
}

.duo-room-option {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(20px, 4vw, 38px);
    border: 1px solid rgba(211, 175, 242, .24);
    border-radius: 8px;
    background: linear-gradient(180deg, #2b1e36, #100c16);
    color: #f4edf9;
}

.duo-room-option h3 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
}

.duo-room-option p {
    margin: 0;
    color: #d8c9e5;
}

.duo-room-option input,
.duo-room-option button {
    min-width: 0;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #81639f;
    border-radius: 6px;
    color: #f4edf9;
    font: inherit;
}

.duo-room-option input {
    background: #100c16;
    text-transform: uppercase;
}

.duo-room-option button {
    margin-top: auto;
    background: #39294d;
    cursor: pointer;
}

.duo-room-option button:hover {
    background: #533b70;
}

#duo-room-content #matchmaking-overlay {
    position: static;
    width: 100%;
    z-index: auto;
    overflow: visible;
    background: none;
    backdrop-filter: none;
}

#duo-room-content #matchmaking-overlay::before {
    content: none;
}

#duo-room-content .matchmaking-panel {
    width: min(900px, 100%);
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
    padding: clamp(16px, 4vw, 42px);
}
