
/* General */

@font-face {
    font-family: 'icons';
    src: url('icons.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

body {
    background-color: #f0f0f0;
    font: 16px/1.5 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-y: scroll
}

body,
a,
a:hover,
a:focus,
caption {
    color: #333
}

h1, h2, h3 {
    font-weight: 700;
    text-align: center;
}

h1 {
    color: #ff69b4;
    font-size: 2em;
    margin: 0 0 1em
}

h2 {
    background: #f0f0f0;
    background: linear-gradient(0deg, rgba(246, 246, 246, 1) 50%, rgba(240, 240, 240, 1) 50%);
    color: #4d6ad8;
    font-size: 1.5em;
    text-align: left;
    display: inline-block;
    margin: 0 0 0.5em;
    position: absolute;
    top: -0.75em;
    left: 1em;
}

h3 {
    font-size: 1em;
    line-height: 2;
    margin: 2em 0 0
}

h1 a {
    text-decoration: none;
    color: inherit;
}

p {
    text-align: center;
    font-size: 0.875em;
}

button {
    cursor: pointer;
    font: inherit;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
}

article {
    background-color: #f0f0f0;
    max-width: 81.875em;
    padding: 0 1.25em;
    margin: 1em auto
}

article section {
    background: #f6f6f6;
    border-radius: 1em;
    border: 0.0625em solid #dedede;
    padding: 1.25em 1em 1em;
    margin: 0 auto 1.25em;
    position: relative;
}

.team__buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
}

.team__button {
    background-color: #4d6ad8;
    color: #f0f0f0;
    font-weight: 700;
    text-align: center;
    display: inline-block;
    padding: .2em .5em;
    border-radius: .25em;
    cursor: pointer;
    box-sizing: border-box;
    flex-basis: 12em;
}

.team__button:hover,
.team__button:focus {
    color: #f0f0f0;
    text-decoration: none;
    box-shadow: 0 0 0 0.0625em #1b1b1b;
}

/* Game */

.head__game-picker {
    padding: 2em;
}

.head__game-button {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
}

.game-picker {
    list-style: none;
    display: grid;
    gap: 2em;
    grid-template-columns: repeat(auto-fill, 16em);
    justify-content: center;
    padding: 0;
    margin: 2em 0;
}

.game-picker__button {
    display: block;
    background: #fff;
    text-align: center;
    width: 16m;
    padding: 1em;
    box-sizing: border-box;
    border: 1px solid #d9d9d9;
    border-radius: 0.5em;
}

.game-picker__button:hover {
    background: #d9d9d9;
}

.game-picker__game_disabled {
    filter: grayscale(1);
}

.game-picker__game_disabled .game-picker__button {
    cursor: auto;
    background: #e6e6e6;
}

.head__game-logo,
.game-picker__game-logo {
    width: 14rem;
    height: 3.5rem;
    line-height: 3.5rem;
    margin: 0.75em 0;
}

.head__game-logo {
    display: block;
    text-indent: -999em;
    margin: 0;
}

.head__game-logo_xy,
.game-picker__game-logo_xy {
    height: 3rem;
    line-height: 3rem;
    margin: 1em 0;
}

.head__game-logo_oras,
.game-picker__game-logo_oras,
.head__game-logo_sv,
.game-picker__game-logo_sv {
    width: 13rem;
    height: 4rem;
    line-height: 4rem;
    margin: 0.5em 0;
}

.head__game-logo_gsc,
.game-picker__game-logo_gsc,
.head__game-logo_swsh,
.game-picker__game-logo_swsh,
.head__game-logo_arceus,
.game-picker__game-logo_arceus,
.head__game-logo_home,
.game-picker__game-logo_home,
.head__game-logo_champions,
.game-picker__game-logo_champions {
    width: 10rem;
    height: 5rem;
    line-height: 5rem;
    margin: 0;
}

.head__game-logo_bdsp,
.game-picker__game-logo_bdsp {
    width: 11rem;
}

.head__game-logo_arceus,
.game-picker__game-logo_arceus {
    width: 7.5rem;
}

.head__game-logo_home,
.game-picker__game-logo_home {
    width: 7rem;
}

.head__game-logo_rby,
.game-picker__game-logo_rby {
    width: 10.5rem;
    height: 1.875rem;
    line-height: 1.875rem;
    margin: 1.5625rem 0;
}

.head__game-logo_gsc,
.game-picker__game-logo_gsc {
    width: 5.625rem;
}

.head__game-logo_rse,
.game-picker__game-logo_rse,
.head__game-logo_dppt,
.game-picker__game-logo_dppt {
    width: 13rem;
    height: 2.5rem;
    line-height: 2.5rem;
    margin: 1.25em 0;
}

.head__game-logo_frlg,
.game-picker__game-logo_frlg {
    width: 11.5rem;
    height: 3.25rem;
    line-height: 3.25rem;
    margin: 0.875em 0;
}

.head__game-logo_bw,
.game-picker__game-logo_bw {
    width: 12.5rem;
    height: 3.75rem;
    line-height: 3.75rem;
    margin: 0.625em 0;
}

.head__game-logo_b2w2,
.game-picker__game-logo_b2w2 {
    width: 12rem;
    height: 3.375rem;
    line-height: 3.375rem;
    margin: 0.8125em 0;
}

.head__game-logo_sv,
.game-picker__game-logo_sv {
    width: 14rem;
}

.head__game-logo_colo,
.game-picker__game-logo_colo {
    height: 4.125rem;
    line-height: 4.125rem;
    margin: 0.4375rem 0;
    width: 9.5rem;
}

.head__game-logo_xd,
.game-picker__game-logo_xd {
    height: 4.375rem;
    line-height: 4.375rem;
    margin: 0.3125rem 0;
    width: 10rem;
}

.head__game-logo_lza,
.game-picker__game-logo_lza {
    height: 4.5rem;
    line-height: 4.5rem;
    margin: 0.25rem 0;
    width: 9.5rem;
}

/* FAQ */

.head__faq dl {
    margin: 2em;
}

.head__faq dl p {
    text-align: left;
    margin: 1em 0;
    max-width: none;
}

.head__faq abbr {
    text-decoration: none;
}

dt {
    font-weight: 700;
}

/* Team */

.head__team {
    position: relative;
    padding: 1.5em 0 0;
}

.head__team::before {
    content: "";
    position: absolute;
    inset: 0 0 5rem 0;
    background-color: #f0f0f0;
}

.head__header p {
    max-width: 75%;
    margin: 1em auto;
}

.team {
    display: grid;
    gap: 2em;
    grid-template-columns: 1fr;
    padding: 2em;
}

.slot__pokemon-render {
    width: 10em;
    height: 10em;
    margin: 1em;
    filter: drop-shadow(0 0 0.5px #1b1b1b);
    /*filter: drop-shadow(1px 0 0 black)
            drop-shadow(0 1px 0 black)
            drop-shadow(-1px 0 0 black)
            drop-shadow(0 -1px 0 black);*/
}

.slot__pokemon-render_sv {
    filter: none;
}

.slot__pokemon-render_gmax {
    width: 12em;
    height: 12em;
    margin: 0;
}

.team__slots {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-content: center;
    gap: 1em 0;
    justify-content: space-evenly;
    flex-wrap: wrap;
}

.slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
    justify-items: center;
    width: 12em;
    padding: 0;
}

.slot__remove-button,
.slot__info {
    cursor: no-drop;
}

.slot_populated.slot_hover {
    animation: shake 0.5s;
    animation-iteration-count: infinite;
}

.slot__bg-type-1,
.slot__bg-type-2 {
    background-size: 600% 600%;
    background-image: url(./img/types_bg.png);
}

.slot_empty .slot__bg-type-1,
.slot_empty .slot__bg-type-2 {
    background-image: url(./img/type_unknown.png);
    background-size: contain;
}

.slot__bg-type-2 {
    margin: 0;
}

.slot__info {
    width: 11em;
    height: 5em;
    border-radius: 0.625em;
    display: grid;
    align-content: center;
    align-items: center;
    grid-template-rows: 2em 1em;
    gap: 0.5em;
    justify-content: center;
    text-align: center;
}

.slot__name, .slot__form, .slot__type {
    line-height: 1;
}

.slot__name-container {
    display: flex;
    flex-direction: column;
    gap: 0.375em;
}

.slot__name {
    font-size: 0.875em;
    font-weight: 700;
    width: 100%;
}

.slot__form {
    font-size: 0.75em;
}

.slot__form_none {
    display: none;
}

.slot__type-container {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

.slot__type {
    width: 4.375em;
    background-size: contain;
    background-repeat: no-repeat;
    background-position-y: center;
    line-height: 1em;
    text-indent: -999em;
}

.slot_empty .slot__type-container,
.slot__type_undefined {
    display: none;
}


.slot__toggle-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin: 0.25em 0 0;
}

.slot__toggle-container_hidden {
    display: none;
}

.slot__toggle {
    font-family: 'icons';
    background: #fff;
    width: 1.5em;
    font-size: 1em;
    line-height: 1.5em;
    border-radius: .75em;
    filter: drop-shadow(0 0 1px #1b1b1b);
    color: #ccc;
}

.slot__toggle_shiny {
    color: #E96D23;
}

.slot__toggle_female {
    color: #fff;
    background: #EF547D;
}

.slot__toggle_male {
    color: #fff;
    background: #3B71DC;
}

.slot__toggle_tera {
    text-indent: -999em;
    width: 2em;
    height: 2em;
    background-color: transparent;
    background-repeat: no-repeat;
    background-size: contain;
    filter: none;
}

.slot__toggle_tera_picked:hover {
    transform: scale(0.75);
    cursor: no-drop;
}

.slot__toggle_tera_none {
    background-color: #a6a6a6;
    mask-image: url(img/type/tera.png);
    mask-size: 2em;
    -webkit-mask-image: url(img/type/tera.png);
    -webkit-mask-size: 2em;
}

.slot__toggle_tera_none:hover {
    background-color: #686868;
}

.slot__toggle_hidden {
    display: none;
}

.tera-picker {
    position: absolute;
    list-style: none;
    padding: 1em;
    display: grid;
    grid-template-columns: repeat(6, 2em);
    gap: 1em;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 0.5em;
    top: 2.25em;
    left: -8.5em;
    z-index: 100;
    filter: drop-shadow(0 2px 5px rgba(91,91,91,0.25));
}

.tera-picker_hidden {
    display: none;
}

.tera-picker__button {
    text-indent: -999em;
    width: 2em;
    height: 2em;
    background-repeat: no-repeat;
    background-size: contain;
  }

  .tera-picker__button:hover {
    transform: scale(1.25);
  }

/* Dex */

.picker__pokedexes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2em;
    margin: 2em 0;
    padding: 0;
}

.picker__pokedex-container_hidden {
    display: none;
}

.picker__pokedex-name {
    margin: 0;
}

.picker__pokedex {
    list-style: none;
    display: grid;
    gap: 0.25em;
    grid-template-columns: repeat(auto-fill, 5em);
    justify-content: center;
    margin: 1em 0;
    padding: 0;
}

.pokedex-entry {
    background-color: #eee;
    border-radius: 0.5em;
}

.pokedex-entry:hover {
    background-color: #cdf;
}

.pokedex-entry_filtered,
.pokedex-entry_picked {
    display: none;
}

.pokedex-entry__thumb {
    width: 4rem;
    height: 4rem;
    padding: 0.125rem 0;
    margin: 0.5em;
    filter: drop-shadow(0 0 0.5px #1b1b1b);
}

.pokedex-entry__thumb_sv {
    width: 5rem;
    height: 5rem;
    filter: none;
    margin: 0;
}

.pokedex-entry__button:hover .pokedex-entry__thumb {
    animation: jump 0.33s linear infinite;
}


/* Filters */

.picker__filter-button {
    background-color: #4d6ad8;
    color: #f0f0f0;
    font-weight: 700;
    text-align: center;
    display: inline-block;
    line-height: 1.5em;
    border-radius: .25em;
    cursor: pointer;
    box-sizing: border-box;
    position: absolute;
    width: 6em;
    top: -0.75em;
    right: 1em;
}

.picker__overlay {
    position: fixed;
    inset: 0;
    background: #00000080;
    z-index: 9999;
    display: grid;
    place-items: center;
}

.picker__overlay_hidden {
    display: none;
}

.picker__filters {
    background: #f6f6f6;
    border-radius: 1em;
    border: 1px solid #dedede;
    padding: 1em 0;
    box-sizing: content-box;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 4em);
}

.filter__scrollbox {
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    display: grid;
    gap: 1em 0;
    grid-template-columns: repeat(auto-fill, 21em);
    justify-content: center;
    border: 1px solid #dedede;
    border-width: 1px 0;
    padding: 0.5em;
    /* 10 items, each item is 3em tall plus 1px for top/bottom borders */
    max-height: calc(1em * (10 * 3) + 2px);
}

.filter__heading {
    margin: 0;
    color: #4d6ad8;
}

.filter__close-button {
    display: block !important;
    background-color: #4d6ad8;
    color: #f0f0f0;
    font-weight: 700;
    text-align: center;
    display: inline-block;
    line-height: 2em;
    border-radius: 0.25em;
    cursor: pointer;
    box-sizing: border-box;
    width: 17em;
    margin: 0.5em auto 0;
}

.picker__filter-button:hover,
.picker__filter-button:focus,
.filter__close-button:hover,
.filter__close-button:focus {
    color: #f0f0f0;
    text-decoration: none;
    box-shadow: 0 0 0 0.0625em #1b1b1b;
}

.filter {
    display: grid;
    grid-template-columns: auto auto;
    position: relative;
}

.filter__name {
    vertical-align: middle;
    display: inline-block;
    width: 10.5em;
    text-align: center;
    font-weight: 700;
    line-height: 2em;
}

.filter__button,
.filter__search-bar {
    width: 10.5rem;
    border: none;
    padding: 0.375rem 0.1875rem;
    font-size: .875em;
    line-height: 1.125rem;
    background: #fff;
    color: inherit;
    cursor: pointer;
    border: 1px solid #d9d9d9
}

.filter__search-bar {
    cursor: text;
}

.filter_enabled .filter__button {
    cursor: pointer;
}

.filter_enabled .filter__button::after {
    display: inline-block;
    width: 0;
    height: 0;
    content: '';
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    position: absolute;
    top: 1em;
    right: 1em;
}

.filter__button:hover,
:where(.filter_active, .filter_disabled) .filter__button,
.filter__dropdown-menu li.disabled {
    cursor: auto;
    background: #e6e6e6
}

.filter_disabled .filter__button {
    cursor: auto;
}

.filter:not(.filter_active) .filter__dropdown-menu {
    display: none
}

.filter__dropdown-menu {
    display: grid;
    grid-column: 1 / span 2;
    grid-template-columns: auto;
    background: #fff;
    font-size: 0.875em;
    text-align: left;
    box-sizing: content-box;
    border: 1px solid #d9d9d9;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.filter__dropdown-menu_2col {
    grid-auto-flow: column;
    grid-template-columns: repeat(2, calc(100% / 2));
    grid-template-rows: repeat(6, 2em);
}

.filter__dropdown-menu_3col {
    grid-auto-flow: column;
    grid-template-columns: repeat(3, calc(100% / 3));
    grid-template-rows: repeat(7, 2em);
}

.filter__dropdown-menu_icons {
    grid-auto-flow: column;
    grid-template-columns: repeat(3, calc(100% / 3));
    grid-template-rows: repeat(6, 2.5em);
}

.filter__dropdown-menu_2col .dropdown-menu-item:first-child {
    grid-area: 1 / span 2;
}

.filter__dropdown-menu_3col .dropdown-menu-item:first-child,
.filter__dropdown-menu_icons .dropdown-menu-item:first-child {
    grid-area: 1 / span 3;
}

.dropdown-menu-item {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 1em;
    padding: 0 0.5em;
    line-height: 2em;
}

.dropdown-menu-item:hover {
    background: #f5f5f5;
}

.dropdown-menu-item_active,
.dropdown-menu-item_active:hover {
    background: #428bca;
    color: #f0f0f0;
}

.dropdown-menu-item_hidden {
    display: none;
}

.dropdown-menu-item__name {
    width: 100%;
    cursor: pointer;
}

.dropdown-menu-item__icon {
    width: 2em;
    height: 2em;
}

.dropdown-menu-item_active .dropdown-menu-item__icon {
    filter: brightness(0.25) invert(1);
}

.dropdown-menu-item__checkbox {
    cursor: pointer;
    font-size: inherit;
}

/* Table */

.team__type-analysis {
    display: flex;
    flex-direction: column;
    gap: 1em;
    justify-content: stretch;
    text-align: center;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 1em;
    padding: 1em;
}

.type-analysis_hidden {
    display: none;
}

.type-analysis__grid {
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fill, 6.875em);
    justify-content: space-evenly;
    list-style: none;
    margin: 0;
    padding: 0;
}

.type-analysis__heading {
    margin: 0;
}

.tally__type-symbol {
    background-size: contain;
    display: inline-block;
    width: 2em;
    height: 2em;
    text-indent: -999em;
}

.tally_warning .tally__type-symbol {
    filter: drop-shadow(0 0 0.5em #ef8a62);
}

.slot__toggle_tera_normal,
.tera-picker__button_normal {
    background-image: url(img/type/normal_tera.png);
}

.slot__toggle_tera_fighting,
.tera-picker__button_fighting {
    background-image: url(img/type/fighting_tera.png);
}

.slot__toggle_tera_flying,
.tera-picker__button_flying {
    background-image: url(img/type/flying_tera.png);
}

.slot__toggle_tera_poison,
.tera-picker__button_poison {
    background-image: url(img/type/poison_tera.png);
}

.slot__toggle_tera_ground,
.tera-picker__button_ground {
    background-image: url(img/type/ground_tera.png);
}

.slot__toggle_tera_rock,
.tera-picker__button_rock {
    background-image: url(img/type/rock_tera.png);
}

.slot__toggle_tera_bug,
.tera-picker__button_bug {
    background-image: url(img/type/bug_tera.png);
}

.slot__toggle_tera_ghost,
.tera-picker__button_ghost {
    background-image: url(img/type/ghost_tera.png);
}

.slot__toggle_tera_steel,
.tera-picker__button_steel {
    background-image: url(img/type/steel_tera.png);
}

.slot__toggle_tera_fire,
.tera-picker__button_fire {
    background-image: url(img/type/fire_tera.png);
}

.slot__toggle_tera_water,
.tera-picker__button_water {
    background-image: url(img/type/water_tera.png);
}

.slot__toggle_tera_grass,
.tera-picker__button_grass {
    background-image: url(img/type/grass_tera.png);
}

.slot__toggle_tera_electric,
.tera-picker__button_electric {
    background-image: url(img/type/electric_tera.png);
}

.slot__toggle_tera_psychic,
.tera-picker__button_psychic {
    background-image: url(img/type/psychic_tera.png);
}

.slot__toggle_tera_ice,
.tera-picker__button_ice {
    background-image: url(img/type/ice_tera.png);
}

.slot__toggle_tera_dragon,
.tera-picker__button_dragon {
    background-image: url(img/type/dragon_tera.png);
}

.slot__toggle_tera_dark,
.tera-picker__button_dark {
    background-image: url(img/type/dark_tera.png);
}

.slot__toggle_tera_fairy,
.tera-picker__button_fairy {
    background-image: url(img/type/fairy_tera.png);
}

.tally_normal .tally__type-symbol {
    background-image: url(img/type/normal_sym.png);
}

.tally_fighting .tally__type-symbol {
    background-image: url(img/type/fighting_sym.png);
}

.tally_flying .tally__type-symbol {
    background-image: url(img/type/flying_sym.png);
}

.tally_poison .tally__type-symbol {
    background-image: url(img/type/poison_sym.png);
}

.tally_ground .tally__type-symbol {
    background-image: url(img/type/ground_sym.png);
}

.tally_rock .tally__type-symbol {
    background-image: url(img/type/rock_sym.png);
}

.tally_bug .tally__type-symbol {
    background-image: url(img/type/bug_sym.png);
}

.tally_ghost .tally__type-symbol {
    background-image: url(img/type/ghost_sym.png);
}

.tally_steel .tally__type-symbol {
    background-image: url(img/type/steel_sym.png);
}

.tally_fire .tally__type-symbol {
    background-image: url(img/type/fire_sym.png);
}

.tally_water .tally__type-symbol {
    background-image: url(img/type/water_sym.png);
}

.tally_grass .tally__type-symbol {
    background-image: url(img/type/grass_sym.png);
}

.tally_electric .tally__type-symbol {
    background-image: url(img/type/electric_sym.png);
}

.tally_psychic .tally__type-symbol {
    background-image: url(img/type/psychic_sym.png);
}

.tally_ice .tally__type-symbol {
    background-image: url(img/type/ice_sym.png);
}

.tally_dragon .tally__type-symbol {
    background-image: url(img/type/dragon_sym.png);
}

.tally_dark .tally__type-symbol {
    background-image: url(img/type/dark_sym.png);
}

.tally_fairy .tally__type-symbol {
    background-image: url(img/type/fairy_sym.png);
}

.tally__marks {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-block;
}

.tally__mark {
    display: inline-block;
    width: 0.5em;
    height: 2em;
    text-indent: -999em;
    background-color: #e6e6e6;
    border-radius: 0.125em;
    margin: 0 0 0 0.3125em;
    position: relative;
}

:where(.tally__mark_positive, .tally__mark_negative):hover {
    top: -0.25em;
}

.tally__mark_positive {
    background-color: #67a9cf;
}

.tally__mark_negative {
    background-color: #ef8a62;
}

.slot_grayscale {
    opacity: 0.5;
    filter: grayscale(1);
}

/* Footer */

.tail__footer {
    font-size: 0.75em;
    text-align: right
}

.footer__donation {
    line-height: 1.25rem;
    text-align: center
}

.footer__feedback {
    text-align: center
}

.footer__donation-button {
    background: url(https://img.shields.io/badge/donation%20via-PayPal-blue.svg);
    display: inline-block;
    vertical-align: middle;
    text-indent: -999em;
    direction: ltr;
    width: 7.875rem;
    height: 1.25rem;
}


/* Sprites/Variations */

.slot__type_normal {
    background-image: url(./img/type/normal.png);
}

.slot__type_fighting {
    background-image: url(./img/type/fighting.png);
}

.slot__type_flying {
    background-image: url(./img/type/flying.png);
}

.slot__type_poison {
    background-image: url(./img/type/poison.png);
}

.slot__type_ground {
    background-image: url(./img/type/ground.png);
}

.slot__type_rock {
    background-image: url(./img/type/rock.png);
}

.slot__type_bug {
    background-image: url(./img/type/bug.png);
}

.slot__type_ghost {
    background-image: url(./img/type/ghost.png);
}

.slot__type_steel {
    background-image: url(./img/type/steel.png);
}

.slot__type_fire {
    background-image: url(./img/type/fire.png);
}

.slot__type_water {
    background-image: url(./img/type/water.png);
}

.slot__type_grass {
    background-image: url(./img/type/grass.png);
}

.slot__type_electric {
    background-image: url(./img/type/electric.png);
}

.slot__type_psychic {
    background-image: url(./img/type/psychic.png);
}

.slot__type_ice {
    background-image: url(./img/type/ice.png);
}

.slot__type_dragon {
    background-image: url(./img/type/dragon.png);
}

.slot__type_dark {
    background-image: url(./img/type/dark.png);
}

.slot__type_fairy {
    background-image: url(./img/type/fairy.png);
}

.slot__bg-type-1_normal {
    background-position: 0 0
}

.slot__bg-type-2_normal {
    background-position: 20% 0
}

.slot__bg-type-1_fighting {
    background-position: 40% 0
}

.slot__bg-type-2_fighting {
    background-position: 60% 0
}

.slot__bg-type-1_flying {
    background-position: 80% 0
}

.slot__bg-type-2_flying {
    background-position: 100% 0
}

.slot__bg-type-1_poison {
    background-position: 0 20%
}

.slot__bg-type-2_poison {
    background-position: 20% 20%
}

.slot__bg-type-1_ground {
    background-position: 40% 20%
}

.slot__bg-type-2_ground {
    background-position: 60% 20%
}

.slot__bg-type-1_rock {
    background-position: 80% 20%
}

.slot__bg-type-2_rock {
    background-position: 100% 20%
}

.slot__bg-type-1_bug {
    background-position: 0 40%
}

.slot__bg-type-2_bug {
    background-position: 20% 40%
}

.slot__bg-type-1_ghost {
    background-position: 40% 40%
}

.slot__bg-type-2_ghost {
    background-position: 60% 40%
}

.slot__bg-type-1_steel {
    background-position: 80% 40%
}

.slot__bg-type-2_steel {
    background-position: 100% 40%
}

.slot__bg-type-1_fire {
    background-position: 0 60%
}

.slot__bg-type-2_fire {
    background-position: 20% 60%
}

.slot__bg-type-1_water {
    background-position: 40% 60%
}

.slot__bg-type-2_water {
    background-position: 60% 60%
}

.slot__bg-type-1_grass {
    background-position: 80% 60%
}

.slot__bg-type-2_grass {
    background-position: 100% 60%
}

.slot__bg-type-1_electric {
    background-position: 0 80%
}

.slot__bg-type-2_electric {
    background-position: 20% 80%
}

.slot__bg-type-1_psychic {
    background-position: 40% 80%
}

.slot__bg-type-2_psychic {
    background-position: 60% 80%
}

.slot__bg-type-1_ice {
    background-position: 80% 80%
}

.slot__bg-type-2_ice {
    background-position: 100% 80%
}

.slot__bg-type-1_dragon {
    background-position: 0 100%
}

.slot__bg-type-2_dragon {
    background-position: 20% 100%
}

.slot__bg-type-1_dark {
    background-position: 40% 100%
}

.slot__bg-type-2_dark {
    background-position: 60% 100%
}

.slot__bg-type-1_fairy {
    background-position: 80% 100%
}

.slot__bg-type-2_fairy {
    background-position: 100% 100%
}

.slot_empty .slot__info {
    background: #68a090;
    grid-template-rows: 1fr;
}

.slot__info_normal {
    background: #c6c6a7
}

.slot__info_grass {
    background: #a7db8d
}

.slot__info_fire {
    background: #f5ac78
}

.slot__info_water {
    background: #9db7f5
}

.slot__info_fighting {
    background: #d67873
}

.slot__info_flying {
    background: #c6b7f5
}

.slot__info_poison {
    background: #c183c1
}

.slot__info_ground {
    background: #ebd69d
}

.slot__info_rock {
    background: #d1c17d
}

.slot__info_bug {
    background: #c6d16e
}

.slot__info_ghost {
    background: #a292bc
}

.slot__info_electric {
    background: #fae078
}

.slot__info_psychic {
    background: #fa92b2
}

.slot__info_ice {
    background: #bce6e6
}

.slot__info_dragon {
    background: #a27dfa
}

.slot__info_dark {
    background: #a29288
}

.slot__info_steel {
    background: #d1d1e0
}

.slot__info_fairy {
    background: #f4bdc9
}


/* Animations */

@keyframes jump {
    0%,
    100% {
        padding: 0.25rem 0 0 0;
    }
    50% {
        padding: 0 0 0.25rem 0;
    }
}

@keyframes shake {
    00% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }
    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }
    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }
    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }
    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }
    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }
    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }
    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }
    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }
    1% {
        transform: translate(1px, 1px) rotate(0deg);
    }
    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

@media screen and (min-width: 1280px) {
    .head_sticky {
        position: sticky;
        z-index: 100;
        top: -1px;
        left: 0;
        margin-bottom: 2rem;
    }

    .head_sticky .head__team {
        height: 100%;
        transition: 0.4s;
        background: transparent;
    }

    .head_sticky .head__header,
    .head_sticky .slot__info,
    .head_sticky .slot__toggle-container,
    .head_sticky .team__buttons,
    .head_sticky .team__heading {
        display: none;
    }

    .head_sticky .team,
    .head_sticky .team__slots {
        width: 100%;
        margin: 0;
    }

    .head_sticky .team {
        display: flex;
        height: 20vh;
        min-height: 9em;
        max-height: 12em;
        padding: 0;
    }

    .head_sticky .team__slots {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .head_sticky .slot {
        transform: scale(0.75);
        grid-template-rows: 1fr;
    }
}

@media screen and (max-width: 1279px) {
    .slot {
        width: 33%;
        flex-grow: 1;
    }

    .slot__pokemon-render,
    .slot__pokemon-render_gmax {
        width: 5em;
        height: 5em;
        margin: 0 auto;
    }

    .slot__bg-type-1,
    .slot__bg-type-2 {
        width: 5em;
        margin: 0 auto;
    }

    .slot__info {
        width: 7em;
        height: 4em;
        padding: 0 0.5em;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .slot__type-container {
        display: none;
    }

    .picker__pokedex {
        grid-template-columns: repeat(auto-fill, 4em);
    }

    .pokedex-entry__thumb {
        width: 3em;
        height: 3em;
    }

    .pokedex-entry__thumb_sv {
        width: 4em;
        height: 4em;
    }
}

@media screen and (min-width: 775px) and (max-width: 1279px) {
    .team {
        max-width: 26em;
        box-sizing: content-box;
    }
}

@media screen and (max-width: 691px) and (orientation: portrait) {
    article {
        padding: 0;
        max-width: 19.125em;
    }
    .head__game-picker {
        padding: 1.25em 0 1em;
    }

    .head__header p {
        display: none;
    }

    .head dd {
        margin: 0;
    }

    .head__game-logo {
        background-repeat: no-repeat;
        background-position: center;
        flex-basis: 100%;
    }

    .team {
        padding: 2em 1em;
    }

    .slot {
        width: 50%;
    }

    .tera-picker {
        grid-template-columns: repeat(3, 2em);
        left: -4em;
    }

    .filter__dropdown-menu_2col,
    .filter__dropdown-menu_3col,
    .filter__dropdown-menu_icons {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        overflow-x: hidden;
        overflow-y: auto;
        scrollbar-gutter: stable;
        height: 8em;
    }

    .filter__dropdown-menu_2col .dropdown-menu-item:first-child,
    .filter__dropdown-menu_3col .dropdown-menu-item:first-child,
    .filter__dropdown-menu_icons .dropdown-menu-item:first-child {
        grid-area: auto;
    }

    .tail__footer {
        font-size: 1em;
    }
}

/* Interface redesign */

:root {
    --surface-page: #f7f8f2;
    --surface-card: #ffffff;
    --surface-muted: #f5f7fb;
    --surface-inverse: #15151c;
    --text-primary: #15151c;
    --text-secondary: #646b78;
    --line: #d8dde8;
    --accent-blue: #2f66d0;
    --accent-red: #e94b4b;
    --accent-yellow: #f5c84b;
    --accent-green: #45a36b;
    --shadow-card: 0 14px 34px rgba(21, 21, 28, 0.08);
    --shadow-hover: 0 18px 38px rgba(21, 21, 28, 0.14);
    --radius: 0.5rem;
}

body {
    background: var(--surface-page);
    color: var(--text-primary);
    font-family: ui-rounded, "Avenir Next", "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: hidden;
}

body,
a,
a:hover,
a:focus,
caption {
    color: var(--text-primary);
}

article {
    background: transparent;
    box-sizing: border-box;
    max-width: 81.875em;
    padding: 0 2rem 2rem;
    margin: 0 auto;
}

article section {
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-sizing: border-box;
    padding: 1.25rem;
    margin: 0 auto 1.25rem;
    box-shadow: 0 1px 0 rgba(21, 21, 28, 0.02);
    width: 100%;
}

h1,
h2,
h3,
p {
    text-align: left;
}

h1,
h2,
h3 {
    color: var(--text-primary);
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    margin: 0;
}

h2 {
    background: transparent;
    color: var(--text-primary);
    display: block;
    font-size: 1.5rem;
    line-height: 1.1;
    margin: 0 0 0.75rem;
    position: static;
}

h3 {
    line-height: 1.2;
    margin: 1.25rem 0 0.75rem;
}

p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.head {
    display: grid;
    gap: 1.25rem;
    min-width: 0;
    padding: 1.75rem 0 0;
}

.head__header {
    background: var(--surface-inverse);
    border-radius: var(--radius);
    box-sizing: border-box;
    color: #fff;
    min-height: 10.75rem;
    min-width: 0;
    padding: 1.5rem 1.625rem;
}

.head__heading,
.head__heading a,
.head__game-name {
    color: #fff;
    min-width: 0;
    overflow-wrap: break-word;
}

.head__heading::before {
    content: "GAME PICKER";
    color: var(--accent-yellow);
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.head__heading:has(.head__game-logo)::before {
    content: "TEAM PLANNER";
}

.head__header p {
    color: #c8ceda;
    margin: 1rem 0 0;
    max-width: 48rem;
}

.head__game-picker {
    padding: 1.25rem;
}

.head__game-picker h2 {
    margin-bottom: 0.25rem;
}

.head__game-picker > p {
    margin: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.game-picker {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
    justify-content: stretch;
    margin: 1.25rem 0 0;
}

.game-picker__button {
    align-items: center;
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 rgba(21, 21, 28, 0.02);
    box-sizing: border-box;
    display: flex;
    height: 6.75rem;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    width: 100%;
}

.game-picker__button::before {
    background: var(--accent-blue);
    content: "";
    height: 0.375rem;
    inset: 0 0 auto;
    position: absolute;
}

.game-picker__game:nth-child(4n + 1) .game-picker__button::before {
    background: var(--accent-red);
}

.game-picker__game:nth-child(4n + 2) .game-picker__button::before {
    background: var(--accent-yellow);
}

.game-picker__game:nth-child(4n + 3) .game-picker__button::before {
    background: var(--accent-green);
}

.game-picker__button:hover,
.game-picker__button:focus {
    background: #fff8f8;
    border-color: var(--accent-red);
    box-shadow: var(--shadow-hover);
    outline: none;
    transform: translateY(-0.25rem);
}

.game-picker__game_disabled {
    opacity: 0.55;
}

.game-picker__game_disabled .game-picker__button,
.game-picker__game_disabled .game-picker__button:hover,
.game-picker__game_disabled .game-picker__button:focus {
    background: var(--surface-muted);
    border-color: var(--line);
    box-shadow: none;
    cursor: auto;
    transform: none;
}

.head__game-logo,
.game-picker__game-logo {
    display: block;
    height: 4rem;
    margin: 0;
    max-width: 100%;
    object-fit: contain;
    width: 13rem;
}

.head__game-logo {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.head__game-button {
    align-items: center;
    justify-content: flex-start;
}

.head__game-button .head__game-logo {
    width: min(18rem, 100%);
}

.head__team {
    padding: 0;
}

.head__team::before {
    content: none;
}

.team {
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-sizing: border-box;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    max-width: none;
    min-width: 0;
    padding: 1.25rem;
    width: 100%;
}

.team:has(.team__type-analysis:not(.type-analysis_hidden)) {
    grid-template-areas:
        "heading ."
        "slots analysis"
        "buttons analysis";
    grid-template-columns: max-content minmax(20rem, 1fr);
}

.team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__heading {
    grid-area: heading;
}

.team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__slots {
    grid-area: slots;
    grid-template-columns: repeat(3, 13.125rem);
}

.team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__buttons {
    grid-area: buttons;
}

.team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__type-analysis {
    align-self: start;
    grid-area: analysis;
}

.team__heading {
    margin: 0;
}

.team__slots {
    display: grid;
    gap: 0.875rem;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    justify-content: stretch;
}

.team__buttons {
    justify-content: flex-start;
    gap: 0.625rem;
}

.team__button {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text-primary);
    flex-basis: auto;
    font-size: 0.8125rem;
    line-height: 1;
    padding: 0.75rem 0.875rem;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.team__button:first-child {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
}

.team__button:hover,
.team__button:focus {
    background: var(--surface-inverse);
    border-color: var(--surface-inverse);
    box-shadow: none;
    color: #fff;
    outline: none;
    text-decoration: none;
    transform: translateY(-1px);
}

.slot {
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 rgba(21, 21, 28, 0.03);
    gap: 0;
    overflow: hidden;
    width: auto;
}

.slot__remove-button,
.slot__info {
    cursor: pointer;
}

.slot_populated.slot_hover {
    animation: none;
    box-shadow: var(--shadow-card);
    transform: translateY(-0.125rem);
}

.slot__bg-type-1 {
    align-items: center;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    width: 100%;
}

.slot__bg-type-2 {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100%;
    width: 100%;
}

.slot__pokemon-render,
.slot__pokemon-render_gmax {
    height: 7rem;
    margin: 0;
    object-fit: contain;
    width: 7rem;
}

.slot__pokemon-render_gmax {
    height: 8rem;
    width: 8rem;
}

.slot__info {
    border-radius: 0;
    box-sizing: border-box;
    gap: 0.375rem;
    grid-template-rows: auto auto;
    min-height: 4.75rem;
    padding: 0.75rem;
    width: 100%;
}

.slot__name {
    font-size: 0.8125rem;
}

.slot__form {
    color: rgba(21, 21, 28, 0.68);
    font-size: 0.6875rem;
}

.slot__type {
    width: 3.75rem;
}

.slot__toggle-container {
    background: #fff;
    border-top: 1px solid rgba(21, 21, 28, 0.08);
    gap: 0.375rem;
    margin: 0;
    padding: 0.5rem;
}

.slot__toggle {
    box-shadow: 0 0 0 1px rgba(21, 21, 28, 0.08);
    filter: none;
}

.team__type-analysis {
    background: var(--surface-inverse);
    border: 0;
    border-radius: var(--radius);
    color: #fff;
    padding: 1rem;
}

.type-analysis__heading {
    color: #fff;
    font-size: 1rem;
}

.type-analysis__grid {
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
}

@media screen and (min-width: 1280px) {
    .type-count-15 .team:has(.team__type-analysis:not(.type-analysis_hidden)) .type-analysis__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .type-count-17 .team:has(.team__type-analysis:not(.type-analysis_hidden)) .type-analysis__grid,
    .type-count-18 .team:has(.team__type-analysis:not(.type-analysis_hidden)) .type-analysis__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.tally {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.375rem;
    display: flex;
    gap: 0.375rem;
    justify-content: center;
    padding: 0.375rem;
}

.tally__type-symbol {
    height: 1.375rem;
    width: 1.375rem;
}

.tally__mark {
    border-radius: 0.125rem;
    height: 1.375rem;
    margin-left: 0.1875rem;
    width: 0.375rem;
}

.type-analysis__note {
    color: #a9b0bf;
    font-size: 0.75rem;
    margin: 0;
}

.tail section {
    padding: 1.25rem;
}

.picker__heading {
    margin-right: 7rem;
}

.picker__filter-button {
    background: var(--accent-blue);
    border-radius: var(--radius);
    color: #fff;
    line-height: 2.25rem;
    right: 1.25rem;
    top: 1.25rem;
    width: 6.5rem;
}

.picker__filter-button:hover,
.picker__filter-button:focus,
.filter__close-button:hover,
.filter__close-button:focus {
    background: var(--surface-inverse);
    box-shadow: none;
    color: #fff;
    outline: none;
}

.picker__pokedexes {
    gap: 1.25rem;
    margin: 1rem 0 0;
}

.picker__pokedex-name {
    color: var(--text-primary);
    font-size: 1rem;
}

.picker__pokedex {
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(4.75rem, 1fr));
    margin: 0.75rem 0 0;
}

.pokedex-entry {
    background: var(--surface-muted);
    border: 1px solid transparent;
    border-radius: var(--radius);
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pokedex-entry:hover,
.pokedex-entry:focus-within {
    background: #fff8f8;
    border-color: var(--accent-red);
    box-shadow: 0 10px 22px rgba(21, 21, 28, 0.1);
    transform: translateY(-0.125rem);
}

.pokedex-entry__button {
    display: block;
    width: 100%;
}

.pokedex-entry__thumb,
.pokedex-entry__thumb_sv {
    height: 4rem;
    margin: 0.25rem auto;
    object-fit: contain;
    padding: 0;
    width: 4rem;
}

.pokedex-entry__button:hover .pokedex-entry__thumb {
    animation: none;
}

.picker__filters {
    background: var(--surface-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.filter__scrollbox {
    border-color: var(--line);
}

.filter__heading {
    color: var(--text-primary);
}

.filter__close-button {
    background: var(--accent-blue);
    border-radius: var(--radius);
    color: #fff;
}

.filter__button,
.filter__search-bar {
    background: var(--surface-muted);
    border: 1px solid var(--line);
    border-radius: 0.375rem;
    color: var(--text-primary);
}

.filter__button:hover,
:where(.filter_active, .filter_disabled) .filter__button,
.filter__dropdown-menu li.disabled {
    background: #e9edf5;
}

.filter__dropdown-menu {
    border-color: var(--line);
    border-radius: 0.375rem;
    overflow: hidden;
}

.dropdown-menu-item:hover {
    background: var(--surface-muted);
}

.dropdown-menu-item_active,
.dropdown-menu-item_active:hover {
    background: var(--accent-blue);
}

.tail__footer {
    color: var(--text-secondary);
    margin: 1.25rem 0 0;
    text-align: left;
}

.tail__footer p {
    text-align: left;
}

.footer__donation {
    text-align: left;
}

@media screen and (max-width: 1279px) {
    article {
        padding-inline: 1rem;
    }

    .team:has(.team__type-analysis:not(.type-analysis_hidden)) {
        grid-template-areas:
            "heading"
            "slots"
            "buttons"
            "analysis";
        grid-template-columns: 1fr;
    }

    .team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__slots {
        grid-template-columns: repeat(auto-fit, minmax(min(13.125rem, 100%), 1fr));
    }

    .team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__type-analysis {
        min-width: 0;
    }

    .slot {
        width: auto;
    }
}

@media screen and (max-width: 691px) and (orientation: portrait) {
    article {
        max-width: none;
        padding: 0 0.75rem 1rem;
    }

    .head__header {
        min-height: 0;
        padding: 1.25rem;
    }

    .head__game-button {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .head__game-button .head__game-logo {
        flex-basis: auto;
        width: min(14rem, 100%);
    }

    h1 {
        font-size: 1.75rem;
    }

    .game-picker {
        grid-template-columns: 1fr;
    }

    .team {
        padding: 1rem;
    }

    .team__slots {
        grid-template-columns: 1fr;
    }

    .team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__slots {
        grid-template-columns: 1fr;
    }

    .team__buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .team__button {
        width: 100%;
    }

    .slot {
        width: auto;
    }

    .slot__bg-type-1 {
        aspect-ratio: 2.25 / 1;
    }

    .slot__info {
        min-height: 3.25rem;
        padding: 0.625rem;
    }

    .slot__pokemon-render,
    .slot__pokemon-render_gmax {
        height: 4.75rem;
        width: 4.75rem;
    }

    .picker__pokedex {
        grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr));
    }

    .picker__heading {
        margin-right: 0;
    }

    .picker__filter-button {
        display: block;
        line-height: 2.5rem;
        margin: 0.75rem 0 0;
        position: static;
        width: 100%;
    }
}

/* Pencil implementation pass */

.head__header {
    align-items: end;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.head__header > p {
    grid-column: 1;
}

.hero__stats {
    align-items: stretch;
    display: flex;
    gap: 0.75rem;
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-content: flex-end;
}

.hero__stats > span,
.team__summary > span {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    box-sizing: border-box;
    color: #fff;
    display: grid;
    gap: 0.25rem;
    min-width: 6.25rem;
    padding: 0.875rem 1rem;
}

.hero__stats strong,
.team__summary strong {
    color: inherit;
    font-size: 1.375rem;
    line-height: 1;
}

.hero__stats span span,
.team__summary span span {
    color: #c8ceda;
    font-size: 0.75rem;
    line-height: 1;
}

.game-picker {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.game-picker__button {
    align-items: start;
    display: grid;
    gap: 0.25rem 0.75rem;
    grid-template-columns: minmax(0, 1fr) 5.25rem;
    grid-template-rows: auto 1fr auto;
    height: 7.25rem;
    justify-content: stretch;
    padding: 1rem;
    text-align: left;
}

.game-picker__code {
    color: var(--accent-blue);
    font-size: 0.6875rem;
    font-weight: 800;
    grid-column: 1;
    line-height: 1;
}

.game-picker__name {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 800;
    grid-column: 1;
    line-height: 1.1;
    max-width: 10rem;
}

.game-picker__generation {
    align-self: end;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    grid-column: 1;
    line-height: 1;
}

.game-picker__game-logo {
    align-self: center;
    grid-column: 2;
    grid-row: 1 / span 3;
    height: 4.75rem;
    justify-self: end;
    opacity: 0.24;
    width: 5.25rem;
}

.game-picker__button:hover .game-picker__game-logo,
.game-picker__button:focus .game-picker__game-logo {
    opacity: 0.38;
}

.game-picker__game:nth-child(4n + 1) .game-picker__code {
    color: var(--accent-red);
}

.game-picker__game:nth-child(4n + 2) .game-picker__code {
    color: #b58a00;
}

.game-picker__game:nth-child(4n + 3) .game-picker__code {
    color: var(--accent-green);
}

.team__header {
    align-items: start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.team__summary {
    display: flex;
    gap: 0.75rem;
}

.team__summary > span {
    background: var(--surface-muted);
    border-color: var(--line);
    color: var(--text-primary);
    min-width: 5.5rem;
    padding: 0.75rem 0.875rem;
}

.team__summary span span {
    color: var(--text-secondary);
}

.team:has(.team__type-analysis:not(.type-analysis_hidden)) {
    grid-template-areas:
        "header ."
        "slots analysis"
        "buttons analysis";
}

.team:has(.team__type-analysis:not(.type-analysis_hidden)) .team__header {
    grid-area: header;
}

@media screen and (max-width: 1279px) {
    .team:has(.team__type-analysis:not(.type-analysis_hidden)) {
        grid-template-areas:
            "header"
            "slots"
            "buttons"
            "analysis";
        grid-template-columns: 1fr;
    }
}

.head__faq {
    padding: 1.5rem;
}

.head__faq dl {
    display: grid;
    gap: 1rem 1.5rem;
    grid-template-columns: 15rem minmax(0, 1fr);
    margin: 1.5rem 0 0;
}

.head__faq dt {
    border-top: 1px solid var(--line);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    padding-top: 1rem;
}

.head__faq dd {
    border-top: 1px solid var(--line);
    margin: 0;
    padding-top: 1rem;
}

.head__faq dl p {
    color: #4f5b6f;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 0.75rem;
}

.tail__footer {
    background: var(--surface-inverse);
    border-radius: var(--radius);
    box-sizing: border-box;
    color: #c8ceda;
    padding: 1.25rem;
}

.tail__footer a {
    color: #fff;
}

@media screen and (max-width: 900px) {
    .head__header {
        grid-template-columns: 1fr;
    }

    .hero__stats {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .head__faq dl {
        grid-template-columns: 1fr;
    }

    .head__faq dd {
        border-top: 0;
        padding-top: 0;
    }

    .team__header,
    .team__summary {
        flex-direction: column;
    }

    .team__summary {
        width: 100%;
    }
}

@media screen and (max-width: 691px) and (orientation: portrait) {
    .hero__stats {
        display: grid;
        grid-template-columns: 1fr;
    }

    .game-picker__button {
        grid-template-columns: minmax(0, 1fr) 4.75rem;
    }

    .game-picker__name {
        max-width: none;
    }
}

/* Home game picker logo redesign */

body.game-picker-page {
    background:
        radial-gradient(circle at 12% 8%, rgba(49, 103, 202, 0.08), transparent 22rem),
        radial-gradient(circle at 88% 10%, rgba(255, 203, 5, 0.12), transparent 24rem),
        linear-gradient(135deg, rgba(49, 103, 202, 0.045) 0 1px, transparent 1px 24px),
        #f5f7fb;
}

body.game-picker-page .head__game-picker {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dce5f2;
    border-radius: 1rem;
    box-shadow: 0 1.5rem 4rem rgba(29, 43, 83, 0.10);
    overflow: hidden;
    padding: 2rem;
}

body.game-picker-page .head__game-picker h2 {
    background: none;
    color: #172554;
    display: block;
    font-size: 1.75em;
    line-height: 1.2;
    margin: 0;
    position: static;
    text-align: left;
}

body.game-picker-page .head__game-picker > p {
    color: #687287;
    font-size: 0.9375em;
    margin: 0.375rem 0 1.75rem;
    max-width: none;
    text-align: left;
}

body.game-picker-page .game-picker {
    display: grid;
    gap: 1.125rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

body.game-picker-page .game-picker__button {
    align-items: center;
    background: #fff;
    border: 1px solid #dce5f2;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(29, 43, 83, 0.07);
    box-sizing: border-box;
    color: #172554;
    display: flex;
    height: auto;
    justify-content: center;
    min-height: 10.5rem;
    overflow: hidden;
    padding: 1.75rem 1.625rem;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
    width: auto;
}

body.game-picker-page .game-picker__button::before {
    background: var(--game-stripe, #3167ca);
    content: "";
    height: 0.25rem;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: height 160ms ease, filter 160ms ease;
}

body.game-picker-page .game-picker__game_rby {
    --game-stripe: linear-gradient(90deg, #e94949 0 33.333%, #3b6fd8 33.333% 66.666%, #f4cf3a 66.666% 100%);
}

body.game-picker-page .game-picker__game_gsc {
    --game-stripe: linear-gradient(90deg, #d6a931 0 33.333%, #aeb7c2 33.333% 66.666%, #e8579a 66.666% 100%);
}

body.game-picker-page .game-picker__game_rse {
    --game-stripe: linear-gradient(90deg, #d94a45 0 33.333%, #3477d8 33.333% 66.666%, #37a66a 66.666% 100%);
}

body.game-picker-page .game-picker__game_colo {
    --game-stripe: #c33a3f;
}

body.game-picker-page .game-picker__game_frlg {
    --game-stripe: linear-gradient(90deg, #d94737 0 50%, #4ca766 50% 100%);
}

body.game-picker-page .game-picker__game_xd {
    --game-stripe: #6b4aa2;
}

body.game-picker-page .game-picker__game_dppt {
    --game-stripe: linear-gradient(90deg, #6fa7df 0 33.333%, #d987b5 33.333% 66.666%, #8f8fa6 66.666% 100%);
}

body.game-picker-page .game-picker__game_hgss {
    --game-stripe: linear-gradient(90deg, #d59b2d 0 50%, #7aa7d9 50% 100%);
}

body.game-picker-page .game-picker__game_bw {
    --game-stripe: linear-gradient(90deg, #20242c 0 50%, #e8ecf2 50% 100%);
}

body.game-picker-page .game-picker__game_b2w2 {
    --game-stripe: linear-gradient(90deg, #20242c 0 50%, #e8ecf2 50% 100%);
}

body.game-picker-page .game-picker__game_xy {
    --game-stripe: linear-gradient(90deg, #2d6dcc 0 50%, #c53b46 50% 100%);
}

body.game-picker-page .game-picker__game_oras {
    --game-stripe: linear-gradient(90deg, #d94737 0 50%, #3d8ed8 50% 100%);
}

body.game-picker-page .game-picker__game_sm {
    --game-stripe: linear-gradient(90deg, #f0a133 0 50%, #5b7ed7 50% 100%);
}

body.game-picker-page .game-picker__game_usum {
    --game-stripe: linear-gradient(90deg, #f2b233 0 50%, #4d64c8 50% 100%);
}

body.game-picker-page .game-picker__game_lgpe {
    --game-stripe: linear-gradient(90deg, #f3d33f 0 50%, #caa064 50% 100%);
}

body.game-picker-page .game-picker__game_swsh {
    --game-stripe: linear-gradient(90deg, #3792d0 0 50%, #d95784 50% 100%);
}

body.game-picker-page .game-picker__game_bdsp {
    --game-stripe: linear-gradient(90deg, #6aa8dc 0 50%, #d78fb9 50% 100%);
}

body.game-picker-page .game-picker__game_arceus {
    --game-stripe: #b6a47a;
}

body.game-picker-page .game-picker__game_sv {
    --game-stripe: linear-gradient(90deg, #d94a4a 0 50%, #7a55c7 50% 100%);
}

body.game-picker-page .game-picker__game_lza {
    --game-stripe: #71a88f;
}

body.game-picker-page .game-picker__game_home {
    --game-stripe: #62cbd3;
}

body.game-picker-page .game-picker__game_champions {
    --game-stripe: #d7b45c;
}

body.game-picker-page .game-picker__button:hover,
body.game-picker-page .game-picker__button:focus {
    background: #fff;
    border-color: rgba(49, 103, 202, 0.45);
    box-shadow: 0 1rem 2.25rem rgba(29, 43, 83, 0.14);
    color: #172554;
    outline: none;
    transform: translateY(-0.125rem);
}

body.game-picker-page .game-picker__button:hover::before,
body.game-picker-page .game-picker__button:focus::before {
    filter: saturate(1.22) brightness(1.05);
    height: 0.375rem;
}

body.game-picker-page .game-picker__button:focus-visible {
    outline: 0.1875rem solid #ffcb05;
    outline-offset: 0.1875rem;
}

body.game-picker-page .game-picker__game_disabled {
    filter: grayscale(1);
    opacity: 0.58;
}

body.game-picker-page .game-picker__game_disabled .game-picker__button,
body.game-picker-page .game-picker__game_disabled .game-picker__button:hover,
body.game-picker-page .game-picker__game_disabled .game-picker__button:focus {
    background: #eef2f7;
    border-color: #dce5f2;
    box-shadow: none;
    cursor: auto;
    transform: none;
}

body.game-picker-page .game-picker__game-logo {
    align-self: center;
    display: block;
    grid-column: auto;
    grid-row: auto;
    height: 6.75rem;
    justify-self: center;
    line-height: normal;
    margin: 0;
    max-width: 18rem;
    object-fit: contain;
    opacity: 1;
    width: 100%;
}

body.game-picker-page .game-picker__button:hover .game-picker__game-logo,
body.game-picker-page .game-picker__button:focus .game-picker__game-logo {
    opacity: 1;
}

body.game-picker-page .game-picker__fallback {
    display: none;
    font-size: 1.125em;
    font-weight: 700;
    line-height: 1.2;
    max-width: 14rem;
}

body.game-picker-page .game-picker__button_logo-missing .game-picker__fallback {
    display: block;
}

body.game-picker-page .content-section {
    background: rgba(255, 255, 255, 0.88);
    border-color: #dce5f2;
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(29, 43, 83, 0.07);
    padding: 1.5rem;
}

body.game-picker-page .content-section h2,
body.game-picker-page .balance-card h3 {
    background: none;
    color: #172554;
    display: block;
    position: static;
    text-align: left;
}

body.game-picker-page .content-section h2 {
    margin: 0 0 0.75rem;
}

body.game-picker-page .content-section p {
    color: #334155;
    line-height: 1.65;
    margin: 0;
    max-width: 68rem;
    text-align: left;
}

body.game-picker-page .balance-steps {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 1.25rem 0;
    padding: 0;
}

body.game-picker-page .balance-card {
    background: #fff;
    border: 1px solid #dce5f2;
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 1.75rem rgba(29, 43, 83, 0.08);
    overflow: hidden;
}

body.game-picker-page .balance-card figure {
    align-items: center;
    background: #111117;
    display: grid;
    margin: 0;
    min-height: 10.25rem;
    padding: 0.75rem;
}

body.game-picker-page .balance-card img {
    display: block;
    height: 8.75rem;
    object-fit: contain;
    width: 100%;
}

body.game-picker-page .balance-card h3 {
    font-size: 1rem;
    line-height: 1.35;
    margin: 1rem 1rem 0.5rem;
}

body.game-picker-page .balance-card p {
    font-size: 0.875rem;
    margin: 0 1rem 1rem;
}

body.game-picker-page .image-fallback {
    color: #f8fafc;
    display: none;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    min-height: 8.75rem;
    place-items: center;
    text-align: center;
}

body.game-picker-page .balance-card img[hidden] + .image-fallback {
    display: grid;
}

body.game-picker-page .balance-tip {
    background: #f8fafc;
    border: 1px solid #dce5f2;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
}

body.game-picker-page .head__faq {
    background: rgba(255, 255, 255, 0.88);
    border-color: #dce5f2;
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(29, 43, 83, 0.07);
    margin-top: 1.25rem;
    padding: 1.5rem;
}

body.game-picker-page .head__faq h2 {
    background: none;
    color: #172554;
    display: block;
    position: static;
}

body.game-picker-page .head__faq dl {
    margin: 1rem 1.25rem 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
    body.game-picker-page .game-picker__button,
    body.game-picker-page .game-picker__button::before {
        transition: none;
    }

    body.game-picker-page .game-picker__button:hover,
    body.game-picker-page .game-picker__button:focus {
        transform: none;
    }
}

@media (max-width: 64rem) {
    body.game-picker-page article {
        max-width: 58rem;
    }

    body.game-picker-page .head__game-picker {
        padding: 1.5rem;
    }

    body.game-picker-page .game-picker {
        grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
    }

    body.game-picker-page .balance-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 42rem) {
    body.game-picker-page article {
        padding: 0 0.875rem 1.5rem;
    }

    body.game-picker-page .head__game-picker {
        border-radius: 0.875rem;
        padding: 1rem;
    }

    body.game-picker-page .game-picker {
        gap: 0.75rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.game-picker-page .game-picker__button {
        min-height: 6.75rem;
        padding: 1.125rem 0.875rem;
    }

    body.game-picker-page .game-picker__game-logo {
        height: 4.5rem;
    }

    body.game-picker-page .head__faq dl {
        margin: 1rem 0.25rem 0.25rem;
    }

    body.game-picker-page .content-section {
        border-radius: 0.875rem;
        padding: 1rem;
    }
}

@media (max-width: 23rem) {
    body.game-picker-page .game-picker {
        grid-template-columns: 1fr;
    }
}
