/*
 * The team designer: the stage, the fighters, the ring and sockets, the kit, the pickers and their
 * popover (teamDesigner.js). One sheet for every page that designs a team; a page lays the stage out in
 * its own sheet. The names are prefixed bsim- because the designer grew up on the simulator's page.
 */

/* ── the four pickers ───────────────────────────────────────────────────────────────────────── */

/* An input that names the choice, the choice's own picture in front of it, and a list under it. Red is the
   game's refusal — a class rune on another class's axie, a class charm on another class's card — said on the
   row before it is picked and on the picker once it is. */
.bsim-combo {
    position: relative;
    display: flex;
    align-items: center;
    gap: .3rem;
    min-width: 0;
}

.bsim-combo__ic {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.bsim-combo__ic:empty {
    display: none;
}

.bsim-combo__ic img,
.bsim-combo__cls {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.bsim-combo__face {
    width: 22px;
    height: 30px;
    object-fit: cover;
    object-position: top;
    border-radius: 3px;
}

.bsim-combo__input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    font-size: .78rem;
    padding: .25rem .4rem;
    border: 1px solid var(--bulma-border);
    border-radius: 4px;
    background: var(--bulma-scheme-main);
    color: var(--bulma-text);
}

.bsim-combo__input:focus {
    outline: none;
    border-color: var(--bulma-link-text, #3273dc);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bulma-link-text, #3273dc) 25%, transparent);
}

.bsim-combo.is-off .bsim-combo__input {
    border-color: #d9534f;
    color: #d9534f;
}

.bsim-combo__list {
    position: absolute;
    z-index: 25;
    top: calc(100% + .25rem);
    left: 0;
    width: max(100%, 24rem);
    max-width: calc(100vw - 2rem);
    max-height: 19rem;
    overflow: auto;
    margin: 0;
    padding: .25rem;
    list-style: none;
    background: var(--bulma-scheme-main);
    border: 1px solid var(--bulma-border);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.bsim-combo__group {
    padding: .35rem .45rem .15rem;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--bulma-text-weak);
}

.bsim-combo__row {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem;
    padding: .25rem .45rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .78rem;
}

.bsim-combo__row:hover,
.bsim-combo__row[aria-selected="true"] {
    background: var(--bulma-scheme-main-bis);
}

.bsim-combo__row.is-chosen .bsim-combo__name {
    font-weight: 700;
}

/* A row keeps its icon cell even when empty (the blank row, an option with no art), so the columns line up. */
.bsim-combo__row .bsim-combo__ic,
.bsim-combo__row .bsim-combo__ic:empty {
    display: inline-flex;
    width: 1.6rem;
    height: 1.6rem;
}

.bsim-combo__who {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.bsim-combo__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsim-combo__name.is-blank {
    color: var(--bulma-text-weak);
    font-style: italic;
}

.bsim-combo__meta {
    font-size: .7rem;
    color: var(--bulma-text-weak);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsim-combo__share {
    font-size: .68rem;
    font-variant-numeric: tabular-nums;
    color: var(--bulma-text-weak);
    white-space: nowrap;
}

.bsim-combo__share[data-grade="0"] {
    color: #4caf7d;
}

.bsim-combo__share[data-grade="2"] {
    color: #d9a441;
}

/* The game's refusal, in red: the row, its reason under the name, and the picker when that is the choice. */
.bsim-combo__row.is-off .bsim-combo__name,
.bsim-combo__row.is-off .bsim-combo__why {
    color: #d9534f;
}

.bsim-combo__why {
    font-size: .68rem;
}

.bsim-combo__row.is-off .bsim-combo__ic {
    filter: saturate(.4);
    opacity: .7;
}

.bsim-flag.is-off {
    border-color: #d9534f;
    color: #d9534f;
}

.bsim-combo__foot {
    padding: .35rem .45rem;
    font-size: .72rem;
    color: var(--bulma-text-weak);
}

.bsim-gear-ic {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* The "+" form on a face: its badge and an evolved frame. The client draws one picture per part whatever the
   stage, so this is the mark the game itself uses for the form — the axie on the team stage is what changes. */

.bsim-combo__pic {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.bsim-evolved {
    position: absolute;
    top: -.3rem;
    right: -.3rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 .2rem;
    border-radius: 999px;
    background: #d9a441;
    color: #1c1608;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .45);
    pointer-events: none;
}

.bsim-combo__pic.is-evolved img {
    border-radius: 3px;
    box-shadow: 0 0 0 1.5px #d9a441;
}

.bsim-combo__pic .bsim-evolved {
    top: auto;
    bottom: -.25rem;
    right: -.3rem;
    min-width: .8rem;
    height: .8rem;
    padding: 0 .1rem;
    font-size: .6rem;
    line-height: .8rem;
}

/* The stage switch: three small segments on the card's meta line, the current one lit, 3 reserved. */
.bsim-stage {
    display: inline-flex;
    border: 1px solid var(--bulma-border);
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
}

.bsim-stage__b {
    min-width: 1.35rem;
    padding: 0 .3rem;
    border: 0;
    border-right: 1px solid var(--bulma-border);
    background: var(--bulma-scheme-main);
    color: var(--bulma-text-weak);
    font-size: .66rem;
    font-weight: 700;
    line-height: 1.25rem;
    cursor: pointer;
}

.bsim-stage__b:last-child {
    border-right: 0;
}

.bsim-stage__b[aria-pressed="true"] {
    background: color-mix(in srgb, var(--bulma-link-text, #3273dc) 28%, var(--bulma-scheme-main));
    color: var(--bulma-text-strong);
}

.bsim-stage__b:disabled {
    cursor: not-allowed;
    opacity: .4;
}

/* The live gate, one identity at a time: the same signal the gate panel prints after a run, shown while
   the build is being changed so a swap that clears a block is visible before a rollout is spent. */
.bsim-flag {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .05rem .3rem;
    border-radius: 3px;
    border: 1px solid #d9a441;
    color: #d9a441;
    white-space: nowrap;
}

.bsim-flag.is-empty {
    border-color: var(--bulma-border);
    color: var(--bulma-text-weak);
}

/* ── the team stage ──────────────────────────────────────────────────────────────────────────── */

/* The generator's one canvas: rendered off screen and copied out, never shown. Not display:none — a WebGL
   canvas that is not laid out can refuse to draw. */
.bsim-axie-canvas {
    position: absolute;
    left: -10000px;
    top: 0;
    width: 512px;
    height: 384px;
    pointer-events: none;
}

/* A fighter waiting for the generator's first picture keeps its floor and no broken-image glyph. */
.bsim-fighter__img.is-pending:not(.is-generated) {
    visibility: hidden;
}

/*
 * The team as the game shows it, and the one thing on this page meant to be looked at: three fighters on a
 * floor, rune above, art with the class glyph, the charm sockets under. Class hues are the replay stage's
 * (replay.css), so an axie is the same colour here, on the live table and in a replay. Everything else on
 * the page is quieter than this strip on purpose.
 */
.bsim-team {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
    margin: .4rem 0 .9rem;
    padding: .75rem .6rem .55rem;
    border-radius: 12px;
    background:
        radial-gradient(ellipse at 50% 105%, var(--bulma-scheme-main-ter) 0%, transparent 62%),
        var(--bulma-scheme-main-bis);
    border: 1px solid var(--bulma-border-weak);
}

.bsim-team:empty {
    display: none;
}

.bsim-fighter {
    --cls: var(--bulma-text-weak);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.bsim-fighter[data-cls="beast"]   { --cls: #f0921f; }
.bsim-fighter[data-cls="bug"]     { --cls: #ff5f42; }
.bsim-fighter[data-cls="bird"]    { --cls: #ff6fa5; }
.bsim-fighter[data-cls="plant"]   { --cls: #63b900; }
.bsim-fighter[data-cls="aquatic"] { --cls: #00b7d4; }
.bsim-fighter[data-cls="reptile"] { --cls: #b06fe0; }
.bsim-fighter[data-cls="mech"]    { --cls: #8598a0; }
.bsim-fighter[data-cls="dawn"]    { --cls: #b79bf0; }
.bsim-fighter[data-cls="dusk"]    { --cls: #2b7f92; }

/* The rune, in a disc over the head; the ring is the rune's rarity. It tucks into the art's transparent
   headroom, as the profile's team view does. */
.bsim-fighter__rune {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--bulma-scheme-main-ter);
    border: 2px solid var(--bulma-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
    margin-bottom: -.75rem;
}

.bsim-fighter__rune[data-rarity="rare"]   { border-color: #4a8fd0; }
.bsim-fighter__rune[data-rarity="epic"]   { border-color: #b06fe0; }
.bsim-fighter__rune[data-rarity="mystic"] { border-color: #e0b040; }

.bsim-fighter__rune-ic {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.bsim-fighter__rune-ic.is-none {
    opacity: .45;
}

/* The art stands on its own glow in the class hue — the floor under a fighter in the game's team screen. */
.bsim-fighter__art {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bsim-fighter__art::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: 3%;
    height: 26%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--cls) 45%, transparent) 0%, transparent 72%);
    pointer-events: none;
}

.bsim-fighter__img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scaleX(-1);          /* the art faces right; your team faces the opponent */
}

.bsim-fighter__cls {
    position: absolute;
    top: .55rem;
    left: 0;
    z-index: 2;
    width: 1.3rem;
    height: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5));
}

.bsim-fighter__ghost {
    position: relative;
    width: 66%;
    aspect-ratio: 1 / 1;
    margin-bottom: 8%;
    border-radius: 50%;
    border: 2px dashed color-mix(in srgb, var(--cls) 60%, var(--bulma-border));
    background: color-mix(in srgb, var(--cls) 14%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .68rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--bulma-text-weak);
}

.bsim-fighter__name {
    max-width: 100%;
    margin-top: .1rem;
    font-size: .78rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Six sockets, one a part: the part glyph ghosted in an empty socket, the charm over it in a worn one with
   the glyph shrunk to a corner badge that says which part. */
.bsim-fighter__charms {
    display: flex;
    gap: 3px;
    margin-top: .3rem;
}

.bsim-socket {
    position: relative;
    width: clamp(18px, 2.3vw, 26px);
    height: clamp(18px, 2.3vw, 26px);
    border-radius: 6px;
    border: 1px dashed var(--bulma-border);
    background: var(--bulma-scheme-main);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.bsim-socket__part {
    width: 62%;
    height: 62%;
    object-fit: contain;
    opacity: .5;
}

.bsim-socket.is-worn {
    border-style: solid;
    border-color: color-mix(in srgb, var(--cls) 55%, var(--bulma-border));
}

.bsim-socket.is-worn .bsim-socket__part {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 52%;
    height: 52%;
    padding: 1px;
    border-radius: 4px;
    background: var(--bulma-scheme-main);
    opacity: 1;
    z-index: 1;
}

.bsim-socket__charm {
    position: absolute;
    inset: 2px;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    object-fit: contain;
}

/* ── the stage as the designer ───────────────────────────────────────────────────────────────── */

/* A rune disc or a socket that is a button: the same shape, a hand cursor, and the class hue as its glow on
   hover and on keyboard focus. The socket's hit area reaches past its edge — it is small on purpose. */
.bsim-fighter__rune.is-pick,
.bsim-socket.is-pick {
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: box-shadow .12s ease, transform .12s ease, border-color .12s ease;
}

.bsim-socket.is-pick::after {
    content: '';
    position: absolute;
    inset: -5px -1px;               /* taller, not wider: the next socket is three pixels away */
}

/* The class at the fighter's shoulder, a button like the rune disc: the same dark disc the ring's chips sit
   on, the class glyph in it. Dashed where the axie has no class yet, the flags' amber where one is owed. */
.bsim-fighter__cls.is-pick {
    top: .3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: .25rem;
    border: 1.5px solid color-mix(in srgb, var(--cls) 70%, #fff);
    border-radius: 50%;
    background: rgba(10, 12, 18, .82);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    filter: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.bsim-fighter__cls-ic {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bsim-fighter__cls.is-pick.is-none {
    border-style: dashed;
    border-color: var(--bulma-border);
}

.bsim-fighter__cls.is-pick.is-none::before {
    content: '?';
    font-size: .8rem;
    font-weight: 700;
    line-height: 1;
    color: var(--bulma-text-weak);
}

.bsim-fighter__cls.is-pick.is-needed {
    border-color: #d9a441;
}

.bsim-fighter__cls.is-pick.is-needed::before {
    color: #d9a441;
}

.bsim-fighter__cls.is-pick:hover,
.bsim-fighter__cls.is-pick:focus-visible {
    outline: none;
    transform: scale(1.12);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cls) 55%, transparent), 0 1px 4px rgba(0, 0, 0, .5);
}

/* The level, under the fighter's feet: a small dark pill, the class disc's own surface. A button on a designer.
   Dashed where the level is not known, the refusal's red where it allows fewer evolved parts than the axie has. */
.bsim-fighter__lvl {
    position: absolute;
    left: 50%;
    bottom: -.1rem;
    z-index: 2;
    transform: translateX(-50%);
    min-width: 2.4rem;
    padding: .05rem .4rem;
    border: 1.5px solid color-mix(in srgb, var(--cls) 70%, #fff);
    border-radius: 999px;
    background: rgba(10, 12, 18, .82);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    color: #fff;
    font: inherit;
    font-size: .66rem;
    font-weight: 700;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
}

.bsim-fighter__lvl.is-pick {
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
}

.bsim-fighter__lvl.is-none {
    border-style: dashed;
    border-color: var(--bulma-border);
    color: rgba(255, 255, 255, .7);
}

.bsim-fighter__lvl.is-off {
    border-color: #d9534f;
}

.bsim-fighter__lvl.is-pick:hover,
.bsim-fighter__lvl.is-pick:focus-visible {
    outline: none;
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cls) 55%, transparent), 0 1px 4px rgba(0, 0, 0, .5);
}

.bsim-fighter__rune.is-pick:hover,
.bsim-fighter__rune.is-pick:focus-visible {
    outline: none;
    transform: scale(1.08);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cls) 55%, transparent), 0 2px 8px rgba(0, 0, 0, .3);
}

.bsim-socket.is-pick:hover,
.bsim-socket.is-pick:focus-visible {
    outline: none;
    z-index: 3;
    border-style: solid;
    border-color: var(--cls);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--cls) 45%, transparent);
}

.bsim-socket.is-pick:hover .bsim-socket__part,
.bsim-socket.is-pick:focus-visible .bsim-socket__part {
    opacity: .95;
}

/* A piece the game refuses on this fighter — the field's red, on the picture. */
.bsim-fighter__rune.is-off,
.bsim-socket.is-off {
    border-color: #d9534f;
}

.bsim-socket.is-off {
    border-style: solid;
}

/* ── the parts, as a ring around the drawn axie ─────────────────────────────────────────────── */

/* Six chips around the axie, a hair line from each to its part; the line lights with the chip. The chips
   scale with the fighter (11% of the square art box) and never sit on the picture. */
.bsim-fighter__ring {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.bsim-ring__lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.bsim-ring__lines line {
    stroke: var(--cls);
    stroke-opacity: .42;
    stroke-width: 1.2;
    vector-effect: non-scaling-stroke;
    transition: stroke-opacity .12s ease, stroke-width .12s ease;
}

.bsim-ring__lines circle {
    fill: var(--cls);
    fill-opacity: .55;
}

.bsim-ring__lines line.is-hot {
    stroke-opacity: 1;
    stroke-width: 2;
}

.bsim-ring__lines circle.is-hot {
    fill-opacity: 1;
}

.bsim-ring__b {
    position: absolute;
    width: 11%;
    height: 11%;
    min-width: 1rem;
    min-height: 1rem;
    padding: 0;
    border-radius: 50%;
    border: 1.5px dashed color-mix(in srgb, var(--cls) 70%, #fff);
    background: rgba(10, 12, 18, .82);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: auto;
    font: inherit;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    transition: transform .12s ease, box-shadow .12s ease;
}

.bsim-ring__b.is-set { border-style: solid; }
.bsim-ring__b.is-custom { border-color: #d9a441; }
/* Not confirmed in the simulator yet: the warning's amber with a halo (a hand-picked part is amber too),
   not the refusal's red. It runs. */
.bsim-ring__b.is-unread { border-color: #d9a441; box-shadow: 0 0 0 2px rgba(217, 164, 65, .3); }

.bsim-ring__b__glyph {
    width: 68%;
    height: 68%;
    object-fit: contain;
    filter: brightness(1.35);
}

.bsim-ring__b:hover,
.bsim-ring__b:focus-visible {
    outline: none;
    z-index: 1;
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cls) 55%, transparent), 0 1px 4px rgba(0, 0, 0, .5);
}

/* The one line that says the stage can be pressed. */
.bsim-team.is-designer::after {
    content: 'Press the class, a part, the rune or a charm socket to change it';
    order: 5;
    grid-column: 1 / -1;
    margin-top: .15rem;
    font-size: .68rem;
    letter-spacing: .02em;
    text-align: center;
    color: var(--bulma-text-weak);
}

/* A narrow stage has no sockets on show and one fighter forward: the line says what a press does there. */
.bsim-team.is-designer.is-narrow::after {
    content: 'Tap an axie to bring it forward';
}

/* ── the fighter being edited ─────────────────────────────────────────────────────────────────── */

/* Where a fighter stands, in the line's own word, over its name. The kit's "Position" says the same word, and
   on a narrow stage — where the one being edited is brought to the middle — it is what says the order. */
.bsim-fighter__place {
    margin-top: .1rem;
    font-size: .62rem;
    line-height: 1.2;
    letter-spacing: .02em;
    color: var(--bulma-text-weak);
}

.bsim-team:not(.is-designer) .bsim-fighter__place {
    display: none;
}

.bsim-fighter.is-selected .bsim-fighter__place {
    color: color-mix(in srgb, var(--cls) 75%, var(--bulma-text-strong));
}

.bsim-fighter__who {
    overflow: hidden;
    text-overflow: ellipsis;
}

.bsim-team.is-designer .bsim-fighter__art {
    cursor: pointer;
}

/* The name is the fighter's button; the one being edited wears its class hue. */
button.bsim-fighter__name {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    padding: .1rem .5rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--bulma-text-weak);
    font-family: inherit;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}

button.bsim-fighter__name:hover {
    color: var(--bulma-text-strong);
}

button.bsim-fighter__name:focus-visible {
    outline: 2px solid var(--bulma-link-text, #3273dc);
    outline-offset: 1px;
}

.bsim-fighter.is-selected button.bsim-fighter__name {
    color: var(--bulma-text-strong);
    background: color-mix(in srgb, var(--cls) 22%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cls) 55%, transparent);
}

.bsim-fighter.is-selected .bsim-fighter__art::before {
    height: 32%;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--cls) 70%, transparent) 0%, transparent 72%);
}

/*
 * A NARROW STAGE: the fighter being edited forward, in the middle, large, with its ring; the other two small
 * at its sides, a press away (the owner, 2026-11-18). Three across at a phone's width is a 105 px fighter
 * with 16 px chips and 14 px sockets — measured at 390 — which can be looked at and cannot be pressed.
 * Forward, the chips are 34 px. The other two carry no ring, rune or sockets: each is one target, itself.
 * The sockets go from the forward one too: the kit under it has every charm as a row with its name.
 *
 * `is-narrow` is the script's, from the stage's own width (`narrowStage`), and the order is `order`: the
 * fighters stay in the build's order in the document, and the two at the sides keep it left to right.
 */
.bsim-team.is-narrow {
    grid-template-columns: minmax(0, .85fr) minmax(0, 2.5fr) minmax(0, .85fr);
    align-items: end;
    gap: .3rem;
}

.bsim-team.is-narrow .bsim-fighter.is-wing-a { order: 1; }
.bsim-team.is-narrow .bsim-fighter.is-selected { order: 2; }
.bsim-team.is-narrow .bsim-fighter.is-wing-b { order: 3; }

.bsim-team.is-narrow .bsim-fighter:not(.is-selected) {
    opacity: .72;
    cursor: pointer;
    transition: opacity .12s ease;
}

.bsim-team.is-narrow .bsim-fighter:not(.is-selected):hover {
    opacity: 1;
}

.bsim-team.is-narrow .bsim-fighter:not(.is-selected) .bsim-fighter__ring,
.bsim-team.is-narrow .bsim-fighter:not(.is-selected) .bsim-fighter__rune,
.bsim-team.is-narrow .bsim-fighter:not(.is-selected) .bsim-fighter__cls,
.bsim-team.is-narrow .bsim-fighter:not(.is-selected) .bsim-fighter__lvl,
.bsim-team.is-narrow .bsim-fighter__charms {
    display: none;
}

.bsim-team.is-narrow .bsim-fighter:not(.is-selected) button.bsim-fighter__name {
    padding: .05rem .2rem;
    font-size: .64rem;
}

.bsim-team.is-narrow .bsim-fighter.is-selected .bsim-ring__b {
    width: 2.1rem;
    height: 2.1rem;
}

.bsim-team.is-narrow .bsim-fighter.is-selected .bsim-fighter__rune {
    width: 2.6rem;
    height: 2.6rem;
}

.bsim-team.is-narrow .bsim-fighter.is-selected .bsim-fighter__cls.is-pick {
    width: 2.2rem;
    height: 2.2rem;
}

.bsim-team.is-narrow .bsim-fighter.is-selected .bsim-fighter__lvl.is-pick {
    min-width: 3rem;
    padding: .2rem .6rem;
    font-size: .76rem;
}

@media (prefers-reduced-motion: no-preference) {
    .bsim-team.is-narrow .bsim-fighter.is-selected .bsim-fighter__art {
        animation: bsim-forward .16s ease-out;
    }

    @keyframes bsim-forward {
        from { transform: scale(.9); opacity: .6; }
        to { transform: scale(1); opacity: 1; }
    }
}

/* ── the kit: the fighter being edited, piece by piece ────────────────────────────────────────── */

/*
 * Under the three fighters, the whole of one of them: where it stands, its class, its rune, and six rows —
 * a card, its stage, the charm on it. Every piece is a button that opens the piece's own picker, so a build
 * is made here from nothing. Two columns of rows where the stage is wide enough, one where it is narrow;
 * a row is a finger tall either way. The top edge is the fighter's class hue: it is that fighter's.
 */
.bsim-kit {
    --cls: var(--bulma-text-weak);
    order: 4;
    grid-column: 1 / -1;
    min-width: 0;
    margin-top: .35rem;
    padding: .65rem .6rem .5rem;
    border: 1px solid var(--bulma-border-weak);
    border-top: 2px solid color-mix(in srgb, var(--cls) 70%, var(--bulma-border));
    border-radius: 10px;
    background: var(--bulma-scheme-main);
}

.bsim-kit[data-cls="beast"]   { --cls: #f0921f; }
.bsim-kit[data-cls="bug"]     { --cls: #ff5f42; }
.bsim-kit[data-cls="bird"]    { --cls: #ff6fa5; }
.bsim-kit[data-cls="plant"]   { --cls: #63b900; }
.bsim-kit[data-cls="aquatic"] { --cls: #00b7d4; }
.bsim-kit[data-cls="reptile"] { --cls: #b06fe0; }
.bsim-kit[data-cls="mech"]    { --cls: #8598a0; }
.bsim-kit[data-cls="dawn"]    { --cls: #b79bf0; }
.bsim-kit[data-cls="dusk"]    { --cls: #2b7f92; }

.bsim-kit__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem 1.1rem;
    margin-bottom: .55rem;
}

.bsim-kit__field {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}

.bsim-kit__field--rune {
    flex: 1 1 12rem;
}

.bsim-kit__k {
    flex: 0 0 auto;
    font-size: .72rem;
    color: var(--bulma-text-weak);
}

/* The place it has: a word, in the fighter's hue. Not a control, and not drawn as one. */
.bsim-kit__place {
    font-size: .8rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--cls) 70%, var(--bulma-text-strong));
}

/* ...and the two places it can be moved to: buttons, with the verb in front of them. Nothing here is lit —
   a lit one of three, under three fighters, read as choosing a fighter. */
.bsim-kit__moves {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-left: .35rem;
}

.bsim-kit__move {
    min-height: 1.7rem;
    padding: .1rem .6rem;
    border: 1px solid var(--bulma-border);
    border-radius: 999px;
    background: none;
    color: var(--bulma-text);
    font: inherit;
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
}

.bsim-kit__move:hover,
.bsim-kit__move:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--cls) 70%, var(--bulma-border));
    background: color-mix(in srgb, var(--cls) 16%, transparent);
    color: var(--bulma-text-strong);
}

/* The class and the rune: what it is, with its picture. A button where it can be changed. */
.bsim-kit__chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    max-width: 100%;
    min-height: 2rem;
    padding: .15rem .6rem .15rem .4rem;
    border: 1px solid var(--bulma-border);
    border-radius: 7px;
    background: var(--bulma-scheme-main-bis);
    color: var(--bulma-text);
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
}

button.bsim-kit__chip {
    cursor: pointer;
}

button.bsim-kit__chip:hover,
button.bsim-kit__chip:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--cls) 70%, var(--bulma-border));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--cls) 30%, transparent);
}

.bsim-kit__chip img {
    flex: 0 0 auto;
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
}

.bsim-kit__chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsim-kit__chip .bsim-combo__cls + .bsim-kit__chip-name {
    text-transform: capitalize;
}

.bsim-kit__chip.is-none .bsim-kit__chip-name {
    font-weight: 400;
    color: var(--bulma-text-weak);
}

.bsim-kit__chip.is-needed {
    border-color: #d9a441;
    color: #d9a441;
}

.bsim-kit__chip.is-off {
    border-color: #d9534f;
}

/* The level: its number, then the HP it starts a battle on, quieter. */
.bsim-kit__chip--level {
    padding-left: .6rem;
    font-variant-numeric: tabular-nums;
}

.bsim-kit__hp {
    flex: 0 0 auto;
    font-size: .72rem;
    font-weight: 400;
    color: var(--bulma-text-weak);
    white-space: nowrap;
}

.bsim-kit__parts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
}

.bsim-team.is-narrow .bsim-kit__parts {
    grid-template-columns: minmax(0, 1fr);
}

/* One column is a touch layout: the two smallest targets in a cell grow to a finger. */
.bsim-team.is-narrow .bsim-kit .bsim-stage__b {
    min-width: 2rem;
    line-height: 2rem;
}

.bsim-team.is-narrow .bsim-kit__charm {
    min-height: 2.5rem;
}

.bsim-team.is-narrow .bsim-kit__move {
    min-height: 2rem;
    padding: .1rem .8rem;
}

/* A part is a cell: its card, the card's stage beside it, and the charm on the card under it — the charm's
   line starts where the card's name does, so the face reads as the head of both. Names are whole here: a
   row with the card and the charm side by side cut both to four letters at any width the kit is drawn at. */
.bsim-kit__part {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "card stage" "charm charm";
    align-items: center;
    column-gap: .3rem;
    min-width: 0;
    padding: .2rem .35rem .25rem .2rem;
    border-radius: 9px;
    background: var(--bulma-scheme-main-bis);
}

.bsim-kit__card {
    grid-area: card;
    min-height: 3rem;
}

.bsim-kit__part > .bsim-stage {
    grid-area: stage;
}

.bsim-kit__charm {
    grid-area: charm;
    min-height: 2.1rem;
    margin-left: 2.65rem;           /* the face and the gap after it */
}

.bsim-kit__card,
.bsim-kit__charm {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
    padding: .2rem .35rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.bsim-kit__card:hover,
.bsim-kit__card:focus-visible,
.bsim-kit__charm:hover,
.bsim-kit__charm:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--cls) 55%, var(--bulma-border));
    background: var(--bulma-scheme-main);
}

/* The card's face, as the pickers and the slot editor show one, with its part's glyph on the corner. */
.bsim-kit__face {
    position: relative;
    flex: 0 0 auto;
    width: 2.1rem;
    height: 2.7rem;
    border-radius: 5px;
    background: var(--bulma-scheme-main-ter);
}

.bsim-kit__art {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
    object-position: top;
}

.bsim-kit__face.is-evolved .bsim-kit__art {
    box-shadow: 0 0 0 1.5px #d9a441;
}

.bsim-kit__face .bsim-evolved {
    top: -.3rem;
    right: -.35rem;
    min-width: .85rem;
    height: .85rem;
    padding: 0 .1rem;
    font-size: .62rem;
    line-height: .85rem;
}

.bsim-kit__glyph {
    position: absolute;
    left: -.3rem;
    bottom: -.3rem;
    width: 1.1rem;
    height: 1.1rem;
    padding: .12rem;
    border: 1px solid var(--bulma-border-weak);
    border-radius: 50%;
    background: var(--bulma-scheme-main);
    object-fit: contain;
}

.bsim-kit__face.is-bare {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--bulma-border);
    background: none;
}

.bsim-kit__face.is-bare .bsim-kit__glyph {
    position: static;
    width: 1.3rem;
    height: 1.3rem;
    padding: 0;
    border: 0;
    background: none;
    opacity: .55;
}

.bsim-kit__words {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    min-width: 0;
}

.bsim-kit__name {
    overflow: hidden;
    font-size: .8rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsim-kit__name.is-none,
.bsim-kit__charm.is-none .bsim-kit__name {
    font-weight: 400;
    color: var(--bulma-text-weak);
}

.bsim-kit__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .1rem .4rem;
    font-size: .7rem;
    color: var(--bulma-text-weak);
}

.bsim-kit__part-name {
    text-transform: capitalize;
}

/* A hand-picked part: the fighter still carries a real axie's name, and this part is not that axie's. The
   ring's chip says it with its amber edge; here it is a word. */
.bsim-kit__changed {
    color: #d9a441;
}

/* In the kit a flag is a word in the flag's colour, not a boxed label: eleven boxes on one fighter cut the
   names they sat beside. The boxed one is in the picker, on the piece it is about. */
.bsim-kit .bsim-flag {
    padding: 0;
    border: 0;
    font-size: .68rem;
    letter-spacing: 0;
    text-transform: none;
}

.bsim-kit .bsim-flag.is-off {
    color: #d9534f;
}

/* The stage switch at a finger's size; the reserved third stage is not a choice here, so it is not drawn. */
.bsim-kit .bsim-stage__b {
    min-width: 1.6rem;
    font-size: .72rem;
    line-height: 1.6rem;
}

.bsim-kit .bsim-stage__b:nth-child(3) {
    display: none;
}

.bsim-kit .bsim-stage__b:nth-child(2) {
    border-right: 0;
}

.bsim-kit__charm .bsim-kit__name {
    font-size: .76rem;
}

.bsim-kit__socket {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px dashed var(--bulma-border);
    border-radius: 6px;
}

.bsim-kit__charm:not(.is-none) .bsim-kit__socket {
    border-style: solid;
    border-color: color-mix(in srgb, var(--cls) 45%, var(--bulma-border));
}

.bsim-kit__charm.is-off .bsim-kit__socket {
    border-color: #d9534f;
}

.bsim-kit__socket img {
    width: 1.2rem;
    height: 1.2rem;
}

/* ── the picker: a panel at the pressed button, a sheet on a narrow screen ────────────────────── */

/* One box: a title and a way out, the piece as it stands, the filter, the list — the list inside the box
   and cut to the room there is, the box under the button or over it, never on it. */
.bsim-pop {
    position: fixed;
    z-index: 60;
    display: flex;
    flex-direction: column;
    padding: .55rem .6rem .6rem;
    border-radius: 10px;
    background: var(--bulma-scheme-main);
    border: 1px solid var(--bulma-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.bsim-pop:focus {
    outline: none;
}

.bsim-pop__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .35rem;
}

.bsim-pop__title {
    min-width: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bulma-text-strong);
}

.bsim-pop__close {
    flex: 0 0 auto;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--bulma-text-weak);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.bsim-pop__close:hover,
.bsim-pop__close:focus-visible {
    outline: none;
    background: var(--bulma-scheme-main-ter);
    color: var(--bulma-text-strong);
}

/* The piece as it stands: on a phone this is the only place its sentence can be read before it is changed. */
.bsim-pop__about {
    display: flex;
    gap: .55rem;
    margin-bottom: .45rem;
    padding: .45rem .5rem;
    border-radius: 8px;
    background: var(--bulma-scheme-main-bis);
}

.bsim-pop__about-words {
    min-width: 0;
}

.bsim-pop__about-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 600;
}

.bsim-pop__about-meta {
    font-size: .72rem;
    color: var(--bulma-text-weak);
}

.bsim-pop__about-text {
    margin-top: .2rem;
    font-size: .76rem;
    line-height: 1.35;
}

.bsim-pop .bsim-combo {
    flex-wrap: wrap;
}

/* The panel says what the piece is; the field is only a filter, so it carries no picture of the choice. */
.bsim-pop .bsim-combo > .bsim-combo__ic {
    display: none;
}

.bsim-pop .bsim-combo__list {
    position: static;
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
    margin-top: .4rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overscroll-behavior: contain;   /* the end of the list is not the page's to scroll */
}

/* What a piece says, on its row: two lines, so the list stays a list. */
.bsim-combo__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    font-size: .7rem;
    line-height: 1.3;
    color: var(--bulma-text-weak);
}

.bsim-pop__shade {
    display: none;
}

.bsim-pop__shade.is-on {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 59;
    background: rgba(0, 0, 0, .55);
}

/* The sheet: the same panel docked to the bottom edge, as wide as the screen, with rows a finger tall. The
   filter is 16 px because a smaller input makes iOS zoom the page when it is focused. */
.bsim-pop.is-sheet {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: 86vh;
    padding: .75rem .85rem calc(.85rem + env(safe-area-inset-bottom, 0px));
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
}

.bsim-pop.is-sheet .bsim-pop__title {
    font-size: .92rem;
}

.bsim-pop.is-sheet .bsim-pop__close {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.5rem;
}

.bsim-pop.is-sheet .bsim-combo__input {
    padding: .5rem .6rem;
    font-size: 16px;
}

.bsim-pop.is-sheet .bsim-combo__list {
    max-height: 48vh;
}

.bsim-pop.is-sheet .bsim-combo__row {
    padding: .5rem .45rem;
    font-size: .86rem;
}

.bsim-pop.is-sheet .bsim-combo__text {
    font-size: .76rem;
}

@media (prefers-reduced-motion: no-preference) {
    .bsim-fighter__img,
    .bsim-fighter__ghost {
        animation: bsim-settle .18s ease-out;
    }

    @keyframes bsim-settle {
        from { opacity: .4; transform: scaleX(-1) translateY(3px); }
        to { opacity: 1; transform: scaleX(-1) translateY(0); }
    }

    .bsim-fighter__ghost {
        animation-name: bsim-settle-ghost;
    }

    @keyframes bsim-settle-ghost {
        from { opacity: .4; }
        to { opacity: 1; }
    }
}

@media (max-width: 768px) {

    .bsim-team {
        gap: .35rem;
        padding: .55rem .3rem .45rem;
    }

    /* Six sockets must fit a third of a phone: 6 x 14 px + 5 x 2 px = 94 px inside a ~105 px column. */
    .bsim-fighter__charms {
        gap: 2px;
    }

    .bsim-socket {
        width: 14px;
        height: 14px;
        border-radius: 4px;
    }

    .bsim-socket.is-worn .bsim-socket__part {
        right: -3px;
        bottom: -3px;
    }
}

/* The picker's own root: the element a host writes around its input and the panel (`.bsim-picker`). The panel
   hangs from it, and the input takes the room beside whatever the host puts next to it. */
.bsim-picker {
    position: relative;
}

.bsim-picker .input {
    flex: 1 1 auto;
    min-width: 0;
}

/* The panel hangs from the input's right edge and grows leftwards, so it fits under a head's narrow load
   control and under a full-width one alike; on a phone it is the viewport minus the gutters. */
.bsim-picker__panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + .3rem);
    right: 0;
    width: min(40rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    padding: .45rem .5rem .5rem;
    background: var(--bulma-scheme-main);
    border: 1px solid var(--bulma-border);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
}

.bsim-picker__tabs {
    display: flex;
    gap: .25rem;
    margin-bottom: .45rem;
    border-bottom: 1px solid var(--bulma-border-weak);
}

.bsim-picker__tab {
    padding: .35rem .7rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--bulma-text-weak);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}

.bsim-picker__tab.is-active {
    color: var(--bulma-text-strong);
    border-bottom-color: var(--bulma-link-text, #3273dc);
}

.bsim-picker__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .6rem;
    margin-bottom: .45rem;
}

.bsim-picker__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
}

.bsim-picker__chip {
    width: 1.7rem;
    height: 1.7rem;
    padding: .2rem;
    border: 1px solid var(--bulma-border);
    border-radius: 50%;
    background: var(--bulma-scheme-main-bis);
    cursor: pointer;
    opacity: .6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .6rem;
}

.bsim-picker__chip img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bsim-picker__chip[aria-pressed="true"] {
    opacity: 1;
    border-color: var(--bulma-link-text, #3273dc);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bulma-link-text, #3273dc) 35%, transparent);
}

.bsim-picker__metas {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    margin: 0 0 .45rem;
}

.bsim-picker__pill {
    --meta: var(--bulma-text-weak);
    display: inline-flex;
    align-items: baseline;
    gap: .3rem;
    padding: .15rem .5rem;
    border: 1px solid color-mix(in srgb, var(--meta) 55%, var(--bulma-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--meta) 16%, var(--bulma-scheme-main));
    color: var(--bulma-text);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
}

.bsim-picker__pill-share {
    font-weight: 400;
    font-size: .68rem;
    color: var(--bulma-text-weak);
    font-variant-numeric: tabular-nums;
}

.bsim-picker__pill[aria-pressed="true"] {
    background: color-mix(in srgb, var(--meta) 45%, var(--bulma-scheme-main));
    border-color: var(--meta);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--meta) 35%, transparent);
}

.bsim-picker__range {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .76rem;
    color: var(--bulma-text-weak);
}

.bsim-picker__range .input {
    width: 4.2rem;
}

.bsim-picker__list {
    max-height: 19rem;
    overflow: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bsim-picker__row {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
    padding: .3rem .45rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: .82rem;
}

.bsim-picker__who {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.bsim-picker__meta {
    font-size: .72rem;
    color: var(--bulma-text-weak);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsim-picker__foot {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .45rem;
    padding-top: .45rem;
    border-top: 1px solid var(--bulma-border-weak);
    font-size: .76rem;
    color: var(--bulma-text-weak);
}

.bsim-picker__count {
    margin-right: auto;
}

.bsim-picker__row:hover,
.bsim-picker__row[aria-selected="true"] {
    background: var(--bulma-scheme-main-bis);
}

.bsim-picker__rank {
    font-size: .74rem;
    font-variant-numeric: tabular-nums;
    color: var(--bulma-text-weak);
}

.bsim-picker__name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bsim-picker__team {
    display: flex;
    gap: 3px;
}

.bsim-picker__thumb {
    --cls: var(--bulma-border);
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    overflow: hidden;
    background: color-mix(in srgb, var(--cls) 28%, var(--bulma-scheme-main-bis));
    border: 1px solid color-mix(in srgb, var(--cls) 45%, var(--bulma-border));
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bsim-picker__thumb[data-cls="beast"]   { --cls: #f0921f; }
.bsim-picker__thumb[data-cls="bug"]     { --cls: #ff5f42; }
.bsim-picker__thumb[data-cls="bird"]    { --cls: #ff6fa5; }
.bsim-picker__thumb[data-cls="plant"]   { --cls: #63b900; }
.bsim-picker__thumb[data-cls="aquatic"] { --cls: #00b7d4; }
.bsim-picker__thumb[data-cls="reptile"] { --cls: #b06fe0; }
.bsim-picker__thumb[data-cls="mech"]    { --cls: #8598a0; }
.bsim-picker__thumb[data-cls="dawn"]    { --cls: #b79bf0; }
.bsim-picker__thumb[data-cls="dusk"]    { --cls: #2b7f92; }

.bsim-picker__thumb img {
    width: 135%;
    height: 135%;
    object-fit: contain;
    transform: translateY(14%) scaleX(-1);
}

.bsim-picker__empty {
    padding: .45rem .5rem;
    font-size: .8rem;
    color: var(--bulma-text-weak);
}

@media (max-width: 768px) {

    .bsim-picker__panel {
        right: auto;
        left: 0;
    }
}
