
/* 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 -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '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;
}

.head__tagline {
    font-size: 0.875em;
    color: #666;
    text-align: center;
    max-width: 50em;
    margin: 0.5em auto 1.5em;
}

.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__tagline {
    line-height: 1.5rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

.footer__donation {
    display: none;
}

.footer__feedback {
    display: none;
}

.footer__donation-button {
    display: none;
}


/* 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;
    }
}

/* === SEO + UI v2 === */

:root {
    --seo-v2-primary: #4d6ad8;
    --seo-v2-accent: #ff5c8a;
    --seo-v2-bg: #f0f0f0;
    --seo-v2-surface: #ffffff;
    --seo-v2-text: #222222;
    --seo-v2-muted: #6b7280;
    --seo-v2-border: #e5e7eb;
    --seo-v2-r-sm: 0.375rem;
    --seo-v2-r-md: 0.75rem;
    --seo-v2-r-lg: 1rem;
    --seo-v2-sh-sm: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.06);
    --seo-v2-sh-md: 0 0.25rem 1rem rgba(49, 46, 129, 0.08);
    --seo-v2-sh-lg: 0 0.5rem 1.5rem rgba(49, 46, 129, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --seo-v2-bg: #141417;
        --seo-v2-surface: #1f2028;
        --seo-v2-text: #f4f4f5;
        --seo-v2-muted: #a1a1aa;
        --seo-v2-border: #3f3f46;
        --seo-v2-sh-md: 0 0.25rem 1rem rgba(0, 0, 0, 0.35);
        --seo-v2-sh-lg: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

:focus-visible {
    outline: 0.125rem solid var(--seo-v2-primary);
    outline-offset: 0.125rem;
}

.seo-v2-breadcrumb {
    margin: 0 auto 1rem;
    max-width: 48rem;
}

.seo-v2-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35em 0.65em;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    font-size: 0.8125rem;
    color: var(--seo-v2-muted);
}

.seo-v2-breadcrumb__item {
    display: inline-flex;
    align-items: center;
}

.seo-v2-breadcrumb__item:not(.seo-v2-breadcrumb__item_current)::after {
    content: "/";
    margin-left: 0.65em;
    opacity: 0.45;
    pointer-events: none;
}

.seo-v2-breadcrumb__link {
    color: var(--seo-v2-primary);
    text-decoration: underline;
    text-underline-offset: 0.125em;
}

.seo-v2-breadcrumb__link:hover,
.seo-v2-breadcrumb__link:focus-visible {
    color: var(--seo-v2-accent);
}

.seo-v2-breadcrumb__item_current {
    font-weight: 600;
    color: var(--seo-v2-text);
}

.seo-v2-hero {
    position: relative;
    overflow: hidden;
    padding: 1.75rem 1rem 2rem;
    border-radius: var(--seo-v2-r-lg);
    background: linear-gradient(135deg, rgba(93, 116, 242, 0.14) 0%, rgba(255, 108, 168, 0.12) 100%);
    border: 0.0625em solid var(--seo-v2-border);
    margin-bottom: 1.25rem;
}

@media (prefers-color-scheme: dark) {
    .seo-v2-hero {
        background: linear-gradient(135deg, rgba(93, 116, 242, 0.22) 0%, rgba(255, 108, 168, 0.14) 100%);
    }
}

.seo-v2-hero__deco {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    opacity: 0.65;
    pointer-events: none;
}

.seo-v2-hero .head__heading {
    position: relative;
    background: linear-gradient(90deg, var(--seo-v2-accent), var(--seo-v2-primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (prefers-color-scheme: dark) {
    .seo-v2-hero .head__heading {
        background: linear-gradient(90deg, #ff8ab5, #8fa7ff);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.seo-v2-hero__cta-wrap {
    margin-top: 1rem;
    text-align: center;
}

.seo-v2-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    padding: 0.55em 1.25em;
    border-radius: var(--seo-v2-r-md);
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--seo-v2-primary), #364fc7);
    box-shadow: var(--seo-v2-sh-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-v2-cta:hover {
    transform: translateY(-0.0625rem);
    box-shadow: var(--seo-v2-sh-lg);
    color: #fff;
}

.seo-v2-cta_secondary {
    background: var(--seo-v2-surface);
    color: var(--seo-v2-primary);
    border: 0.0625rem solid var(--seo-v2-border);
}

.seo-v2-cta_secondary:hover {
    color: var(--seo-v2-accent);
}

.seo-v2-section {
    background: var(--seo-v2-surface);
    border-radius: var(--seo-v2-r-lg);
    border: 0.0625rem solid var(--seo-v2-border);
    padding: 1.5rem 1.25rem 1.35rem;
    margin: 0 auto 1.25rem;
    max-width: 81.875em;
    box-shadow: var(--seo-v2-sh-sm);
}

.seo-v2-section__title {
    font-size: 1.35rem;
    margin: 0 0 0.65rem;
    text-align: center;
    color: var(--seo-v2-text);
}

.seo-v2-section__lead {
    text-align: center;
    max-width: 52rem;
    margin: 0 auto 1rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--seo-v2-muted);
}

.seo-v2-features__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.seo-v2-card {
    background: var(--seo-v2-bg);
    border-radius: var(--seo-v2-r-md);
    border: 0.0625rem solid var(--seo-v2-border);
    padding: 1rem 1rem 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.seo-v2-card:hover {
    transform: translateY(-0.125rem);
    box-shadow: var(--seo-v2-sh-md);
}

.seo-v2-card__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    text-align: left;
    color: var(--seo-v2-text);
}

.seo-v2-card__text {
    margin: 0;
    font-size: 0.8125rem;
    text-align: left;
    color: var(--seo-v2-muted);
    line-height: 1.5;
}

.seo-v2-steps__list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 40rem;
}

.seo-v2-steps__step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 0;
    border-bottom: 0.0625rem solid var(--seo-v2-border);
}

.seo-v2-steps__step:last-child {
    border-bottom: 0;
}

.seo-v2-steps__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.875rem;
    color: #fff;
    background: var(--seo-v2-primary);
}

.seo-v2-steps__head {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--seo-v2-text);
}

.seo-v2-steps__text {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--seo-v2-muted);
    line-height: 1.5;
    text-align: left;
}

.seo-v2-games__hint {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--seo-v2-muted);
    margin: 0 auto 1rem;
    max-width: 42rem;
}

.seo-v2-games__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.seo-v2-tag {
    display: inline-block;
    padding: 0.25em 0.65em;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--seo-v2-bg);
    border: 0.0625rem solid var(--seo-v2-border);
    color: var(--seo-v2-muted);
}

.seo-v2-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85em;
    padding: 0.1em 0.35em;
    border-radius: var(--seo-v2-r-sm);
    background: var(--seo-v2-bg);
    border: 0.0625rem solid var(--seo-v2-border);
}

.seo-v2-404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.seo-v2-404-head .seo-v2-cta_secondary {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    .seo-v2-card,
    .seo-v2-cta {
        transition: none;
    }

    .seo-v2-card:hover,
    .seo-v2-cta:hover {
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}

@media screen and (max-width: 691px) and (orientation: portrait) {
    .head__header:not(.seo-v2-hero) > p {
        display: block;
    }
}

.seo-v2-section > h2.seo-v2-section__title {
    position: static;
    left: auto;
    top: auto;
    display: block;
    margin: 0 0 0.65rem;
    font-size: 1.35rem;
    text-align: center;
    background: none;
    color: var(--seo-v2-text);
}

.seo-v2-card > h3.seo-v2-card__title {
    margin-top: 0;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

/* === UI Polish v2 (business surfaces) === */

::selection {
    background: rgba(77, 106, 216, 0.25);
    color: inherit;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(77, 106, 216, 0.55) transparent;
}

*::-webkit-scrollbar {
    width: 0.625rem;
    height: 0.625rem;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: rgba(77, 106, 216, 0.5);
    border-radius: 999px;
    border: 0.125rem solid transparent;
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: rgba(77, 106, 216, 0.75);
}

/* Hero refinements */

.seo-v2-hero {
    padding: 2.25rem 1.25rem 2rem;
}

.seo-v2-hero > .head__heading {
    font-size: 2.4em;
    margin: 0.2em 0 0.3em;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.seo-v2-hero > .head__tagline {
    max-width: 38em;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--seo-v2-muted);
}

@media (prefers-color-scheme: dark) {
    .seo-v2-hero > .head__tagline {
        color: #d4d4d8;
    }
}

@media screen and (max-width: 691px) {
    .seo-v2-hero {
        padding: 1.5rem 1rem 1.5rem;
    }

    .seo-v2-hero > .head__heading {
        font-size: 1.8em;
    }

    .seo-v2-hero__deco {
        width: 6.5rem;
        height: 6.5rem;
        top: 0.5rem;
        right: 0.25rem;
        opacity: 0.5;
    }
}

/* Game picker cards */

.head__game-picker {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(246, 246, 246, 1) 60%);
}

.game-picker__button {
    box-shadow: 0 0.0625rem 0.125rem rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.game-picker__button:hover,
.game-picker__button:focus-visible {
    transform: translateY(-0.1875rem);
    box-shadow: 0 0.5rem 1.25rem rgba(77, 106, 216, 0.18);
    border-color: rgba(77, 106, 216, 0.45);
    background: #fff;
}

.game-picker__game_disabled .game-picker__button:hover {
    transform: none;
    box-shadow: 0 0.0625rem 0.125rem rgba(15, 23, 42, 0.05);
    border-color: #d9d9d9;
}

.game-picker__button:focus-visible {
    outline: 0.125rem solid var(--seo-v2-primary);
    outline-offset: 0.125rem;
}

/* Team buttons */

.team__button {
    background: linear-gradient(135deg, #5d7af2 0%, #4d6ad8 55%, #3f56b8 100%);
    box-shadow: 0 0.25rem 0.75rem rgba(77, 106, 216, 0.28);
    letter-spacing: 0.01em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.team__button:hover,
.team__button:focus-visible {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.5rem 1.25rem rgba(77, 106, 216, 0.38);
    filter: brightness(1.04);
}

.team__button:active {
    transform: translateY(0);
    box-shadow: 0 0.125rem 0.5rem rgba(77, 106, 216, 0.3) inset;
    filter: brightness(0.96);
}

/* Team slots */

.slot {
    transition: filter 0.2s ease;
}

.slot_empty .slot__info {
    border: 0.0625rem dashed rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.55);
}

.slot_populated .slot__info {
    box-shadow: 0 0.1875rem 0.625rem rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.slot_populated:hover .slot__info {
    box-shadow: 0 0.375rem 1rem rgba(15, 23, 42, 0.12);
}

.slot__toggle {
    box-shadow: 0 0.0625rem 0.125rem rgba(15, 23, 42, 0.18);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.slot__toggle:hover,
.slot__toggle:focus-visible {
    transform: translateY(-0.0625rem) scale(1.08);
    box-shadow: 0 0.25rem 0.5rem rgba(15, 23, 42, 0.22);
}

.slot__toggle_tera:hover {
    transform: scale(1.12);
}

.tera-picker {
    border-radius: 0.75em;
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.18);
}

.tera-picker__button {
    transition: transform 0.15s ease, filter 0.15s ease;
    border-radius: 0.5em;
}

.tera-picker__button:focus-visible {
    outline: 0.125rem solid var(--seo-v2-primary);
    outline-offset: 0.125rem;
}

/* Pokedex entries */

.pokedex-entry {
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.pokedex-entry:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 0.875rem rgba(77, 106, 216, 0.22);
}

.pokedex-entry__button:focus-visible {
    outline: 0.125rem solid var(--seo-v2-primary);
    outline-offset: -0.125rem;
    border-radius: 0.5em;
}

/* Filters */

.picker__filter-button,
.filter__close-button {
    background: linear-gradient(135deg, #5d7af2, #4d6ad8);
    box-shadow: 0 0.1875rem 0.625rem rgba(77, 106, 216, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.picker__filter-button:hover,
.picker__filter-button:focus-visible,
.filter__close-button:hover,
.filter__close-button:focus-visible {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.375rem 1rem rgba(77, 106, 216, 0.38);
    filter: brightness(1.04);
}

.picker__filters {
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.28);
}

.filter__button {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    border-radius: 0.25rem;
}

.filter__button:focus-visible {
    outline: 0.125rem solid var(--seo-v2-primary);
    outline-offset: 0.125rem;
}

.filter_active .filter__button {
    color: var(--seo-v2-primary);
    border-color: rgba(77, 106, 216, 0.45);
    background: #eef1fb;
}

.dropdown-menu-item {
    transition: background-color 0.12s ease;
}

.dropdown-menu-item:focus-visible {
    outline: 0.125rem solid var(--seo-v2-primary);
    outline-offset: -0.125rem;
}

/* Type analysis */

.team__type-analysis {
    box-shadow: 0 0.25rem 1.25rem rgba(15, 23, 42, 0.06);
    border-color: #e5e7eb;
}

.type-analysis__heading {
    color: var(--seo-v2-primary);
    letter-spacing: 0.02em;
    font-size: 0.95em;
    text-transform: uppercase;
}

.tally__mark {
    transition: transform 0.15s ease, background-color 0.15s ease, top 0.15s ease;
}

:where(.tally__mark_positive, .tally__mark_negative):hover {
    transform: scaleY(1.08);
}

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

/* FAQ */

.head__faq dt {
    color: var(--seo-v2-primary);
    margin-top: 1.25em;
    font-size: 1.0625em;
}

.head__faq dt:first-of-type {
    margin-top: 0;
}

.head__faq dd {
    margin-left: 0;
    padding-left: 0.85em;
    border-left: 0.1875rem solid rgba(77, 106, 216, 0.2);
}

/* Sticky header */

.head_sticky {
    backdrop-filter: saturate(1.2) blur(0.5rem);
    background: rgba(246, 246, 246, 0.85);
    box-shadow: 0 0.25rem 1rem rgba(15, 23, 42, 0.08);
}

/* Touch / reduced motion safety */

@media (hover: none) {
    .game-picker__button:hover,
    .pokedex-entry:hover,
    .team__button:hover,
    .slot__toggle:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slot_populated.slot_hover {
        animation: none;
    }

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

    .game-picker__button,
    .team__button,
    .slot__toggle,
    .pokedex-entry,
    .tally__mark,
    .picker__filter-button,
    .filter__close-button,
    .filter__button {
        transition: none;
    }

    .game-picker__button:hover,
    .team__button:hover,
    .slot__toggle:hover,
    .pokedex-entry:hover {
        transform: none;
    }
}

/* ============================================================
   THEME v3 — Full visual overhaul (scoped to body.theme-v3)
   All JS-referenced classes are preserved; only the look changes.
   ============================================================ */

.theme-v3 {
    --v3-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
        'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --v3-font-display: 'Inter', 'Segoe UI', system-ui, sans-serif;

    --v3-bg: #f5f7ff;
    --v3-bg-alt: #eef0fa;
    --v3-surface: #ffffff;
    --v3-surface-soft: rgba(255, 255, 255, 0.78);
    --v3-surface-strong: rgba(255, 255, 255, 0.92);

    --v3-text: #0f172a;
    --v3-text-soft: #334155;
    --v3-muted: #64748b;
    --v3-border: rgba(15, 23, 42, 0.08);
    --v3-border-strong: rgba(15, 23, 42, 0.16);

    --v3-primary: #5b73f5;
    --v3-primary-dark: #3b4ed4;
    --v3-primary-soft: rgba(91, 115, 245, 0.12);
    --v3-accent: #ec4899;
    --v3-accent-soft: rgba(236, 72, 153, 0.12);
    --v3-success: #10b981;
    --v3-warn: #f59e0b;
    --v3-danger: #ef4444;

    --v3-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05),
        0 1px 3px rgba(15, 23, 42, 0.06);
    --v3-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08),
        0 2px 4px rgba(15, 23, 42, 0.04);
    --v3-shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12),
        0 4px 10px rgba(15, 23, 42, 0.06);
    --v3-shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.18),
        0 8px 16px rgba(15, 23, 42, 0.08);
    --v3-shadow-glow: 0 0 0 1px rgba(91, 115, 245, 0.18),
        0 8px 20px rgba(91, 115, 245, 0.22);

    --v3-radius-sm: 0.5rem;
    --v3-radius-md: 0.875rem;
    --v3-radius-lg: 1.25rem;
    --v3-radius-xl: 1.75rem;

    --v3-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --v3-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    background-color: var(--v3-bg);
    color: var(--v3-text);
    font-family: var(--v3-font);
    font-feature-settings: 'cv11', 'ss01';
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

@media (prefers-color-scheme: dark) {
    .theme-v3 {
        --v3-bg: #0b0d17;
        --v3-bg-alt: #11131f;
        --v3-surface: #181a26;
        --v3-surface-soft: rgba(24, 26, 38, 0.78);
        --v3-surface-strong: rgba(24, 26, 38, 0.92);
        --v3-text: #f1f5f9;
        --v3-text-soft: #cbd5e1;
        --v3-muted: #94a3b8;
        --v3-border: rgba(255, 255, 255, 0.08);
        --v3-border-strong: rgba(255, 255, 255, 0.16);
        --v3-primary: #818cf8;
        --v3-primary-dark: #6366f1;
        --v3-primary-soft: rgba(129, 140, 248, 0.16);
        --v3-accent: #f472b6;
        --v3-accent-soft: rgba(244, 114, 182, 0.16);
        --v3-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --v3-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
        --v3-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.45);
        --v3-shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.55);
        --v3-shadow-glow: 0 0 0 1px rgba(129, 140, 248, 0.28),
            0 8px 24px rgba(129, 140, 248, 0.3);
    }
}

.theme-v3__bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 40% at 15% 8%,
            rgba(129, 140, 248, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 85% 12%,
            rgba(244, 114, 182, 0.22) 0%, transparent 60%),
        radial-gradient(ellipse 70% 50% at 50% 95%,
            rgba(96, 165, 250, 0.2) 0%, transparent 60%);
}

@media (prefers-color-scheme: dark) {
    .theme-v3__bg {
        background:
            radial-gradient(ellipse 60% 40% at 15% 8%,
                rgba(129, 140, 248, 0.25) 0%, transparent 60%),
            radial-gradient(ellipse 50% 35% at 85% 12%,
                rgba(244, 114, 182, 0.18) 0%, transparent 60%),
            radial-gradient(ellipse 70% 50% at 50% 95%,
                rgba(96, 165, 250, 0.18) 0%, transparent 60%);
    }
}

/* Base resets in v3 scope */

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

.theme-v3 a {
    color: var(--v3-primary);
    text-decoration-color: rgba(91, 115, 245, 0.4);
    text-underline-offset: 0.18em;
    transition: color 0.18s var(--v3-ease);
}

.theme-v3 a:hover {
    color: var(--v3-accent);
}

.theme-v3 ::selection {
    background: rgba(91, 115, 245, 0.28);
    color: inherit;
}

.theme-v3 *::-webkit-scrollbar {
    width: 0.625rem;
    height: 0.625rem;
}

.theme-v3 *::-webkit-scrollbar-thumb {
    background-color: rgba(91, 115, 245, 0.45);
    border-radius: 999px;
    border: 0.125rem solid transparent;
    background-clip: padding-box;
}

.theme-v3 *::-webkit-scrollbar-thumb:hover {
    background-color: rgba(91, 115, 245, 0.7);
}

/* Article + section container reskin */

.theme-v3 article.team-planner {
    background: transparent;
    max-width: 86em;
    padding: 1.5rem 1.5rem 3rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.theme-v3 article section {
    background: var(--v3-surface-strong);
    backdrop-filter: saturate(1.4) blur(0.875rem);
    -webkit-backdrop-filter: saturate(1.4) blur(0.875rem);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-lg);
    padding: 1.75rem 1.5rem 1.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--v3-shadow-md);
    position: relative;
    overflow: hidden;
    animation: v3-fade-in 0.6s var(--v3-ease) both;
}

.theme-v3 article section::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 0.1875rem;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--v3-primary) 25%,
        var(--v3-accent) 60%,
        transparent 100%);
    opacity: 0.5;
    border-radius: var(--v3-radius-lg) var(--v3-radius-lg) 0 0;
}

.theme-v3 article section > h2 {
    position: static;
    left: auto;
    top: auto;
    display: block;
    width: auto;
    text-align: center;
    background: none;
    color: var(--v3-text);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

.theme-v3 article section > h2 abbr {
    border: 0;
    text-decoration: none;
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.theme-v3 h3 {
    color: var(--v3-text);
    font-weight: 700;
}

.theme-v3 p {
    color: var(--v3-text-soft);
}

@keyframes v3-fade-in {
    0% { opacity: 0; transform: translateY(0.5rem); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes v3-pop {
    0% { opacity: 0; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1); }
}

/* Hero (override the v2 hero with the new system) */

.theme-v3 .seo-v2-hero {
    background:
        linear-gradient(135deg,
            rgba(91, 115, 245, 0.12) 0%,
            rgba(236, 72, 153, 0.1) 100%),
        var(--v3-surface-strong);
    border: 1px solid var(--v3-border);
    padding: 3rem 1.5rem 2.5rem;
    border-radius: var(--v3-radius-xl);
    overflow: hidden;
}

.theme-v3 .seo-v2-hero::after {
    content: '';
    position: absolute;
    width: 28rem;
    height: 28rem;
    right: -8rem;
    top: -10rem;
    border-radius: 999px;
    background: radial-gradient(circle,
        rgba(236, 72, 153, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.theme-v3 .seo-v2-hero__deco {
    width: 9rem;
    height: 9rem;
    top: 1.5rem;
    right: 1.5rem;
    opacity: 0.55;
    filter: drop-shadow(0 8px 20px rgba(91, 115, 245, 0.3));
    animation: v3-float 6s ease-in-out infinite;
}

@keyframes v3-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-0.5rem) rotate(8deg); }
}

.theme-v3 .seo-v2-hero .head__heading {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin: 0.5em 0 0.4em;
    background: linear-gradient(135deg, #1e293b 0%, var(--v3-primary) 50%, var(--v3-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (prefers-color-scheme: dark) {
    .theme-v3 .seo-v2-hero .head__heading {
        background: linear-gradient(135deg, #f1f5f9 0%, var(--v3-primary) 55%, var(--v3-accent) 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.theme-v3 .seo-v2-hero .head__game-name {
    display: inline-block;
}

.theme-v3 .seo-v2-hero .head__tagline,
.theme-v3 .seo-v2-hero > p {
    font-size: 1.0625rem;
    color: var(--v3-text-soft);
    max-width: 40em;
    margin: 0 auto 1.25em;
}

.theme-v3 .seo-v2-cta {
    padding: 0.7em 1.5em;
    font-size: 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-primary-dark));
    box-shadow: var(--v3-shadow-glow);
}

.theme-v3 .seo-v2-cta:hover {
    box-shadow: 0 0 0 1px rgba(91, 115, 245, 0.3), 0 12px 28px rgba(91, 115, 245, 0.35);
}

/* Hero primary CTA uses the brand gradient for extra emphasis */

.theme-v3 .seo-v2-hero .seo-v2-cta:not(.seo-v2-cta_secondary) {
    background: linear-gradient(135deg, var(--v3-accent) 0%, var(--v3-primary) 100%);
    box-shadow:
        0 8px 22px rgba(236, 72, 153, 0.32),
        inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    color: #fff;
}

.theme-v3 .seo-v2-hero .seo-v2-cta:not(.seo-v2-cta_secondary):hover {
    box-shadow:
        0 14px 32px rgba(236, 72, 153, 0.42),
        inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    filter: brightness(1.06);
}

/* Breadcrumb */

.theme-v3 .seo-v2-breadcrumb__link {
    color: var(--v3-primary);
}

.theme-v3 .seo-v2-breadcrumb__item_current {
    color: var(--v3-text);
}

/* SEO v2 cards/sections inherit v3 surface */

.theme-v3 .seo-v2-section {
    background: var(--v3-surface-strong);
    border: 1px solid var(--v3-border);
    box-shadow: var(--v3-shadow-md);
    border-radius: var(--v3-radius-lg);
}

.theme-v3 .seo-v2-section__title,
.theme-v3 .seo-v2-section > h2.seo-v2-section__title {
    color: var(--v3-text);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.theme-v3 .seo-v2-section__lead {
    color: var(--v3-text-soft);
    font-size: 0.9375rem;
}

.theme-v3 .seo-v2-card {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-md);
    padding: 1.25rem;
    box-shadow: var(--v3-shadow-sm);
    transition: transform 0.25s var(--v3-ease),
        box-shadow 0.25s var(--v3-ease),
        border-color 0.25s var(--v3-ease);
}

.theme-v3 .seo-v2-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--v3-shadow-lg);
    border-color: rgba(91, 115, 245, 0.32);
}

.theme-v3 .seo-v2-card__title {
    color: var(--v3-text);
    font-size: 1.0625rem;
}

.theme-v3 .seo-v2-card__text {
    color: var(--v3-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

.theme-v3 .seo-v2-steps__step {
    border-color: var(--v3-border);
}

.theme-v3 .seo-v2-steps__badge {
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-accent));
    box-shadow: 0 4px 10px rgba(91, 115, 245, 0.28);
}

.theme-v3 .seo-v2-steps__head {
    color: var(--v3-text);
    font-size: 1rem;
}

.theme-v3 .seo-v2-steps__text {
    color: var(--v3-muted);
}

.theme-v3 .seo-v2-tag {
    background: var(--v3-primary-soft);
    border: 1px solid rgba(91, 115, 245, 0.22);
    color: var(--v3-primary);
}

.theme-v3 .seo-v2-code {
    background: var(--v3-primary-soft);
    border: 1px solid rgba(91, 115, 245, 0.18);
    color: var(--v3-primary-dark);
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .theme-v3 .seo-v2-code {
        color: var(--v3-primary);
    }
}

/* FAQ list */

.theme-v3 .head__faq dl {
    margin: 1rem 0 0;
}

.theme-v3 .head__faq dt {
    color: var(--v3-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-top: 1.25em;
    padding-left: 0.5em;
    border-left: 0;
    position: relative;
}

.theme-v3 .head__faq dt::before {
    content: '';
    position: absolute;
    left: -0.25em;
    top: 0.4em;
    width: 0.375em;
    height: 0.375em;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-accent));
}

.theme-v3 .head__faq dt:first-of-type {
    margin-top: 0.5em;
}

.theme-v3 .head__faq dd {
    margin-left: 0;
    padding: 0.35em 0.5em 0.5em 1em;
    border-left: 2px solid rgba(91, 115, 245, 0.18);
    color: var(--v3-text-soft);
}

.theme-v3 .head__faq dd p {
    color: var(--v3-text-soft);
    text-align: left;
    font-size: 0.9375rem;
}

/* Game picker */

.theme-v3 .head__game-picker {
    background: transparent;
    padding: 2rem 1rem;
}

.theme-v3 .head__game-picker > p {
    color: var(--v3-text-soft);
    font-size: 1rem;
    max-width: 36em;
    margin: 0 auto 0.5em;
}

.theme-v3 .game-picker {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1.25rem;
    max-width: 76em;
    margin: 1.5em auto 0;
    padding: 0;
}

.theme-v3 .game-picker__game {
    list-style: none;
    position: relative;
}

.theme-v3 .game-picker__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 8rem;
    padding: 1.5rem 1rem;
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-md);
    box-shadow: var(--v3-shadow-sm);
    transition: transform 0.25s var(--v3-ease),
        box-shadow 0.25s var(--v3-ease),
        border-color 0.25s var(--v3-ease);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.theme-v3 .game-picker__button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(91, 115, 245, 0.08),
        rgba(236, 72, 153, 0.06));
    opacity: 0;
    transition: opacity 0.25s var(--v3-ease);
    pointer-events: none;
}

.theme-v3 .game-picker__button:hover {
    transform: translateY(-0.375rem) scale(1.015);
    box-shadow: var(--v3-shadow-lg);
    border-color: rgba(91, 115, 245, 0.4);
}

.theme-v3 .game-picker__button:hover::after {
    opacity: 1;
}

.theme-v3 .game-picker__game-logo {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.12));
}

.theme-v3 .game-picker__game_disabled .game-picker__button {
    background: var(--v3-bg-alt);
    cursor: not-allowed;
}

.theme-v3 .game-picker__game_disabled .game-picker__button:hover {
    transform: none;
    box-shadow: var(--v3-shadow-sm);
    border-color: var(--v3-border);
}

.theme-v3 .game-picker__game_disabled::after {
    content: 'Coming soon';
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    padding: 0.2em 0.55em;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    z-index: 2;
    pointer-events: none;
}

/* Head when a game is picked */

.theme-v3 .head__game-button {
    padding: 1rem 0 0.5rem;
    gap: 1rem;
}

.theme-v3 .head__heading {
    font-size: 2.4rem;
    margin: 0 0 0.5em;
    color: var(--v3-text);
}

.theme-v3 .head__heading a {
    color: inherit;
    text-decoration: none;
}

/* Team region */

.theme-v3 .head__team {
    padding: 1rem 0 0;
}

.theme-v3 .head__team::before {
    background: transparent;
}

.theme-v3 .team {
    background: var(--v3-surface-strong);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-xl);
    padding: 2rem 1.5rem;
    box-shadow: var(--v3-shadow-md);
    gap: 1.5rem;
    position: relative;
}

.theme-v3 .team::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--v3-primary), var(--v3-accent));
    border-radius: var(--v3-radius-xl) var(--v3-radius-xl) 0 0;
}

.theme-v3 .team__heading {
    color: var(--v3-text);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
    text-align: center;
}

.theme-v3 .team__slots {
    gap: 1.25rem 0.75rem;
}

.theme-v3 .slot {
    background: linear-gradient(180deg,
        var(--v3-surface) 0%,
        var(--v3-bg-alt) 100%);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-lg);
    padding: 1rem 0.5rem 0.75rem;
    width: 11.5em;
    gap: 0.65em;
    box-shadow: var(--v3-shadow-sm);
    transition: transform 0.25s var(--v3-ease),
        box-shadow 0.25s var(--v3-ease),
        border-color 0.25s var(--v3-ease);
    animation: v3-pop 0.4s var(--v3-ease) both;
}

.theme-v3 .slot_populated {
    border-color: rgba(91, 115, 245, 0.22);
    box-shadow: var(--v3-shadow-md);
}

.theme-v3 .slot_populated:hover {
    transform: translateY(-0.25rem);
    box-shadow: var(--v3-shadow-lg);
    border-color: rgba(91, 115, 245, 0.4);
}

.theme-v3 .slot__info {
    width: 9.5em;
    height: auto;
    min-height: 4.25em;
    padding: 0.4em 0.5em;
    border-radius: var(--v3-radius-md);
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    box-shadow: none;
}

.theme-v3 .slot_empty .slot__info {
    background: rgba(91, 115, 245, 0.06);
    border: 1.5px dashed rgba(91, 115, 245, 0.32);
}

.theme-v3 .slot__name {
    font-size: 0.9375em;
    color: var(--v3-text);
    font-weight: 700;
}

.theme-v3 .slot__form {
    font-size: 0.7em;
    color: var(--v3-muted);
    font-weight: 500;
}

.theme-v3 .slot__type-container {
    gap: 0.25em;
}

.theme-v3 .slot__type {
    width: 3.5em;
    height: 0.875em;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 999px;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.12));
}

.theme-v3 .slot__toggle-container {
    gap: 0.45em;
    margin: 0.25em 0 0;
}

.theme-v3 .slot__toggle {
    width: 1.625em;
    height: 1.625em;
    line-height: 1.625em;
    border-radius: 999px;
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    filter: none;
    box-shadow: var(--v3-shadow-sm);
    color: var(--v3-muted);
    transition: transform 0.18s var(--v3-ease-bounce),
        box-shadow 0.18s var(--v3-ease),
        background 0.18s var(--v3-ease);
}

.theme-v3 .slot__toggle:hover,
.theme-v3 .slot__toggle:focus-visible {
    transform: scale(1.15) translateY(-1px);
    box-shadow: var(--v3-shadow-md);
}

.theme-v3 .slot__toggle_shiny {
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
    color: #fff;
    border-color: rgba(245, 158, 11, 0.45);
}

.theme-v3 .slot__toggle_female {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: #fff;
    border-color: rgba(236, 72, 153, 0.45);
}

.theme-v3 .slot__toggle_male {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: #fff;
    border-color: rgba(59, 130, 246, 0.45);
}

.theme-v3 .slot__toggle_tera {
    width: 2em;
    height: 2em;
    background-color: transparent;
    border: 0;
    box-shadow: none;
}

.theme-v3 .slot__toggle_tera_none {
    background-color: rgba(91, 115, 245, 0.55);
}

.theme-v3 .slot__toggle_tera_none:hover {
    background-color: var(--v3-primary);
}

/* Tera picker */

.theme-v3 .tera-picker {
    background: var(--v3-surface-strong);
    backdrop-filter: blur(0.875rem);
    -webkit-backdrop-filter: blur(0.875rem);
    border: 1px solid var(--v3-border-strong);
    border-radius: var(--v3-radius-lg);
    box-shadow: var(--v3-shadow-xl);
    padding: 1.25em;
    gap: 0.75em;
    filter: none;
    animation: v3-pop 0.18s var(--v3-ease-bounce) both;
}

.theme-v3 .tera-picker__button {
    border-radius: 999px;
    transition: transform 0.18s var(--v3-ease-bounce);
}

.theme-v3 .tera-picker__button:hover {
    transform: scale(1.2);
}

/* Team buttons (Randomize/Show Analysis/Hide Toggles) */

.theme-v3 .team__buttons {
    gap: 0.75rem;
    margin-top: 1rem;
}

.theme-v3 .team__button {
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-primary-dark));
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.55em 1.4em;
    font-size: 0.9375rem;
    border-radius: 999px;
    flex-basis: auto;
    min-width: 11em;
    box-shadow: var(--v3-shadow-md);
    transition: transform 0.2s var(--v3-ease),
        box-shadow 0.2s var(--v3-ease),
        filter 0.2s var(--v3-ease);
}

.theme-v3 .team__button:hover,
.theme-v3 .team__button:focus-visible {
    transform: translateY(-0.125rem);
    box-shadow: var(--v3-shadow-lg);
    filter: brightness(1.06);
    color: #fff;
}

.theme-v3 .team__button:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* Type analysis */

.theme-v3 .team__type-analysis {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-lg);
    box-shadow: var(--v3-shadow-md);
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.theme-v3 .type-analysis__heading {
    color: var(--v3-primary);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
}

.theme-v3 .type-analysis__grid {
    gap: 0.875rem;
    grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
    padding: 0;
}

.theme-v3 .tally {
    background: var(--v3-bg-alt);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-md);
    padding: 0.5em 0.4em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35em;
}

.theme-v3 .tally__type-symbol {
    background-color: var(--v3-surface);
    border-radius: 999px;
    width: 2.25em;
    height: 2.25em;
    box-shadow: var(--v3-shadow-sm);
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
}

.theme-v3 .tally_warning .tally__type-symbol {
    box-shadow: 0 0 0 2px var(--v3-danger),
        0 0 12px rgba(239, 68, 68, 0.5);
    background-color: rgba(239, 68, 68, 0.06);
}

.theme-v3 .tally__marks {
    display: flex;
    gap: 0.1875em;
}

.theme-v3 .tally__mark {
    width: 0.3125em;
    height: 1.5em;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.08);
    margin: 0;
    transition: background-color 0.18s var(--v3-ease),
        transform 0.18s var(--v3-ease);
}

@media (prefers-color-scheme: dark) {
    .theme-v3 .tally__mark {
        background-color: rgba(255, 255, 255, 0.08);
    }
}

.theme-v3 .tally__mark_positive {
    background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.theme-v3 .tally__mark_negative {
    background: linear-gradient(180deg, #f87171, #dc2626);
}

.theme-v3 :where(.tally__mark_positive, .tally__mark_negative):hover {
    transform: scaleY(1.12);
    top: 0;
}

.theme-v3 .type-analysis__note {
    color: var(--v3-muted);
    font-size: 0.8125rem;
    text-align: center;
}

/* Filters */

.theme-v3 .picker__heading {
    text-align: center;
    color: var(--v3-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
}

.theme-v3 .picker__filter-button {
    position: static;
    width: auto;
    padding: 0.4em 1.2em;
    line-height: 1.5;
    margin: 0.5rem auto 1rem;
    display: block;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-primary-dark));
    box-shadow: var(--v3-shadow-md);
    color: #fff;
    transition: transform 0.18s var(--v3-ease),
        box-shadow 0.18s var(--v3-ease);
}

.theme-v3 .picker__filter-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--v3-shadow-lg);
}

.theme-v3 .picker__overlay {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
    animation: v3-fade-in 0.18s var(--v3-ease);
}

.theme-v3 .picker__filters {
    background: var(--v3-surface-strong);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    border: 1px solid var(--v3-border-strong);
    border-radius: var(--v3-radius-xl);
    box-shadow: var(--v3-shadow-xl);
    padding: 1.5rem 0;
    animation: v3-pop 0.22s var(--v3-ease-bounce) both;
}

.theme-v3 .filter__heading {
    color: var(--v3-primary);
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.75rem;
}

.theme-v3 .filter__scrollbox {
    border-color: var(--v3-border);
    padding: 1rem 0.5rem;
}

.theme-v3 .filter__name {
    color: var(--v3-text);
}

.theme-v3 .filter__button,
.theme-v3 .filter__search-bar {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border-strong);
    color: var(--v3-text);
    border-radius: var(--v3-radius-sm);
    transition: border-color 0.18s var(--v3-ease),
        background-color 0.18s var(--v3-ease);
}

.theme-v3 .filter__button:hover {
    background: var(--v3-primary-soft);
    border-color: rgba(91, 115, 245, 0.4);
    color: var(--v3-primary);
}

.theme-v3 .filter_active .filter__button {
    background: var(--v3-primary-soft);
    color: var(--v3-primary);
    border-color: rgba(91, 115, 245, 0.45);
}

.theme-v3 .filter__close-button {
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-primary-dark));
    border-radius: 999px;
    line-height: 2.25em;
    box-shadow: var(--v3-shadow-md);
}

.theme-v3 .filter__dropdown-menu {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    color: var(--v3-text);
    border-radius: var(--v3-radius-sm);
}

.theme-v3 .dropdown-menu-item {
    color: var(--v3-text-soft);
}

.theme-v3 .dropdown-menu-item:hover {
    background: var(--v3-primary-soft);
    color: var(--v3-primary);
}

.theme-v3 .dropdown-menu-item_active,
.theme-v3 .dropdown-menu-item_active:hover {
    background: var(--v3-primary-soft);
    color: var(--v3-primary);
    font-weight: 600;
}

/* Pokédex */

.theme-v3 .picker__pokedex-name {
    color: var(--v3-text);
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.5rem;
    letter-spacing: -0.005em;
}

.theme-v3 .picker__pokedex {
    grid-template-columns: repeat(auto-fill, 5.25em);
    gap: 0.5rem;
}

.theme-v3 .pokedex-entry {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-md);
    box-shadow: var(--v3-shadow-sm);
    transition: transform 0.2s var(--v3-ease),
        box-shadow 0.2s var(--v3-ease),
        border-color 0.2s var(--v3-ease),
        background-color 0.2s var(--v3-ease);
}

.theme-v3 .pokedex-entry:hover {
    background: var(--v3-surface);
    border-color: rgba(91, 115, 245, 0.45);
    box-shadow: var(--v3-shadow-md);
    transform: translateY(-0.1875rem);
}

.theme-v3 .pokedex-entry__thumb {
    filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.18));
}

/* Sticky head */

.theme-v3 .head_sticky {
    background: var(--v3-surface-strong);
    backdrop-filter: blur(0.875rem) saturate(1.3);
    -webkit-backdrop-filter: blur(0.875rem) saturate(1.3);
    border-bottom: 1px solid var(--v3-border);
    box-shadow: var(--v3-shadow-md);
}

/* Footer */

.theme-v3 .tail {
    margin-top: 2rem;
}

.theme-v3 .tail__footer {
    background: transparent;
    text-align: center;
    color: var(--v3-muted);
    font-size: 0.8125rem;
    padding: 1rem 0;
    border-top: 1px solid var(--v3-border);
}

.theme-v3 .footer__tagline {
    color: var(--v3-muted);
    font-style: normal;
    font-weight: 500;
}

/* 404 page tweaks */

.theme-v3 .seo-v2-404-head {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.theme-v3 .seo-v2-404-head h1 {
    font-size: 2.4rem;
}

.theme-v3 .seo-v2-404-actions {
    margin-top: 1.5rem;
}

.theme-v3 .seo-v2-cta_secondary {
    background: var(--v3-surface);
    color: var(--v3-primary);
    border: 1px solid rgba(91, 115, 245, 0.32);
    box-shadow: var(--v3-shadow-sm);
}

.theme-v3 .seo-v2-cta_secondary:hover {
    background: var(--v3-primary-soft);
}

/* Responsive */

@media screen and (max-width: 720px) {
    .theme-v3 article.team-planner {
        padding: 1rem 0.875rem 2.5rem;
    }

    .theme-v3 article section,
    .theme-v3 .seo-v2-section {
        padding: 1.25rem 1rem;
        border-radius: var(--v3-radius-md);
    }

    .theme-v3 .seo-v2-hero {
        padding: 2rem 1rem 1.75rem;
    }

    .theme-v3 .seo-v2-hero .head__heading {
        font-size: 2rem;
    }

    .theme-v3 .team {
        padding: 1.5rem 0.875rem;
        border-radius: var(--v3-radius-lg);
    }

    .theme-v3 .slot {
        width: 100%;
        max-width: 14em;
    }
}

/* Differentiate the Randomize CTA among team buttons */

.theme-v3 .team__buttons > .team__button:first-child {
    background: linear-gradient(135deg, var(--v3-accent) 0%, #be185d 100%);
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.32);
}

.theme-v3 .team__buttons > .team__button:first-child:hover {
    box-shadow: 0 10px 26px rgba(236, 72, 153, 0.42);
}

.theme-v3 .team__buttons > .team__button:not(:first-child) {
    background: var(--v3-surface);
    color: var(--v3-primary);
    border: 1px solid rgba(91, 115, 245, 0.32);
    box-shadow: var(--v3-shadow-sm);
}

.theme-v3 .team__buttons > .team__button:not(:first-child):hover {
    background: var(--v3-primary-soft);
    color: var(--v3-primary);
    box-shadow: var(--v3-shadow-md);
}

/* Search bar focus state + subtle search affordance */

.theme-v3 .filter__search-bar {
    padding-left: 2.25rem;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-position: 0.625rem center;
    background-size: 1rem;
}

.theme-v3 .filter__search-bar:focus,
.theme-v3 .filter__search-bar:focus-visible {
    outline: none;
    border-color: var(--v3-primary);
    box-shadow: 0 0 0 3px var(--v3-primary-soft);
}

/* Pokémon render gets a soft halo on hover */

.theme-v3 .slot_populated .slot__pokemon-render {
    transition: filter 0.25s var(--v3-ease), transform 0.25s var(--v3-ease);
}

.theme-v3 .slot_populated:hover .slot__pokemon-render {
    filter: drop-shadow(0 0 0.5px #1b1b1b) drop-shadow(0 6px 14px rgba(91, 115, 245, 0.35));
    transform: scale(1.04);
}

/* Sticky compact bar refinement */

.theme-v3 .head_sticky .team {
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.5rem 1rem;
}

.theme-v3 .head_sticky .team::before {
    display: none;
}

.theme-v3 .head_sticky .slot {
    background: transparent;
    border: 0;
    box-shadow: none;
    animation: none;
    padding: 0;
}

/* === v3 marketing primitives: eyebrow / trust / stats / game chips === */

.theme-v3 .v3-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55em;
    margin: 0 auto 0.5em;
    padding: 0.35em 0.9em;
    background: var(--v3-primary-soft);
    border: 1px solid rgba(91, 115, 245, 0.22);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--v3-primary-dark);
    text-transform: none;
}

@media (prefers-color-scheme: dark) {
    .theme-v3 .v3-eyebrow {
        color: var(--v3-primary);
    }
}

.theme-v3 .v3-eyebrow__dot {
    width: 0.5em;
    height: 0.5em;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-accent));
    box-shadow: 0 0 8px rgba(91, 115, 245, 0.6);
    animation: v3-pulse 2.4s ease-in-out infinite;
}

@keyframes v3-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.65; }
}

.theme-v3 .v3-section-eyebrow {
    display: block;
    text-align: center;
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--v3-primary);
}

.theme-v3 .v3-trust {
    list-style: none;
    padding: 0;
    margin: 0.75rem auto 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 42rem;
}

.theme-v3 .v3-trust__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.32em 0.8em;
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--v3-text-soft);
    box-shadow: var(--v3-shadow-sm);
}

.theme-v3 .v3-trust__chip::before {
    content: '';
    width: 0.45em;
    height: 0.45em;
    border-radius: 999px;
    background: var(--v3-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.theme-v3 .seo-v2-hero__cta-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.theme-v3 .v3-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.75rem;
    max-width: 44rem;
    margin: 2rem auto 0;
    padding: 1rem;
    background: var(--v3-surface-soft);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-md);
    backdrop-filter: blur(0.5rem);
    -webkit-backdrop-filter: blur(0.5rem);
}

.theme-v3 .v3-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15em;
    text-align: center;
    margin: 0;
}

.theme-v3 .v3-stat__label {
    order: 2;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--v3-muted);
    font-weight: 600;
    margin: 0;
}

.theme-v3 .v3-stat__value {
    order: 1;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    margin: 0;
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.01em;
}

/* Feature card icon tiles */

.theme-v3 .v3-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--v3-radius-sm);
    background: linear-gradient(135deg,
        rgba(91, 115, 245, 0.16),
        rgba(236, 72, 153, 0.16));
    font-size: 1.25rem;
    margin-bottom: 0.65rem;
    box-shadow: inset 0 0 0 1px rgba(91, 115, 245, 0.16);
}

/* Game chip list */

.theme-v3 .v3-games-chips {
    list-style: none;
    margin: 1.25rem auto 0.75rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 76em;
    justify-content: center;
}

.theme-v3 .v3-game-chip {
    margin: 0;
}

.theme-v3 .v3-game-chip > a {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.45em 0.95em;
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: 999px;
    color: var(--v3-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--v3-shadow-sm);
    transition: transform 0.18s var(--v3-ease),
        box-shadow 0.18s var(--v3-ease),
        border-color 0.18s var(--v3-ease),
        background 0.18s var(--v3-ease);
}

.theme-v3 .v3-game-chip > a:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 115, 245, 0.45);
    box-shadow: var(--v3-shadow-md);
    background: var(--v3-primary-soft);
    color: var(--v3-primary-dark);
}

@media (prefers-color-scheme: dark) {
    .theme-v3 .v3-game-chip > a:hover {
        color: var(--v3-primary);
    }
}

.theme-v3 .v3-game-chip code {
    color: var(--v3-muted);
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0.75em;
    font-weight: 500;
}

/* 404 page emphasis */

.theme-v3 .v3-404-code {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    margin: 0.25em 0 0.5em;
    background: linear-gradient(135deg, var(--v3-primary), var(--v3-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.03em;
}

/* Differentiate the Randomize CTA among team buttons */

.theme-v3 .team__buttons > .team__button:first-child {
    background: linear-gradient(135deg, var(--v3-accent) 0%, #be185d 100%);
    box-shadow: 0 6px 18px rgba(236, 72, 153, 0.32);
}

.theme-v3 .team__buttons > .team__button:first-child:hover {
    box-shadow: 0 10px 26px rgba(236, 72, 153, 0.42);
}

.theme-v3 .team__buttons > .team__button:not(:first-child) {
    background: var(--v3-surface);
    color: var(--v3-primary);
    border: 1px solid rgba(91, 115, 245, 0.32);
    box-shadow: var(--v3-shadow-sm);
}

.theme-v3 .team__buttons > .team__button:not(:first-child):hover {
    background: var(--v3-primary-soft);
    color: var(--v3-primary);
    box-shadow: var(--v3-shadow-md);
}

/* Search bar focus state + subtle search affordance */

.theme-v3 .filter__search-bar {
    padding-left: 2.25rem;
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-position: 0.625rem center;
    background-size: 1rem;
}

.theme-v3 .filter__search-bar:focus,
.theme-v3 .filter__search-bar:focus-visible {
    outline: none;
    border-color: var(--v3-primary);
    box-shadow: 0 0 0 3px var(--v3-primary-soft);
}

/* Pokémon render gets a soft halo on hover */

.theme-v3 .slot_populated .slot__pokemon-render {
    transition: filter 0.25s var(--v3-ease), transform 0.25s var(--v3-ease);
}

.theme-v3 .slot_populated:hover .slot__pokemon-render {
    filter: drop-shadow(0 0 0.5px #1b1b1b) drop-shadow(0 6px 14px rgba(91, 115, 245, 0.35));
    transform: scale(1.04);
}

/* Sticky compact bar refinement */

.theme-v3 .head_sticky .team {
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.5rem 1rem;
}

.theme-v3 .head_sticky .team::before {
    display: none;
}

.theme-v3 .head_sticky .slot {
    background: transparent;
    border: 0;
    box-shadow: none;
    animation: none;
    padding: 0;
}

/* Center the hero block tighter */

.theme-v3 .seo-v2-hero {
    text-align: center;
}

.theme-v3 .seo-v2-hero > .v3-eyebrow,
.theme-v3 .seo-v2-hero > .head__heading,
.theme-v3 .seo-v2-hero > .head__tagline,
.theme-v3 .seo-v2-hero > .v3-trust,
.theme-v3 .seo-v2-hero > .seo-v2-hero__cta-wrap,
.theme-v3 .seo-v2-hero > .v3-stat-strip {
    position: relative;
    z-index: 1;
}

/* Tighten how section headings stack */

.theme-v3 article section .v3-section-eyebrow + h2,
.theme-v3 article section .v3-section-eyebrow + .seo-v2-section__title {
    margin-top: 0;
}

/* Responsive tweaks */

@media screen and (max-width: 720px) {
    .theme-v3 .v3-stat__value {
        font-size: 1.25rem;
    }

    .theme-v3 .v3-stat-strip {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 1.5rem;
    }

    .theme-v3 .v3-trust {
        gap: 0.35rem;
    }

    .theme-v3 .v3-404-code {
        font-size: 3.5rem;
    }
}

/* ============================================================
   v3 round-4: skip link, decorations, staggered entry,
   quick tips, footer, print
   ============================================================ */

/* Skip-to-content (accessible focus only) */

.theme-v3 .v3-skip-link {
    position: absolute;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(-200%);
    padding: 0.55em 1.1em;
    background: var(--v3-primary);
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    z-index: 9999;
    text-decoration: none;
    box-shadow: var(--v3-shadow-md);
    transition: transform 0.2s var(--v3-ease);
}

.theme-v3 .v3-skip-link:focus,
.theme-v3 .v3-skip-link:focus-visible {
    transform: translateX(-50%) translateY(0);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Decorative floating poké-marks (purely cosmetic) */

.theme-v3 .v3-decoration {
    position: fixed;
    z-index: -1;
    pointer-events: none;
    filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.06));
    opacity: 0.4;
    animation: v3-drift 14s ease-in-out infinite;
}

.theme-v3 .v3-decoration_a {
    width: 8.5rem;
    height: 8.5rem;
    top: 18%;
    left: -3rem;
}

.theme-v3 .v3-decoration_b {
    width: 6.5rem;
    height: 6.5rem;
    bottom: 12%;
    right: -2rem;
    animation-direction: reverse;
    animation-duration: 18s;
}

@keyframes v3-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(1.5rem, -1.5rem) rotate(45deg); }
}

@media screen and (max-width: 900px) {
    .theme-v3 .v3-decoration {
        display: none;
    }
}

@media (prefers-color-scheme: dark) {
    .theme-v3 .v3-decoration {
        opacity: 0.18;
    }
}

/* Staggered fade-in across hero stack */

.theme-v3 .seo-v2-hero > * {
    animation: v3-fade-up 0.7s var(--v3-ease) both;
}

.theme-v3 .seo-v2-hero > :nth-child(1)  { animation-delay: 0.00s; }
.theme-v3 .seo-v2-hero > :nth-child(2)  { animation-delay: 0.04s; }
.theme-v3 .seo-v2-hero > :nth-child(3)  { animation-delay: 0.08s; }
.theme-v3 .seo-v2-hero > :nth-child(4)  { animation-delay: 0.12s; }
.theme-v3 .seo-v2-hero > :nth-child(5)  { animation-delay: 0.16s; }
.theme-v3 .seo-v2-hero > :nth-child(6)  { animation-delay: 0.20s; }
.theme-v3 .seo-v2-hero > :nth-child(7)  { animation-delay: 0.24s; }
.theme-v3 .seo-v2-hero > :nth-child(8)  { animation-delay: 0.28s; }

@keyframes v3-fade-up {
    0% { opacity: 0; transform: translateY(0.625rem); }
    100% { opacity: 1; transform: translateY(0); }
}

.theme-v3 .seo-v2-features__grid > .seo-v2-card {
    animation: v3-fade-up 0.55s var(--v3-ease) both;
}
.theme-v3 .seo-v2-features__grid > .seo-v2-card:nth-child(1) { animation-delay: 0.05s; }
.theme-v3 .seo-v2-features__grid > .seo-v2-card:nth-child(2) { animation-delay: 0.10s; }
.theme-v3 .seo-v2-features__grid > .seo-v2-card:nth-child(3) { animation-delay: 0.15s; }
.theme-v3 .seo-v2-features__grid > .seo-v2-card:nth-child(4) { animation-delay: 0.20s; }
.theme-v3 .seo-v2-features__grid > .seo-v2-card:nth-child(5) { animation-delay: 0.25s; }
.theme-v3 .seo-v2-features__grid > .seo-v2-card:nth-child(6) { animation-delay: 0.30s; }

.theme-v3 .v3-games-chips > .v3-game-chip {
    animation: v3-fade-up 0.4s var(--v3-ease) both;
}
.theme-v3 .v3-games-chips > .v3-game-chip:nth-child(n+5)  { animation-delay: 0.08s; }
.theme-v3 .v3-games-chips > .v3-game-chip:nth-child(n+10) { animation-delay: 0.16s; }
.theme-v3 .v3-games-chips > .v3-game-chip:nth-child(n+15) { animation-delay: 0.24s; }

/* Quick tips on plan page */

.theme-v3 .v3-tips {
    background: var(--v3-surface-strong);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-lg);
    padding: 1.75rem 1.5rem 1.5rem;
    margin: 1.5rem auto;
    box-shadow: var(--v3-shadow-md);
    backdrop-filter: saturate(1.3) blur(0.5rem);
    -webkit-backdrop-filter: saturate(1.3) blur(0.5rem);
    position: relative;
    overflow: hidden;
}

.theme-v3 .v3-tips::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--v3-primary), var(--v3-accent), transparent);
    opacity: 0.55;
}

.theme-v3 .v3-tips__title {
    margin: 0 0 1rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--v3-text);
    letter-spacing: -0.01em;
}

.theme-v3 .v3-tips__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.theme-v3 .v3-tip {
    background: var(--v3-surface);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-md);
    padding: 1rem 1rem 1.1rem;
    box-shadow: var(--v3-shadow-sm);
    transition: transform 0.2s var(--v3-ease),
        box-shadow 0.2s var(--v3-ease),
        border-color 0.2s var(--v3-ease);
}

.theme-v3 .v3-tip:hover {
    transform: translateY(-2px);
    box-shadow: var(--v3-shadow-md);
    border-color: rgba(91, 115, 245, 0.32);
}

.theme-v3 .v3-tip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--v3-radius-sm);
    background: linear-gradient(135deg,
        rgba(91, 115, 245, 0.16), rgba(236, 72, 153, 0.16));
    box-shadow: inset 0 0 0 1px rgba(91, 115, 245, 0.16);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.theme-v3 .v3-tip__title {
    margin: 0 0 0.25rem;
    color: var(--v3-text);
    font-size: 0.95rem;
    text-align: left;
}

.theme-v3 .v3-tip__text {
    margin: 0;
    color: var(--v3-muted);
    font-size: 0.825rem;
    line-height: 1.5;
    text-align: left;
}

.theme-v3 .v3-tips__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin: 1.25rem 0 0;
}

/* Reskinned footer */

.theme-v3 .v3-footer {
    background: var(--v3-surface-strong);
    border: 1px solid var(--v3-border);
    border-radius: var(--v3-radius-lg);
    padding: 1.75rem 1.5rem 1.25rem;
    margin: 2rem auto 0;
    text-align: left;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(15rem, 1.2fr) 2fr;
    box-shadow: var(--v3-shadow-sm);
}

.theme-v3 .v3-footer__brand {
    align-self: start;
    max-width: 24rem;
    padding-left: 1rem;
    border-left: 3px solid rgba(91, 115, 245, 0.34);
}

.theme-v3 .v3-footer__name {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--v3-text);
    margin: 0 0 0.35rem;
    line-height: 1.25;
}

.theme-v3 .v3-footer .footer__tagline {
    color: var(--v3-muted);
    font-style: normal;
    font-size: 0.875rem;
    text-align: left;
    margin: 0;
    line-height: 1.5;
}

.theme-v3 .v3-footer__nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 1rem 1.5rem;
}

.theme-v3 .v3-footer__col {
    min-width: 0;
}

.theme-v3 .v3-footer__heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--v3-muted);
    margin: 0 0 0.5rem;
    text-align: left;
}

.theme-v3 .v3-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.theme-v3 .v3-footer__list a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--v3-text-soft);
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color 0.18s var(--v3-ease);
}

.theme-v3 .v3-footer__list a:hover {
    color: var(--v3-primary);
}

.theme-v3 .v3-footer__meta-links {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0.85rem 0 0;
    border-top: 1px solid var(--v3-border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.theme-v3 .v3-footer__meta-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--v3-text-soft);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-decoration: none;
    transition: color 0.18s var(--v3-ease);
}

.theme-v3 .v3-footer__meta-links a::before {
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    border: 1px solid rgba(91, 115, 245, 0.22);
    border-radius: 50%;
    background: var(--v3-primary-soft);
    color: var(--v3-primary);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.theme-v3 .v3-footer__meta-links li:first-child a::before {
    content: "@";
}

.theme-v3 .v3-footer__meta-links li:last-child a::before {
    content: "i";
}

.theme-v3 .v3-footer__meta-links a:hover {
    color: var(--v3-primary);
}

.theme-v3 .privacy-head {
    margin-bottom: 1.5rem;
}

.theme-v3 .privacy-policy {
    max-width: 58rem;
}

.theme-v3 .privacy-policy h3 {
    margin: 1.5rem 0 0.45rem;
    color: var(--v3-text);
    font-size: 1.05rem;
}

.theme-v3 .privacy-policy p {
    color: var(--v3-text-soft);
    line-height: 1.75;
}

.theme-v3 .privacy-policy a {
    color: var(--v3-primary);
    font-weight: 700;
    text-decoration: none;
}

.theme-v3 .privacy-policy a:hover {
    text-decoration: underline;
}

.theme-v3 .v3-footer__legal {
    grid-column: 1 / -1;
    margin: 0.5rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--v3-border);
    font-size: 0.75rem;
    color: var(--v3-muted);
    text-align: center;
    line-height: 1.6;
}

@media screen and (max-width: 720px) {
    .theme-v3 .v3-footer {
        grid-template-columns: 1fr;
        padding: 1.5rem 1.25rem 1rem;
    }

    .theme-v3 .v3-footer__brand {
        padding-left: 0;
        padding-top: 0.85rem;
        border-left: 0;
        border-top: 3px solid rgba(91, 115, 245, 0.34);
    }
}

/* Print stylesheet — make shared/team URLs printable */

@media print {
    .theme-v3,
    .theme-v3 article.team-planner {
        background: #fff !important;
        color: #000 !important;
    }

    .theme-v3 .theme-v3__bg,
    .theme-v3 .v3-decoration,
    .theme-v3 .v3-skip-link,
    .theme-v3 .seo-v2-hero__deco,
    .theme-v3 .seo-v2-hero__cta-wrap,
    .theme-v3 .v3-trust,
    .theme-v3 .v3-stat-strip,
    .theme-v3 .seo-v2-cta,
    .theme-v3 .picker__filter-button,
    .theme-v3 .team__buttons,
    .theme-v3 .picker__pokedexes,
    .theme-v3 .picker__overlay,
    .theme-v3 .head__game-picker,
    .theme-v3 .v3-footer__nav,
    .theme-v3 .seo-v2-features,
    .theme-v3 .seo-v2-steps,
    .theme-v3 .seo-v2-games,
    .theme-v3 .head__faq,
    .theme-v3 .v3-tips {
        display: none !important;
    }

    .theme-v3 article section,
    .theme-v3 .team,
    .theme-v3 .slot,
    .theme-v3 .v3-footer {
        box-shadow: none !important;
        background: #fff !important;
        border: 1px solid #ccc !important;
        animation: none !important;
    }

    .theme-v3 .seo-v2-hero {
        padding: 1em !important;
        background: #fff !important;
    }

    .theme-v3 .seo-v2-hero .head__heading,
    .theme-v3 article section > h2 {
        color: #000 !important;
        background: none !important;
        -webkit-text-fill-color: #000 !important;
    }

    .theme-v3 .v3-stat__value {
        color: #000 !important;
        background: none !important;
        -webkit-text-fill-color: #000 !important;
    }
}

/* Honor reduced motion */

@media (prefers-reduced-motion: reduce) {
    .theme-v3 article section,
    .theme-v3 .slot,
    .theme-v3 .seo-v2-hero__deco,
    .theme-v3 .seo-v2-hero > *,
    .theme-v3 .seo-v2-features__grid > .seo-v2-card,
    .theme-v3 .v3-games-chips > .v3-game-chip,
    .theme-v3 .tera-picker,
    .theme-v3 .picker__filters,
    .theme-v3 .v3-eyebrow__dot,
    .theme-v3 .v3-decoration {
        animation: none !important;
    }

    .theme-v3 .slot_populated:hover .slot__pokemon-render {
        transform: none;
    }
}
