#pokemonBattleModal {
  --pokemon-battle-modal-max-height: calc(100dvh - 2rem);
}

.pokemon-battle-modal {
  --pokemon-battle-panel: color-mix(in srgb, var(--bs-body-bg) 88%, transparent);
  --pokemon-battle-line: color-mix(in srgb, var(--bs-border-color) 74%, transparent);
  --pokemon-battle-shadow: 0 30px 90px rgba(15, 23, 42, .22);
  overflow: visible !important;
}

#pokemonBattleModal .modal-dialog {
  max-height: var(--pokemon-battle-modal-max-height);
}

#pokemonBattleModal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: var(--pokemon-battle-modal-max-height);
  min-height: 0;
}

#pokemonBattleModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px)) !important;
}

@media (max-width: 860px) {
  #pokemonBattleModal {
    --pokemon-battle-modal-max-height: calc(100dvh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
}

.pokemon-battle-team-layout,
.pokemon-battle-panel {
  overflow: visible;
}

#pokemonBattleModal [data-lenis-prevent],
.pokemon-battle-tom-dropdown .ts-dropdown-content {
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.pokedex-battle-modal__pokebattle {
  position: absolute;
  top: -55px;
  left: -56px;
  width: 223px;
  pointer-events: none;
  z-index: -1;
  transform: rotate(-4deg);
  filter: drop-shadow(0 12px 20px rgba(15, 23, 42, 0.16));
}

.pokemon-battle-modal__header{
  padding-left: clamp(7rem, 10vw, 8rem);
}

.pokemon-battle-modal__heading {
  min-width: 0;
}

.pokemon-battle-view {
  display: none;
}

.pokemon-battle-view.is-active {
  display: block;
}

#pokemonBattleModal.is-team-management-view .pokemon-battle-modal__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pokemonBattleModal.is-team-management-view .pokemon-battle-team-management.is-active {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.pokemon-battle-team-management__header {
  flex: 0 0 auto;
}

.pokemon-battle-team-management__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: .15rem;
  padding-bottom: .15rem;
}

.pokemon-battle-toast {
  position: absolute;
  top: max(.85rem, env(safe-area-inset-top, 0px) + .55rem);
  left: 50%;
  z-index: 40;
  max-width: min(440px, calc(100% - 24px));
  width: max-content;
  padding: .7rem .9rem;
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.25;
  border-radius: var(--border-radius-20, 20px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .2);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
}

.pokemon-battle-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pokemon-battle-hub-card {
  --pokemon-battle-hub-card-bg-image: none;
  --pokemon-battle-hub-card-bg-fallback: #111827;
  min-height: 178px;
  position: relative;
  display: grid;
  align-content: end;
  gap: .55rem;
  padding: 1.2rem;
  overflow: hidden;
  color: #fff;
  background: var(--pokemon-battle-hub-card-bg-fallback) !important;
  transition: border .18s ease, box-shadow .18s ease, transform .18s ease, filter .18s ease;
}

.pokemon-battle-hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background-image: var(--pokemon-battle-hub-card-bg-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  transition: transform .22s ease, filter .22s ease;
}

.pokemon-battle-hub-card__content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: .38rem;
  max-width: 76%;
}

.pokemon-battle-hub-card__kicker {
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .76);
}

.pokemon-battle-hub-card strong {
  font-size: 1.15rem;
}

.pokemon-battle-hub-card .badge {
  background: rgba(15, 23, 42, .62) !important;
  color: #fff !important;
}

.pokemon-battle-audio-toggle {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}

.pokemon-battle-audio-toggle .pokemon-battle-audio-toggle__on,
.pokemon-battle-audio-toggle.is-enabled .pokemon-battle-audio-toggle__off {
  display: none;
}

.pokemon-battle-audio-toggle.is-enabled .pokemon-battle-audio-toggle__on {
  display: inline-block;
}

.pokemon-battle-audio-menu {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.pokemon-battle-audio-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 54;
  width: min(320px, calc(100vw - 2rem));
  height: .85rem;
}

.pokemon-battle-audio-controls {
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: .5rem;
  width: min(320px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: .55rem .7rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px) !important;
  transition: opacity .16s ease .12s, transform .16s ease .12s, visibility 0s linear .28s;
  visibility: hidden;
}

.pokemon-battle-audio-menu:hover .pokemon-battle-audio-controls:not(.d-none),
.pokemon-battle-audio-menu:focus-within .pokemon-battle-audio-controls:not(.d-none) {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
  visibility: visible;
}

.pokemon-battle-audio-controls.d-none {
  display: none !important;
}

.pokemon-battle-audio-controls__button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
}

.pokemon-battle-audio-controls__volume {
  flex: 1 1 130px;
  min-width: 110px;
  max-width: 220px;
  margin: 0;
}

.pokemon-battle-audio-controls__volume input {
  width: 100%;
  vertical-align: middle;
}

.pokemon-battle-audio-controls__status {
  min-width: 0;
  color: var(--bs-secondary-color);
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
}

.pokemon-battle-audio-controls.is-disabled {
  opacity: .78;
}

.pokemon-battle-audio-controls__volume-off,
.pokemon-battle-audio-controls.is-muted .pokemon-battle-audio-controls__volume-on {
  display: none;
}

.pokemon-battle-audio-controls.is-muted .pokemon-battle-audio-controls__volume-off {
  display: inline-block;
}

@media (max-width: 575.98px) {
  .pokemon-battle-audio-controls {
    gap: .4rem;
    padding: .5rem;
    right: -.5rem;
  }

  .pokemon-battle-audio-controls__status {
    flex: 1 1 100%;
  }
}

.pokemon-battle-team-list {
  display: grid;
  gap: .65rem;
  align-content: start;
  align-items: start;
  max-height: min(42vh, 340px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.pokemon-battle-team-layout > .col-12.col-lg-5,
.pokemon-battle-team-layout > .col-12.col-lg-7 {
  min-height: min(70vh, 760px);
}

.pokemon-battle-team-mobile-tabs .nav-link {
  border-radius: var(--border-radius-10, 10px);
  color: var(--bs-secondary-color);
  font-size: .82rem;
  font-weight: 900;
  padding: .4rem .6rem;
}

.pokemon-battle-team-mobile-tabs .nav-link.active {
  color: #fff;
}

.pokemon-battle-team-selector {
  gap: .25rem;
}

.pokemon-battle-team-panel-heading {
  min-height: 32px;
}

.pokemon-battle-captured-controls {
  min-width: min(100%, 360px);
  flex: 1 1 420px;
  justify-content: flex-end;
}

.pokemon-battle-captured-sort {
  width: auto;
  min-width: 150px;
  font-weight: 800;
  height: -webkit-fill-available;
}

.pokemon-battle-captured-select {
  flex: 1 1 230px;
  min-width: 220px;
}

.pokemon-battle-team-layout > .col-12.col-lg-7 > .pokemon-battle-panel:last-child {
  flex: 1 1 auto;
  min-height: 0;
}

.pokemon-battle-team-layout > .col-12.col-lg-5 > .pokemon-battle-panel:last-child{
  min-height: 0;
}

.pokemon-battle-team-layout > .col-12.col-lg-5 .pokemon-battle-team-list {
  flex: 1 1 auto;
  max-height: none;
}

.pokemon-battle-move-editor {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  overscroll-behavior: contain;
  padding-right: .2rem;
}

.pokemon-battle-team-card {
  border: 1px solid var(--pokemon-battle-line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: .75rem;
  overflow: hidden;
  min-height: 82px;
  max-height: 96px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pokemon-battle-team-card:hover,
.pokemon-battle-team-card:focus-visible {
  border-color: color-mix(in srgb, var(--bs-primary) 42%, var(--pokemon-battle-line));
}

.pokemon-battle-info__sprite {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  background: transparent !important;
  border: 0;
  box-shadow: none;
}

.pokemon-battle-info__sprite img {
  width: 78px;
  height: 78px;
  object-fit: contain;
  image-rendering: pixelated;
}

.pokemon-battle-info-block {
  position: relative;
}

.pokemon-battle-selected-identity {
  display: grid;
  gap: .88rem;
  align-content: start;
}

.pokemon-battle-selected-identity__top {
  min-width: 0;
}

.pokemon-battle-selected-identity .pokemon-battle-info__sprite {
  width: 80px;
  height: 80px;
  flex: 0 0 80px;
}

.pokemon-battle-selected-identity .pokemon-battle-info__sprite img {
  width: 70px;
  height: 70px;
  image-rendering: pixelated;
}

.pokemon-battle-selected-identity h3 {
  font-size: .95rem;
  line-height: 1.1;
}

.pokemon-battle-detail-badges {
  line-height: 1;
}

.pokemon-battle-detail-pill {
  min-height: 1.25rem;
  border-radius: 999px;
  padding: .18rem .5rem;
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.pokemon-battle-detail-pill.pokemon-rarity-badge {
  color: #fff;
}

.pokemon-battle-detail-pill.pokemon-rarity-badge[data-rarity="common"] { background: #445473; }
.pokemon-battle-detail-pill.pokemon-rarity-badge[data-rarity="uncommon"] { background: #357e53; }
.pokemon-battle-detail-pill.pokemon-rarity-badge[data-rarity="rare"] { background: #b17927; }
.pokemon-battle-detail-pill.pokemon-rarity-badge[data-rarity="epic"] { background: #7342ab; }
.pokemon-battle-detail-pill.pokemon-rarity-badge[data-rarity="legendary"] { background: #6f1212; }
.pokemon-battle-detail-pill.pokemon-rarity-badge[data-rarity="special"] { background: linear-gradient(135deg, #0ea5e9, #14b8a6); }
.pokemon-battle-detail-pill.pokemon-rarity-badge[data-rarity="mythical"] { background: #7342ab; }

.pokemon-battle-detail-pill.pokemon-region-badge {
  border: 1px solid var(--region-color, #71717a);
  background: var(--region-color, #71717a);
  color: #fff;
}

.pokemon-battle-detail-pill.pokemon-region-badge[data-region="kanto"] { --region-color: #22c55e; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="johto"] { --region-color: #eab308; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="hoenn"] { --region-color: #ef4444; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="sinnoh"] { --region-color: #a855f7; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="unys"] { --region-color: #52525b; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="kalos"] { --region-color: #ec4899; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="alola"] { --region-color: #f97316; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="galar"] { --region-color: #8b5cf6; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="paldea"] { --region-color: #14b8a6; }
.pokemon-battle-detail-pill.pokemon-region-badge[data-region="unknown"] { --region-color: #71717a; }

.pokemon-battle-shiny-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
}

.pokemon-battle-shiny-choice button {
  min-height: 32px;
  border: 1px solid var(--pokemon-battle-line);
  border-radius: 8px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-size: .78rem;
  font-weight: 800;
}

.pokemon-battle-shiny-choice button.is-active {
  border-color: color-mix(in srgb, #f59e0b 62%, var(--pokemon-battle-line));
  background: color-mix(in srgb, #f59e0b 18%, var(--bs-body-bg));
}

.pokemon-battle-selected-talent {
  min-width: 0;
  line-height: 1.15;
}

.pokemon-battle-selected-talent span,
.pokemon-battle-selected-talent small {
  display: block;
}

.pokemon-battle-selected-talent span {
  font-size: .74rem;
  color: var(--bs-secondary-color);
  font-weight: 800;
}

.pokemon-battle-selected-talent small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 700;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pokemon-battle-stats-info {
  position: absolute;
  top: 0;
  right: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
}

.pokemon-battle-stats-popover {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 20;
  display: none;
  width: 100%;
  max-height: min(62vh, 520px);
  overflow: auto;
  text-align: center;
  padding: .40rem;
  border-radius: var(--border-radius-10, 10px);
  background: var(--bs-body-bg);
}

.pokemon-battle-info-block.is-stats-open .pokemon-battle-stats-popover {
  display: block;
}

.pokemon-battle-stats-popover__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
}

.pokemon-battle-stats-popover__tabs {
  display: none;
}

.pokemon-battle-stats-popover__block {
  min-width: 0;
  border-radius: var(--border-radius-10, 10px);
  padding: .42rem .48rem;
}

.pokemon-battle-stats-popover h5 {
  margin: 0 0 .25rem;
  color: var(--bs-secondary-color);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pokemon-battle-stats-popover h5 span {
  float: right;
  color: var(--bs-body-color);
  font-size: .68rem;
}

.pokemon-battle-stats-popover__hint {
  margin: 0 0 .25rem;
  color: var(--bs-secondary-color);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.2;
}

.pokemon-battle-stats-list {
  display: grid;
  gap: .12rem;
}

.pokemon-battle-stats-list span {
  min-height: 16px;
  line-height: 1.1;
}

.pokemon-battle-stats-list small {
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 800;
}

.pokemon-battle-stats-list strong {
  font-size: .78rem;
  font-weight: 900;
}

.pokemon-battle-stats-popover__block--talent > strong,
.pokemon-battle-stats-popover__block--talent > small {
  display: block;
}

.pokemon-battle-stats-popover__block--talent > strong {
  font-size: .82rem;
  line-height: 1.15;
}

.pokemon-battle-stats-popover__block--talent > small {
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 991.98px) {
  .pokemon-battle-result-panel {
    display: none;
  }

  .pokemon-battle-result-panel.is-active {
    display: block;
  }

  .pokemon-battle-selected-row {
    padding-right: 0;
  }

  .pokemon-battle-stats-popover {
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(46vh, 340px);
    padding: .35rem;
    text-align: left;
  }

  .pokemon-battle-stats-popover__tabs {
    display: flex;
    gap: .25rem;
    margin-bottom: .4rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .pokemon-battle-stats-popover__tabs button {
    flex: 1 0 auto;
    border: 1px solid var(--pokemon-battle-line);
    border-radius: 999px;
    padding: .28rem .48rem;
    background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
    color: var(--bs-secondary-color);
    font-size: .68rem;
    font-weight: 900;
    line-height: 1;
  }

  .pokemon-battle-stats-popover__tabs button.is-active {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: #fff;
  }

  .pokemon-battle-stats-popover__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .pokemon-battle-stats-popover__block {
    display: none;
  }

  .pokemon-battle-stats-popover__block.is-active {
    display: block;
  }
}

@media (max-width: 575.98px) {
  .pokemon-battle-bag-grid,
  .pokemon-battle-bag-grid--balls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pokemon-battle-attack-card .pokemon-battle-type-badge {
    display: none;
  }

  .pokemon-battle-stats-popover {
    max-height: min(46vh, 330px);
    padding: .32rem;
    text-align: left;
  }

  .pokemon-battle-stats-popover__tabs button {
    padding: .24rem .42rem;
    font-size: .66rem;
  }

  .pokemon-battle-stats-popover__grid {
    gap: 0;
  }

  .pokemon-battle-stats-popover__block {
    padding: .4rem .45rem;
  }

  .pokemon-battle-stats-popover h5 {
    font-size: .66rem;
  }

  .pokemon-battle-stats-list {
    gap: .08rem;
  }

  .pokemon-battle-stats-list span {
    min-height: 15px;
  }

  .pokemon-battle-stats-list small {
    font-size: .64rem;
  }

  .pokemon-battle-stats-list strong {
    font-size: .74rem;
  }

  .pokemon-battle-stats-popover__block--talent > small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
  }
}

.pokemon-battle-team-card.is-selected {
  border-color: color-mix(in srgb, var(--bs-primary) 70%, var(--pokemon-battle-line));
}

.pokemon-battle-team-card__sprite {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: transparent !important;
  border: 0;
  box-shadow: none;
}

.pokemon-battle-team-card__sprite img,
.pokemon-battle-sprite {
  image-rendering: pixelated;
}

.pokemon-battle-team-card__sprite img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}


.pokemon-battle-move-grid,
.pokemon-battle-attack-grid,
.pokemon-battle-switch-grid,
.pokemon-battle-bag-grid {
  display: grid;
  gap: .75rem;
}

.pokemon-battle-move-grid {
  grid-template-columns: repeat(3, minmax(170px, 100%));
  grid-auto-rows: 178px;
  align-content: start;
  align-items: start;
  justify-content: start;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: .15rem;
}

.pokemon-battle-attack-grid,
.pokemon-battle-bag-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pokemon-battle-attack-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pokemon-battle-switch-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pokemon-battle-move-choice,
.pokemon-battle-attack-card,
.pokemon-battle-switch-card {
  border: 1px solid var(--pokemon-battle-line);
  border-radius: var(--border-radius-20);
  background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
  padding: .85rem;
}

.pokemon-battle-bag-item {
  border: 1px solid var(--pokemon-battle-line);
  border-radius: var(--border-radius-20);
  background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
  padding: .85rem;
  align-items: center;
  gap: .75rem;
  min-height: 0px;
}

.pokemon-battle-bag-item__visual {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
}

.pokemon-battle-bag-item__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.pokemon-battle-bag-item__visual--fallback {
  font-weight: 900;
  color: #34405f;
}

.pokemon-battle-bag-item__content {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.pokemon-battle-bag-layout,
.pokemon-battle-bag-section {
  display: grid;
  gap: .15rem;
}

.pokemon-battle-bag-layout {
  gap: 1rem;
}

.pokemon-battle-bag-tabs .nav-link {
  border-radius: var(--border-radius-10, 10px);
  font-weight: 900;
}

.pokemon-battle-bag-tab-panel {
  display: none;
}

.pokemon-battle-bag-tab-panel.is-active {
  display: block;
}

.pokemon-battle-bag-grid--balls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pokemon-battle-bag-note {
  border: 1px dashed var(--pokemon-battle-line);
  border-radius: 14px;
  padding: .7rem .8rem;
  background: color-mix(in srgb, var(--bs-body-bg) 76%, transparent);
  font-weight: 700;
}

.pokemon-battle-ball-choice {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.pokemon-battle-ball-choice small {
  display: block;
}

.pokemon-battle-prestige-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1rem;
  padding: .12rem .38rem;
  border-radius: 999px;
  background: color-mix(in srgb, #f59e0b 86%, #111827);
  color: #111827;
  font-size: .62rem;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.pokemon-battle-ball-choice__image,
.pokemon-battle-ball-choice__fallback {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.pokemon-battle-ball-choice__image {
  padding: 4px;
  object-fit: contain;
}

.pokemon-battle-ball-choice__fallback {
  font-weight: 900;
  color: #34405f;
}

.pokemon-battle-ball {
  --pokemon-battle-ball-frame-size: 41px;
  --pokemon-battle-ball-open-y: -400px;
  display: block;
  width: var(--pokemon-battle-ball-frame-size);
  height: var(--pokemon-battle-ball-frame-size);
  background-image: var(--pokemon-battle-pokeballs-sprite);
  background-repeat: no-repeat;
  background-size: auto;
  background-position-y: 0;
  image-rendering: pixelated;
}

.pokemon-battle-ball.poke { --pokemon-battle-ball-x: 0; background-position-x: 0; }
.pokemon-battle-ball.great { --pokemon-battle-ball-x: -41px; background-position-x: -41px; }
.pokemon-battle-ball.ultra { --pokemon-battle-ball-x: -82px; background-position-x: -82px; }
.pokemon-battle-ball.master { --pokemon-battle-ball-x: -123px; background-position-x: -123px; }

.pokemon-battle-ball > .pokemon-battle-ball-x {
  display: none;
}

.pokemon-battle-ball.throw {
  background: none;
  animation: pokemon-battle-throw-visibility 1.35s ease forwards;
}

.pokemon-battle-ball.throw > .pokemon-battle-ball-x {
  display: block;
}

.pokemon-battle-ball.throw,
.pokemon-battle-ball.throw *,
.pokemon-battle-ball.throw .pokemon-battle-ball-sprite::before {
  animation-fill-mode: both;
}

.pokemon-battle-ball.throw .pokemon-battle-ball-x,
.pokemon-battle-ball.throw .pokemon-battle-ball-y,
.pokemon-battle-ball.throw .pokemon-battle-ball-sprite {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pokemon-battle-ball-frame-size);
  height: var(--pokemon-battle-ball-frame-size);
}

.pokemon-battle-ball.throw .pokemon-battle-ball-x {
  animation: pokemon-battle-throw-x 1.35s ease-out forwards;
}

.pokemon-battle-ball.throw .pokemon-battle-ball-y {
  animation: pokemon-battle-throw-y 1.35s ease-in-out forwards;
}

.pokemon-battle-ball.throw .pokemon-battle-ball-sprite {
  background-image: var(--pokemon-battle-pokeballs-sprite);
  background-repeat: no-repeat;
  background-position: var(--pokemon-battle-ball-x, 0) 0;
  image-rendering: pixelated;
  transform-origin: center bottom;
  animation: pokemon-battle-throw-sprite 1.35s steps(1) forwards;
}

.pokemon-battle-ball.throw .pokemon-battle-ball-sprite::before {
  content: "";
  position: absolute;
  left: 30%;
  bottom: 8px;
  width: 40%;
  height: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .85);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .9);
  opacity: .3;
  animation: pokemon-battle-throw-sprite-shadow 1.35s ease forwards;
}

.pokemon-battle-move-choice {
  width: 100%;
  min-height: 178px;
  max-height: 178px;
  align-content: start;
  overflow: hidden;
}

.pokemon-battle-move-choice__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .5rem;
}

.pokemon-battle-move-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.pokemon-battle-type-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.pokemon-battle-move-choice__top strong,
.pokemon-battle-move-title strong {
  min-width: 0;
  overflow: hidden;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.pokemon-battle-move-check {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--pokemon-battle-type-color, var(--bs-primary));
  border-radius: .35rem;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
  box-shadow: 0 5px 12px var(--pokemon-battle-type-shadow, transparent);
}

.pokemon-battle-move-check::after {
  content: "";
  width: .42rem;
  height: .68rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  opacity: 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.pokemon-battle-move-check.is-checked {
  background: var(--pokemon-battle-type-color, var(--bs-primary));
}

.pokemon-battle-move-check.is-checked::after {
  opacity: 1;
}

.pokemon-battle-move-check.is-disabled {
  opacity: .45;
}

.pokemon-battle-move-choice__effect {
    display: block;
    max-height: 50px;
    overflow-y: auto;
    margin: .35rem 0;
    padding-right: .25rem;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--pokemon-battle-type-color, var(--bs-primary)) transparent;
}

/* Chrome / Edge / Safari */
.pokemon-battle-move-choice__effect::-webkit-scrollbar {
    width: 4px;
    background: transparent;
    display: block;
}

.pokemon-battle-move-choice__effect::-webkit-scrollbar-track {
    background: transparent;
}

.pokemon-battle-move-choice__effect::-webkit-scrollbar-thumb {
    background-color: var(--pokemon-battle-type-color, var(--bs-primary));
    border-radius: var(--border-radius-10, 10px);
}

/* Supprime les flèches haut / bas */
.pokemon-battle-move-choice__effect::-webkit-scrollbar-button {
    display: none !important;
    width: 0;
    height: 0;
}

.pokemon-battle-attack-card {
  min-height: 5.7rem;
  padding: .65rem;
  position: relative;
  overflow: hidden;
  gap: .55rem;
  justify-content: space-between;
}

.pokemon-battle-attack-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  min-width: 0;
}

.pokemon-battle-attack-card__top .pokemon-battle-move-title {
  flex: 1 1 auto;
}

.pokemon-battle-attack-card__top .pokemon-battle-move-title strong {
  display: -webkit-box;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pokemon-battle-attack-info {
  width: 1.45rem;
  height: 1.45rem;
  border: 1px solid color-mix(in srgb, var(--pokemon-battle-type-color, var(--bs-primary)) 42%, var(--pokemon-battle-line));
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--pokemon-battle-type-color, var(--bs-primary));
  font-size: .75rem;
  font-weight: 900;
  flex: 0 0 auto;
  line-height: 1;
  background: color-mix(in srgb, var(--bs-body-bg) 78%, transparent);
}

.pokemon-battle-attack-info:hover,
.pokemon-battle-attack-info:focus-visible {
  background: var(--pokemon-battle-type-color, var(--bs-primary));
  color: #fff;
  outline: none;
}

.pokemon-battle-attack-content {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 4.9rem;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}

.pokemon-battle-attack-meta {
  display: flex;
  width: 100%;
  min-width: 0;
  margin-top: auto;
  flex-direction: column;
  gap: .25rem;
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 700;
}

.pokemon-battle-attack-meta-row {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
}

.pokemon-battle-attack-meta-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  line-height: 1.15;
}

.pokemon-battle-attack-meta-item strong,
.pokemon-battle-attack-meta-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-attack-meta-item span {
  text-align: right;
}

.pokemon-battle-attack-description {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  overflow-y: auto;
  padding: .45rem .55rem;
  border: 1px solid color-mix(in srgb, var(--pokemon-battle-type-color, var(--bs-primary)) 28%, var(--pokemon-battle-line));
  border-radius: 12px;
  background: var(--bs-body-bg);
  box-shadow: 0 10px 20px var(--pokemon-battle-type-shadow, transparent);
  color: var(--bs-secondary-color);
  font-weight: 700;
  line-height: 1.25;
}

.pokemon-battle-attack-card.is-showing-info .pokemon-battle-attack-description {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

@media (min-width: 768px) {
  .pokemon-battle-attack-card {
    min-height: 9rem;
  }
}

@media (max-width: 767.98px) {
  .pokemon-battle-attack-meta {
    font-size: .66rem;
  }

  .pokemon-battle-attack-meta-row {
    gap: .25rem;
  }

  .pokemon-battle-attack-info {
    width: 1.25rem;
    height: 1.25rem;
    font-size: .68rem;
  }

  .pokemon-battle-attack-content {
    min-height: 2.25rem;
    gap: .35rem;
  }

  .pokemon-battle-attack-card .pokemon-battle-type-badge {
    width: 1.15rem;
    min-height: 1.15rem;
    padding: 0;
    border-radius: 999px;
  }

  .pokemon-battle-attack-card .pokemon-battle-type-badge__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .pokemon-battle-attack-card.is-showing-info .pokemon-battle-attack-description {
    -webkit-line-clamp: 3;
  }
}

.pokemon-battle-switch-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: .55rem;
  text-align: left;
}

.pokemon-battle-switch-card__sprite {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--bs-secondary-color);
  font-weight: 900;
}

.pokemon-battle-switch-card__sprite img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: pixelated;
}

.pokemon-battle-switch-card__hp {
  grid-column: 1 / -1;
  width: 100%;
  display: grid;
  gap: .22rem;
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 800;
}

.pokemon-battle-switch-card__meta {
  min-width: 0;
  display: grid;
  gap: .1rem;
}

.pokemon-battle-switch-card__meta strong {
  overflow: hidden;
  font-size: .9rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-switch-card__meta small {
  color: var(--bs-secondary-color);
  font-weight: 800;
}

.pokemon-battle-switch-card:disabled {
  opacity: .52;
  filter: grayscale(.4);
}

.pokemon-battle-mini-hp {
  height: .28rem;
  border-radius: 999px;
}

.pokemon-battle-move-choice.is-selected,
.pokemon-battle-attack-card:hover:not(:disabled),
.pokemon-battle-switch-card:hover:not(:disabled) {
  border-color: var(--pokemon-battle-type-color, var(--bs-primary));
}

.pokemon-battle-move-choice.is-locked,
.pokemon-battle-attack-card.is-locked,
.pokemon-battle-bag-item.is-disabled {
  opacity: .72;
}

.pokemon-battle-move-choice[data-type],
.pokemon-battle-attack-card[data-type] {
  border-color: var(--pokemon-battle-type-color, var(--pokemon-battle-line));
  background: var(--pokemon-battle-type-soft, color-mix(in srgb, var(--bs-body-bg) 86%, transparent));
}

.pokemon-battle-move-choice[data-type="fire"],
.pokemon-battle-attack-card[data-type="fire"] { --pokemon-battle-type-color: #f97316; --pokemon-battle-type-soft: #fff1e6; --pokemon-battle-type-shadow: rgba(249, 115, 22, .13); }
.pokemon-battle-move-choice[data-type="water"],
.pokemon-battle-attack-card[data-type="water"] { --pokemon-battle-type-color: #38bdf8; --pokemon-battle-type-soft: #eaf8ff; --pokemon-battle-type-shadow: rgba(56, 189, 248, .14); }
.pokemon-battle-move-choice[data-type="grass"],
.pokemon-battle-attack-card[data-type="grass"] { --pokemon-battle-type-color: #22c55e; --pokemon-battle-type-soft: #ecfdf3; --pokemon-battle-type-shadow: rgba(34, 197, 94, .13); }
.pokemon-battle-move-choice[data-type="electric"],
.pokemon-battle-attack-card[data-type="electric"] { --pokemon-battle-type-color: #facc15; --pokemon-battle-type-soft: #fff9db; --pokemon-battle-type-shadow: rgba(250, 204, 21, .14); }
.pokemon-battle-move-choice[data-type="ice"],
.pokemon-battle-attack-card[data-type="ice"] { --pokemon-battle-type-color: #67e8f9; --pokemon-battle-type-soft: #ecfeff; --pokemon-battle-type-shadow: rgba(103, 232, 249, .14); }
.pokemon-battle-move-choice[data-type="fighting"],
.pokemon-battle-attack-card[data-type="fighting"] { --pokemon-battle-type-color: #dc2626; --pokemon-battle-type-soft: #fff0f0; --pokemon-battle-type-shadow: rgba(220, 38, 38, .13); }
.pokemon-battle-move-choice[data-type="poison"],
.pokemon-battle-attack-card[data-type="poison"],
.pokemon-battle-move-choice[data-type="psychic"],
.pokemon-battle-attack-card[data-type="psychic"],
.pokemon-battle-move-choice[data-type="fairy"],
.pokemon-battle-attack-card[data-type="fairy"] { --pokemon-battle-type-color: #ec4899; --pokemon-battle-type-soft: #fff0f8; --pokemon-battle-type-shadow: rgba(236, 72, 153, .13); }
.pokemon-battle-move-choice[data-type="ground"],
.pokemon-battle-attack-card[data-type="ground"],
.pokemon-battle-move-choice[data-type="rock"],
.pokemon-battle-attack-card[data-type="rock"] { --pokemon-battle-type-color: #ca8a04; --pokemon-battle-type-soft: #fff8df; --pokemon-battle-type-shadow: rgba(202, 138, 4, .13); }
.pokemon-battle-move-choice[data-type="flying"],
.pokemon-battle-attack-card[data-type="flying"] { --pokemon-battle-type-color: #60a5fa; --pokemon-battle-type-soft: #edf6ff; --pokemon-battle-type-shadow: rgba(96, 165, 250, .13); }
.pokemon-battle-move-choice[data-type="bug"],
.pokemon-battle-attack-card[data-type="bug"] { --pokemon-battle-type-color: #84cc16; --pokemon-battle-type-soft: #f4fde6; --pokemon-battle-type-shadow: rgba(132, 204, 22, .13); }
.pokemon-battle-move-choice[data-type="ghost"],
.pokemon-battle-attack-card[data-type="ghost"],
.pokemon-battle-move-choice[data-type="dragon"],
.pokemon-battle-attack-card[data-type="dragon"] { --pokemon-battle-type-color: #7c3aed; --pokemon-battle-type-soft: #f4f0ff; --pokemon-battle-type-shadow: rgba(124, 58, 237, .13); }
.pokemon-battle-move-choice[data-type="dark"],
.pokemon-battle-attack-card[data-type="dark"],
.pokemon-battle-move-choice[data-type="steel"],
.pokemon-battle-attack-card[data-type="steel"] { --pokemon-battle-type-color: #64748b; --pokemon-battle-type-soft: #f3f6fa; --pokemon-battle-type-shadow: rgba(100, 116, 139, .13); }

.pokemon-battle-move-choice.is-locked {
  border-color: color-mix(in srgb, var(--bs-danger) 55%, var(--pokemon-battle-line));
  cursor: not-allowed;
}

.pokemon-battle-move-choice:disabled,
.pokemon-battle-attack-card:disabled {
  cursor: not-allowed;
}

.pokemon-battle-opponent-modes {
  display: grid;
  gap: .75rem;
  min-height: 0;
}

.pokemon-battle-opponent-modes > .row {
  align-items: stretch;
}

.pokemon-battle-choice-section {
  display: grid;
  gap: .65rem;
  border-radius: var(--border-radius-20, 20px);;
  background: var(--pokemon-battle-panel);
  padding: 1rem;
}

.pokemon-battle-choice-section--primary {
  min-height: 100%;
  background: var(--pokemon-battle-panel);
}

.pokemon-battle-choice-section--quick {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: color-mix(in srgb, #38bdf8 5%, var(--pokemon-battle-panel));
  border-color: color-mix(in srgb, #38bdf8 20%, var(--pokemon-battle-line)) !important;
}

.pokemon-battle-choice-section--list {
  min-height: 100%;
  background: color-mix(in srgb, #22c55e 4%, var(--pokemon-battle-panel));
  border-color: color-mix(in srgb, #22c55e 16%, var(--pokemon-battle-line)) !important;
}

.pokemon-battle-choice-section--leagues {
  background: color-mix(in srgb, #f59e0b 4%, var(--pokemon-battle-panel));
  border-color: color-mix(in srgb, #f59e0b 16%, var(--pokemon-battle-line)) !important;
  padding: .85rem !important;
}

.pokemon-battle-choice-paged--regions {
  min-width: 0;
}


.pokemon-battle-mode-card {
  --pokemon-battle-entry-accent: #64748b;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--pokemon-battle-entry-accent) 38%, var(--pokemon-battle-line));
  border-radius: var(--border-radius-10);
  background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pokemon-battle-mode-card--primary {
  min-height: 124px;
  align-items: center;
  border-color: color-mix(in srgb, var(--bs-primary) 32%, var(--pokemon-battle-line));
  background: color-mix(in srgb, var(--bs-primary) 8%, var(--bs-body-bg));
  box-shadow: 0 14px 28px color-mix(in srgb, var(--bs-primary) 10%, transparent);
}

.pokemon-battle-mode-card--primary strong {
  font-size: 1rem;
}

.pokemon-battle-mode-card small {
  display: block;
  color: var(--bs-secondary-color);
  font-weight: 700;
  font-size: .82rem;
}

.pokemon-battle-mode-card.is-selected {
  border-color: var(--bs-primary);
}

.pokemon-battle-mode-card.is-disabled {
  border-color: color-mix(in srgb, var(--bs-danger) 48%, var(--pokemon-battle-line));
  opacity: .72;
  cursor: not-allowed;
  filter: grayscale(.25);
}

.pokemon-battle-mode-card--gym-leader {
  border-color: color-mix(in srgb, var(--pokemon-battle-entry-accent) 48%, var(--pokemon-battle-line));
}

.pokemon-battle-mode-card--special-team {
  border-color: color-mix(in srgb, var(--pokemon-battle-entry-accent) 48%, var(--pokemon-battle-line));
}

.pokemon-battle-mode-card:hover:not(:disabled),
.pokemon-battle-mode-card:focus-visible:not(:disabled) {
  border-color: color-mix(in srgb, var(--bs-primary) 42%, var(--pokemon-battle-line));
}

.pokemon-battle-mode-card__avatar {
  display: grid;
  place-items: center;
}

.pokemon-battle-mode-card__avatar img {
  width: 100%;
  height: 100%;
  bottom: -18%;
  position: relative;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
}

.pokemon-battle-mode-card--public-team {
  padding: 0;
}

.pokemon-battle-opponent-grid {
  overflow: visible;
}

.pokemon-battle-choice-scroll {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  padding: .1rem .1rem .35rem;
  scrollbar-width: thin;
}

.pokemon-battle-choice-scroll > .pokemon-battle-mode-card {
  flex: 0 0 118px;
  scroll-snap-align: start;
}

.pokemon-battle-choice-scroll > .pokemon-battle-mode-card-wrap {
  flex: 0 0 118px;
  scroll-snap-align: start;
}

.pokemon-battle-choice-scroll--regions {
  align-items: stretch;
}

.pokemon-battle-choice-scroll--regions .pokemon-battle-league-region-grid {
  display: flex;
  gap: .55rem;
  flex: 0 0 max-content;
}

.pokemon-battle-choice-scroll--regions .pokemon-battle-league-region-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

.pokemon-battle-mode-card--avatar {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: .55rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--pokemon-battle-entry-accent) 6%, transparent), transparent 52%),
    color-mix(in srgb, var(--bs-body-bg) 88%, transparent);
}

.pokemon-battle-mode-card--avatar > span:last-child {
  position: absolute;
  inset: auto .35rem .35rem;
  display: grid;
  place-items: center;
  max-width: calc(100% - .7rem);
  padding: .22rem .35rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 50%, transparent);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.pokemon-battle-mode-card__level {
  position: absolute;
  top: .35rem;
  right: .35rem;
  z-index: 2;
  padding: .18rem .42rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 50%, transparent);
  color: var(--bs-body-color);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
  font-size: .66rem;
  font-weight: 900;
  line-height: 1;
  text-transform: lowercase;
  backdrop-filter: blur(10px);
}

.pokemon-battle-mode-card--avatar strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--bs-body-color);
  font-size: .68rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-mode-card-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.pokemon-battle-mode-card {
  width: 100%;
  height: 100%;
}

.pokemon-battle-mode-card__info-button {
  position: absolute;
  top: .35rem;
  left: .35rem;
  z-index: 6;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--pokemon-battle-entry-accent) 34%, var(--pokemon-battle-line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 94%, transparent);
  color: var(--bs-body-color);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
  cursor: help;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
}

.pokemon-battle-mode-card__info-button:hover,
.pokemon-battle-mode-card__info-button:focus-visible {
  border-color: color-mix(in srgb, var(--bs-primary) 50%, var(--pokemon-battle-line));
  outline: 0;
  box-shadow: 0 0 0 .16rem color-mix(in srgb, var(--bs-primary) 20%, transparent), 0 8px 18px rgba(15, 23, 42, .12);
}

.pokemon-battle-mode-card--avatar small {
  display: none;
}

.pokemon-battle-mode-card--placeholder {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--bs-secondary-color) 18%, transparent);
  background: color-mix(in srgb, var(--bs-secondary-bg) 34%, transparent);
  cursor: default;
  opacity: .42;
  pointer-events: none;
}

.pokemon-battle-mode-card--placeholder .pokemon-battle-mode-card__avatar {
  width: 90px;
  height: 90px;
  background-image: var(--pokemon-battle-pokeball-icon, url("../img/pokemon/pokeball-XHyLlyd.svg"));
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .22;
}

.pokemon-battle-mode-card--placeholder strong {
  color: var(--bs-secondary-color);
  font-size: .72rem;
}

.is-battle-active .pokemon-battle-battle-header,
.is-battle-active [data-battle-prestart] {
  display: none !important;
}

.pokemon-battle-modal.is-battle-active #pokemon-battle-battle-header,
#pokemonBattleModal.is-battle-active #pokemon-battle-battle-header,
#pokemonBattleModal.is-battle-active [data-battle-prestart],
#pokemonBattleModal .pokemon-battle-modal.is-battle-active #pokemon-battle-battle-header,
#pokemonBattleModal .pokemon-battle-modal.is-battle-active [data-battle-prestart] {
  display: none !important;
}

.pokemon-battle-mode-card__placeholder {
  width: min(72px, 70%);
  height: min(72px, 70%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--bs-primary) 30%, var(--bs-body-bg)), color-mix(in srgb, var(--bs-info) 22%, var(--bs-body-bg)));
  color: var(--bs-body-color);
  font-weight: 900;
  font-size: 1.4rem;
}

.pokemon-battle-mode-card.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.pokemon-battle-quick-choices {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-items: stretch;
  gap: .55rem;
}

.pokemon-battle-quick-choice {
  --pokemon-battle-quick-accent: var(--bs-primary);
  --pokemon-battle-quick-bg-image: none;
  flex: 1 1 0;
  width: 100%;
  min-height: 62px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--pokemon-battle-quick-accent) 18%, transparent), transparent 68%),
    var(--pokemon-battle-quick-bg-image),
    color-mix(in srgb, var(--pokemon-battle-quick-accent) 5%, var(--bs-body-bg));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--bs-body-color);
  padding: .62rem .58rem;
  box-shadow: 0 10px 20px color-mix(in srgb, #020617 10%, transparent);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pokemon-battle-quick-choice__hint {
  display: block;
  max-width: 100%;
  margin-top: .16rem;
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.05;
  text-shadow: 0 1px 10px rgba(2, 6, 23, .88);
}

.pokemon-battle-quick-choice--random-pokemon {
  --pokemon-battle-quick-accent: var(--bs-success);
  --pokemon-battle-quick-bg-image: url("../img/pokemon/battle/pokemon_random-On9gPwh.png");
}

.pokemon-battle-quick-choice--random-admin-trainer {
  --pokemon-battle-quick-accent: var(--bs-danger);
  --pokemon-battle-quick-bg-image: url("../img/pokemon/battle/pokemon_dresseurs-20svkcp.png");
}

.pokemon-battle-quick-choice--random-auto-battle {
  --pokemon-battle-quick-accent: var(--bs-primary);
  --pokemon-battle-quick-bg-image: url("../img/pokemon/battle/pokemon_public-YSdTFxr.png");
}

.pokemon-battle-quick-choice span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 11ch;
  overflow-wrap: anywhere;
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
  white-space: normal;
  color: #fff;
  text-shadow: 0 1px 10px rgba(2, 6, 23, .88);
}

.pokemon-battle-quick-choice:hover:not(:disabled),
.pokemon-battle-quick-choice:focus-visible:not(:disabled),
.pokemon-battle-quick-choice.is-selected {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pokemon-battle-quick-accent) 18%, transparent), 0 12px 24px color-mix(in srgb, var(--pokemon-battle-quick-accent) 12%, transparent);
  transform: scale(1.02);
}

.pokemon-battle-quick-choice:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pokemon-battle-trainer-tabs {
  display: inline-flex;
  flex: 0 1 auto;
  gap: .25rem;
  padding: .2rem;
  border: 1px solid var(--pokemon-battle-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 76%, transparent);
}

.pokemon-battle-trainer-tabs button {
  border: 0;
  border-radius: 999px;
  padding: .32rem .58rem;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}

.pokemon-battle-trainer-tabs button.is-active {
  background: var(--bs-primary);
  color: #fff;
}

.pokemon-battle-league-region-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
}

.pokemon-battle-league-region-grid--empty {
  grid-template-columns: minmax(0, 220px);
}


.pokemon-battle-league-region-card[data-region="kanto"] { --region-color: #22c55e; }
.pokemon-battle-league-region-card[data-region="johto"] { --region-color: #eab308; }
.pokemon-battle-league-region-card[data-region="hoenn"] { --region-color: #ef4444; }
.pokemon-battle-league-region-card[data-region="sinnoh"] { --region-color: #a855f7; }
.pokemon-battle-league-region-card[data-region="unys"] { --region-color: #52525b; }
.pokemon-battle-league-region-card[data-region="kalos"] { --region-color: #ec4899; }
.pokemon-battle-league-region-card[data-region="alola"] { --region-color: #f97316; }
.pokemon-battle-league-region-card[data-region="galar"] { --region-color: #8b5cf6; }
.pokemon-battle-league-region-card[data-region="paldea"] { --region-color: #14b8a6; }

.pokemon-battle-league-region-card > strong {
  display: block;
  margin-bottom: .35rem;
  color: color-mix(in srgb, var(--region-color, #64748b) 72%, var(--bs-body-color));
  font-size: .78rem;
  line-height: 1.1;
}

.pokemon-battle-league-region-card__items {
  --pokemon-battle-region-color: var(--region-color, #64748b);
  --pokemon-battle-region-bg-opacity: .58;
  --pokemon-battle-region-bg-blend-mode: normal;
  --pokemon-battle-region-bg-position: right center;
  --pokemon-battle-region-bg-size: 118%;
  --pokemon-battle-region-bg-mask-start: 0%;
  --pokemon-battle-region-bg-mask-end: 100%;
  --pokemon-battle-region-overlay-left: rgba(2, 6, 23, .82);
  --pokemon-battle-region-overlay-right: rgba(2, 6, 23, .18);
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--border-radius-10);
  background:
    linear-gradient(90deg, color-mix(in srgb, #020617 54%, var(--pokemon-battle-region-color)) 0%, color-mix(in srgb, #020617 28%, var(--pokemon-battle-region-color)) 100%),
    linear-gradient(135deg, color-mix(in srgb, var(--pokemon-battle-region-color) 20%, var(--bs-body-bg)), var(--bs-body-bg));
}

.pokemon-battle-league-region-card__items::before,
.pokemon-battle-league-region-card__items::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.pokemon-battle-league-region-card__items::before {
  z-index: 0;
  left: 34%;
  background-image: var(--pokemon-battle-region-bg-image, none);
  background-position: var(--pokemon-battle-region-bg-position);
  background-repeat: no-repeat;
  background-size: var(--pokemon-battle-region-bg-size);
  mix-blend-mode: var(--pokemon-battle-region-bg-blend-mode);
  opacity: var(--pokemon-battle-region-bg-opacity);
  -webkit-mask-image: linear-gradient(to left, #000 var(--pokemon-battle-region-bg-mask-start), rgba(0, 0, 0, .92) 42%, transparent var(--pokemon-battle-region-bg-mask-end));
  mask-image: linear-gradient(to left, #000 var(--pokemon-battle-region-bg-mask-start), rgba(0, 0, 0, .92) 42%, transparent var(--pokemon-battle-region-bg-mask-end));
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.pokemon-battle-league-region-card__items::after {
  z-index: 1;
  background:
    linear-gradient(90deg, var(--pokemon-battle-region-overlay-left) 0%, rgba(2, 6, 23, .72) 42%, rgba(2, 6, 23, .38) 68%, var(--pokemon-battle-region-overlay-right) 100%),
    radial-gradient(circle at 88% 50%, color-mix(in srgb, var(--pokemon-battle-region-color) 24%, transparent), transparent 58%);
}

.pokemon-battle-league-region-card__items > * {
  position: relative;
  z-index: 2;
}

.pokemon-battle-league-choice {
  width: 100%;
  min-height: 65px;
  border: 1px solid color-mix(in srgb, var(--region-color, #64748b) 34%, var(--pokemon-battle-line));
  border-radius: var(--border-radius-10);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  gap: .45rem;
  padding: .55rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bs-body-bg) 92%, transparent) 0%, color-mix(in srgb, var(--bs-body-bg) 82%, transparent) 58%, color-mix(in srgb, var(--bs-body-bg) 58%, transparent) 100%);
  text-align: left;
  overflow: hidden;
}

.pokemon-battle-league-choice > span:last-child {
  min-width: 0;
  max-width: 100%;
}

.pokemon-battle-league-choice strong,
.pokemon-battle-league-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-league-choice strong {
  font-size: .7rem;
  line-height: 1.05;
}

.pokemon-battle-league-choice small {
  color: var(--bs-secondary-color);
  font-size: .64rem;
  line-height: 1.08;
}

.pokemon-battle-league-choice__status {
  display: block;
  margin-top: .1rem;
  padding: 0;
  background: transparent;
  font-weight: 700;
}

.pokemon-battle-league-choice__status--available {
  color: #15803d;
}

.pokemon-battle-league-choice__status--locked {
  color: #b91c1c;
}

.pokemon-battle-league-choice__status--coming_soon {
  color: var(--bs-secondary-color);
}

.pokemon-battle-league-choice--placeholder {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--bs-secondary-color) 18%, transparent);
  background: color-mix(in srgb, var(--bs-secondary-bg) 34%, transparent);
  opacity: .42;
  pointer-events: none;
}

.pokemon-battle-league-choice--placeholder strong {
  color: var(--bs-secondary-color);
}

.pokemon-battle-league-choice.is-locked,
.pokemon-battle-league-choice:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.pokemon-battle-league-choice.is-selected {
  border-color: var(--bs-primary);
  box-shadow: none;
}

.pokemon-battle-modal .ts-dropdown,
.pokemon-battle-modal .ts-dropdown-content,
.pokemon-battle-tom-dropdown,
.pokemon-battle-tom-dropdown .ts-dropdown-content {
  max-height: min(42vh, 360px);
  overflow-y: auto;
  z-index: 4000;
}

.pokemon-battle-modal .ts-wrapper {
  z-index: 120;
}

.pokemon-battle-modal .ts-wrapper.dropdown-active {
  z-index: 4001;
}

.pokemon-battle-type-badge {
  width: fit-content;
  min-height: 1.35rem;
  border-radius: 999px;
  padding: .18rem .55rem;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  color: #fff;
  background: #94a3b8;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.pokemon-battle-type-badge[data-type="fire"] { background: #f97316; }
.pokemon-battle-type-badge[data-type="water"] { background: #38bdf8; }
.pokemon-battle-type-badge[data-type="grass"] { background: #22c55e; }
.pokemon-battle-type-badge[data-type="electric"] { background: #facc15; color: #422006; }
.pokemon-battle-type-badge[data-type="poison"] { background: #a855f7; }
.pokemon-battle-type-badge[data-type="psychic"] { background: #ec4899; }
.pokemon-battle-type-badge[data-type="fighting"] { background: #dc2626; }
.pokemon-battle-type-badge[data-type="ground"] { background: #ca8a04; }
.pokemon-battle-type-badge[data-type="flying"] { background: #60a5fa; }
.pokemon-battle-type-badge[data-type="bug"] { background: #84cc16; color: #1a2e05; }
.pokemon-battle-type-badge[data-type="rock"] { background: #a16207; }
.pokemon-battle-type-badge[data-type="ghost"] { background: #6366f1; }
.pokemon-battle-type-badge[data-type="dragon"] { background: #7c3aed; }
.pokemon-battle-type-badge[data-type="dark"] { background: #334155; }
.pokemon-battle-type-badge[data-type="steel"] { background: #64748b; }
.pokemon-battle-type-badge[data-type="fairy"] { background: #f472b6; }
.pokemon-battle-type-badge[data-type="ice"] { background: #67e8f9; color: #083344; }

.pokemon-battle-arena {
  position: relative;
  --enemy-sprite-size: 220px;
  --enemy-sprite-right: 16%;
  --enemy-sprite-bottom: 39%;
  min-height: clamp(330px, 44vw, 420px);
  overflow: hidden;
  background-image: url("../img/pokemon/battle-arena-bg-pAxwctz.png");
  background-size: cover;
  background-position: center 42%;
  isolation: isolate;
}

.pokemon-battle-vs-screen {
  --pokemon-battle-vs-opponent-color: #2563eb;
  --pokemon-battle-vs-player-color: #0f766e;
  position: relative;
  min-height: clamp(330px, 44vw, 420px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  color: #fff;
}

.pokemon-battle-vs-screen.d-none {
  display: none !important;
}

.pokemon-battle-vs-field {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.pokemon-battle-vs-field::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
}

.pokemon-battle-vs-field--opponent {
  border-radius: var(--border-radius-20) var(--border-radius-20) 0px 0px;
  background: linear-gradient(135deg, rgb(0, 0, 0), color-mix(in srgb, var(--pokemon-battle-vs-opponent-color) 36%, #000000));
}

.pokemon-battle-vs-field--opponent::before {
  background: radial-gradient(circle at 74% 52%, color-mix(in srgb, var(--pokemon-battle-vs-opponent-color) 54%, transparent), transparent 52%);
  animation: pokemon-battle-vs-opponent-gradient 2s ease-out both;
}

.pokemon-battle-vs-field--player {
  border-radius: 0px 0px var(--border-radius-20) var(--border-radius-20);
  background: linear-gradient(135deg, color-mix(in srgb, var(--pokemon-battle-vs-player-color) 34%, #000000), rgb(0, 0, 0));
}

.pokemon-battle-vs-field--player::before {
  background: radial-gradient(circle at 26% 50%, color-mix(in srgb, var(--pokemon-battle-vs-player-color) 50%, transparent), transparent 52%);
  animation: pokemon-battle-vs-player-gradient 2s ease-out both;
}

.pokemon-battle-vs-image,
.pokemon-battle-vs-fallback {
  position: absolute;
  z-index: 1;
  object-fit: contain;
  filter: drop-shadow(0 24px 18px rgba(0, 0, 0, .34));
}

.pokemon-battle-vs-image {
  object-fit: contain;
  image-rendering: pixelated;
}

.pokemon-battle-vs-image--trainer,
.pokemon-battle-vs-image--player {
  width: clamp(210px, 34vw, 360px);
  height: clamp(210px, 34vw, 360px);
}

.pokemon-battle-vs-image--pokemon {
  width: clamp(230px, 38vw, 390px);
  height: clamp(230px, 38vw, 390px);
}

.pokemon-battle-vs-field--opponent .pokemon-battle-vs-image {
  right: clamp(.75rem, 5vw, 3.8rem);
  bottom: clamp(-7.5rem, -8vw, -2.4rem);
  animation: pokemon-battle-vs-opponent-slide 3s ease-out both;
}

.pokemon-battle-vs-field--player .pokemon-battle-vs-image {
  left: clamp(.75rem, 5vw, 3.8rem);
  top: clamp(-0.5rem, -8vw, -2.4rem);
  animation: pokemon-battle-vs-player-slide 3s ease-out both;
}

.pokemon-battle-vs-fallback {
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(4rem, 12vw, 7rem);
}

.pokemon-battle-vs-center {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: min(92%, 620px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(.55rem, 2vw, 1rem);
  transform: translate(-50%, -50%);
}

.pokemon-battle-vs-name {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(.9rem, 2vw, 1.2rem);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-vs-name:first-child {
  text-align: right;
}

.pokemon-battle-vs-name:nth-child(3) {
  text-align: left;
}

.pokemon-battle-vs-mark {
  display: inline-grid;
  place-items: center;
  min-width: clamp(62px, 10vw, 96px);
  border-radius: 999px;
  padding: .45rem .65rem;
  font-size: clamp(4.45rem, 6vw, 4.7rem);
}

.pokemon-battle-vs-label {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  font-weight: 800;
  text-align: center;
}

.pokemon-battle-vs-debug-continue {
  position: absolute;
  z-index: 4;
  right: .85rem;
  bottom: .85rem;
}

@keyframes pokemon-battle-vs-opponent-slide {
  from { transform: translateX(22px); }
  to { transform: translateX(-18px); }
}

@keyframes pokemon-battle-vs-player-slide {
  from { transform: translateX(-22px); }
  to { transform: translateX(18px); }
}

@keyframes pokemon-battle-vs-opponent-gradient {
  from { transform: translateX(24px); }
  to { transform: translateX(-18px); }
}

@keyframes pokemon-battle-vs-player-gradient {
  from { transform: translateX(-24px); }
  to { transform: translateX(18px); }
}

@media (prefers-reduced-motion: reduce) {
  .pokemon-battle-vs-field::before,
  .pokemon-battle-vs-image {
    animation: none !important;
  }
}

@media (max-width: 767.98px) {
  .pokemon-battle-vs-screen {
    min-height: 320px;
  }

  .pokemon-battle-vs-image--trainer,
  .pokemon-battle-vs-image--player {
    width: 210px;
    height: 210px;
  }

  .pokemon-battle-vs-image--pokemon {
    width: 230px;
    height: 230px;
  }

  .pokemon-battle-vs-field--opponent .pokemon-battle-vs-image {
    right: .15rem;
    bottom: -2.8rem;
  }

  .pokemon-battle-vs-field--player .pokemon-battle-vs-image {
    left: .15rem;
    top: 1.8rem;
  }

  .pokemon-battle-vs-center {
    width: calc(100% - 1rem);
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: .4rem;
    padding: .55rem .65rem;
  }

  .pokemon-battle-vs-name {
    font-size: .82rem;
  }

  .pokemon-battle-vs-mark {
    min-width: 54px;
    font-size: 2.45rem;
  }

  .pokemon-battle-vs-debug-continue {
    left: .75rem;
    right: .75rem;
    bottom: .75rem;
    width: auto;
  }
}

.pokemon-battle-sprite,
.pokemon-battle-trainer-sprite,
.pokemon-battle-hud {
  position: absolute;
}

.pokemon-battle-hud.is-low-hp {
  box-shadow: 0 0 0 1px rgba(239, 68, 68, .38), 0 14px 32px rgba(239, 68, 68, .18);
}

.pokemon-battle-hud.is-low-hp .pokemon-battle-hp .progress-bar {
  background-color: #ef4444 !important;
  animation: pokemon-battle-danger-pulse .9s ease-in-out infinite;
}

.pokemon-battle-status-pill {
  display: inline-flex;
  align-items: center;
  align-self: start;
  width: fit-content;
  margin-top: .25rem;
  padding: .12rem .45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pokemon-battle-status-color, var(--bs-warning)) 22%, var(--bs-body-bg));
  color: color-mix(in srgb, var(--pokemon-battle-status-color, var(--bs-warning)) 72%, var(--bs-body-color));
  font-size: .66rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pokemon-battle-status-color, var(--bs-warning)) 42%, transparent);
}

.pokemon-battle-status-pill[data-status="burn"] { --pokemon-battle-status-color: #ef4444; }
.pokemon-battle-status-pill[data-status="sleep"] { --pokemon-battle-status-color: #64748b; }
.pokemon-battle-status-pill[data-status="paralysis"] { --pokemon-battle-status-color: #eab308; }
.pokemon-battle-status-pill[data-status="poison"] { --pokemon-battle-status-color: #a855f7; }
.pokemon-battle-status-pill[data-status="freeze"] { --pokemon-battle-status-color: #06b6d4; }

.pokemon-battle-sprite {
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 20px 14px rgba(15, 23, 42, .28));
}

.pokemon-battle-trainer-sprite {
  z-index: 2;
  width: clamp(86px, 11vw, 150px);
  height: clamp(86px, 11vw, 150px);
  right: 35%;
  top: 17%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 14px 14px rgba(15, 23, 42, .24));
}

.pokemon-battle-sprite--enemy {
  width: var(--enemy-sprite-size);
  height: var(--enemy-sprite-size);
  right: var(--enemy-sprite-right);
  top: auto;
  bottom: var(--enemy-sprite-bottom);
  object-position: center bottom;
}

#pokemonBattleModal.is-capture-animating .pokemon-battle-sprite--enemy {
  opacity: 0;
  visibility: hidden;
}

.pokemon-battle-player-sprite-frame {
  position: absolute;
  z-index: 3;
  left: 15%;
  bottom: -10%;
  width: clamp(120px, 22vw, 250px);
  height: clamp(120px, 24vw, 250px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.pokemon-battle-player-sprite-motion {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: center bottom;
}

.pokemon-battle-player-sprite-motion .pokemon-battle-sprite--player {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.pokemon-battle-sprite--player-back {
  object-position: center bottom;
}

.pokemon-battle-sprite--front-fallback {
  object-position: center bottom;
  transform: translateY(4%) scale(.95);
}

.pokemon-battle-sprite--enemy-front,
.pokemon-battle-sprite--team-front {
  object-position: center bottom;
}

.pokemon-battle-hud {
  z-index: 5;
  width: min(360px, 44%);
  padding: .85rem;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
}

.pokemon-battle-hud strong {
  font-size: .95rem;
}

.pokemon-battle-hud__name {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  min-width: 0;
}

.pokemon-battle-hud__captured-icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  object-fit: contain;
}

.pokemon-battle-team-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .22rem;
  margin-top: .34rem;
  margin-bottom: .18rem;
}

.pokemon-battle-team-preview__slot {
  --pokemon-battle-team-ball-size: 1.08rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--pokemon-battle-team-ball-size) + .22rem);
  height: calc(var(--pokemon-battle-team-ball-size) + .22rem);
  border-radius: 999px;
}

.pokemon-battle-team-preview__ball {
  display: block;
  width: var(--pokemon-battle-team-ball-size);
  height: var(--pokemon-battle-team-ball-size);
  background-image: var(--pokemon-battle-pokeball-icon, url("../img/pokemon/pokeball-XHyLlyd.svg"));
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .24);
}

.pokemon-battle-team-preview__slot.is-active {
  background: color-mix(in srgb, var(--bs-primary) 18%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bs-primary) 58%, transparent);
}

.pokemon-battle-team-preview__slot.is-fainted .pokemon-battle-team-preview__ball {
  opacity: .42;
  filter: grayscale(1) saturate(.45);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18);
}

.pokemon-battle-hud small {
  font-size: .72rem;
}

.pokemon-battle-hud--enemy {
  left: 1rem;
  top: 1rem;
}

.pokemon-battle-hud--player {
  right: 1rem;
  bottom: 1rem;
}

.pokemon-battle-hp {
  height: .55rem;
  border-radius: 999px;
}

.pokemon-battle-hp .progress-bar {
  transition: width .78s cubic-bezier(.2, .72, .18, 1), background-color .2s ease;
}

.pokemon-battle-xp {
  height: .45rem;
  border-radius: 999px;
}

.pokemon-battle-xp .progress-bar {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.pokemon-battle-log {
  display: grid;
  gap: .45rem;
  max-height: 180px;
  overflow: auto;
}

.pokemon-battle-controls-layout {
  margin-top: 1rem;
  min-height: 0;
}

.pokemon-battle-controls-column,
.pokemon-battle-live-log-column {
  min-width: 0;
  min-height: 0;
}

.pokemon-battle-live-log-column {
  display: none !important;
}

@media (min-width: 992px) {
  #pokemonBattleModal.is-battle-active .pokemon-battle-live-log-column:not(.d-none) {
    display: block !important;
  }

  #pokemonBattleModal.is-battle-active .pokemon-battle-active-actions-row:not(.d-none) {
    --pokemon-battle-action-scroll-height: clamp(13.25rem, 24vh, 15rem);
    --pokemon-battle-log-scroll-height: clamp(10.75rem, 20vh, 10rem);
    align-items: stretch;
    height: auto;
    min-height: 0;
  }

  #pokemonBattleModal.is-battle-active .pokemon-battle-active-actions-row:not(.d-none) > .pokemon-battle-controls-column,
  #pokemonBattleModal.is-battle-active .pokemon-battle-active-actions-row:not(.d-none) > .pokemon-battle-live-log-column {
    display: flex;
    min-height: 0;
  }

  #pokemonBattleModal.is-battle-active .pokemon-battle-controls,
  #pokemonBattleModal.is-battle-active .pokemon-battle-live-log {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
  }

  #pokemonBattleModal.is-battle-active .pokemon-battle-controls {
    display: flex;
    flex-direction: column;
  }

  #pokemonBattleModal.is-battle-active .pokemon-battle-action-panel {
    flex: 0 1 auto;
    min-height: 0;
    max-height: var(--pokemon-battle-action-scroll-height);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .15rem;
  }
}

.pokemon-battle-live-log {
  position: sticky;
  top: .5rem;
  display: grid;
  gap: .35rem;
  max-height: 100%;
}

.pokemon-battle-live-log .pokemon-battle-log {
  max-height: 150px;
  padding-right: .15rem;
}

.pokemon-battle-live-log__header {
  flex: 0 0 auto;
}

@media (min-width: 992px) {
  .pokemon-battle-live-log {
    position: relative;
    top: auto;
    max-height: none;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .pokemon-battle-live-log .pokemon-battle-log {
    min-height: 0;
    max-height: var(--pokemon-battle-log-scroll-height, 11rem);
    overflow-y: auto;
  }

  .pokemon-battle-live-log__entries {
    min-height: 0;
  }
}

.pokemon-battle-live-log .pokemon-battle-log-item {
  padding: .55rem .6rem;
  border-radius: 12px;
  font-size: .78rem;
  line-height: 1.25;
}

.pokemon-battle-log-item {
  border: 1px solid var(--pokemon-battle-line);
  border-radius: 14px;
  padding: .65rem .75rem;
  background: color-mix(in srgb, var(--bs-body-bg) 78%, transparent);
}

.pokemon-battle-player-sprite-motion.is-attacking-player,
.pokemon-battle-player-sprite-frame.is-attacking-player {
  animation: pokemon-battle-player-attack .32s cubic-bezier(.2, .8, .2, 1);
  transform-origin: center bottom;
  will-change: transform;
}

.pokemon-battle-sprite--enemy.is-attacking-enemy {
  animation: pokemon-battle-enemy-attack .34s ease-in-out;
}

.pokemon-battle-player-sprite-motion.is-entering-player,
.pokemon-battle-sprite--player.is-entering-player {
  animation: pokemon-battle-player-entry .68s cubic-bezier(.19, 1, .22, 1);
}

.pokemon-battle-sprite--enemy.is-entering-enemy {
  animation: pokemon-battle-enemy-entry .68s cubic-bezier(.19, 1, .22, 1);
}

.pokemon-battle-turn-overlay {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  max-width: min(420px, calc(100% - 2rem));
  transform: translate(-50%, -50%);
  border-radius: 22px;
  padding: .8rem 1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(15, 23, 42, .88);
  color: var(--bs-white);
  box-shadow: 0 22px 54px rgba(0, 0, 0, .32);
  font-weight: 900;
  text-align: center;
  pointer-events: none;
}

.pokemon-battle-turn-overlay[data-tone="info"] {
  background: rgba(15, 23, 42, .88);
  color: var(--bs-white);
}

.pokemon-battle-turn-overlay[data-tone="success"] { background: rgba(21, 128, 61, .78); }
.pokemon-battle-turn-overlay[data-tone="warning"] { background: rgba(180, 83, 9, .8); }
.pokemon-battle-turn-overlay[data-tone="danger"] { background: rgba(185, 28, 28, .82); }
.pokemon-battle-turn-overlay[data-tone="muted"] { background: rgba(51, 65, 85, .78); }
.pokemon-battle-turn-overlay[data-tone="minigame-weak"] {
  background: rgba(108, 43, 50, .9);
}
.pokemon-battle-turn-overlay[data-tone="minigame-normal"] {
  background: rgba(108, 91, 28, .9);
}
.pokemon-battle-turn-overlay[data-tone="minigame-perfect"] {
  background: rgba(154, 81, 28, .92);
}
.pokemon-battle-turn-overlay[data-tone="minigame-excellent"] {
  background: rgba(20, 112, 138, .92);
}

.pokemon-battle-minigame {
  position: absolute;
  z-index: 9;
  left: 50%;
  bottom: .85rem;
  width: min(400px, calc(100% - 1.25rem));
  transform: translateX(-50%);
  box-shadow: 0 28px 70px rgba(2, 8, 23, .38) !important;
}

.pokemon-battle-minigame.d-none {
  display: none !important;
}

.pokemon-battle-minigame__panel {
  padding: .75rem;
  text-align: center;
}

.pokemon-battle-minigame__title,
.pokemon-battle-minigame__instruction,
.pokemon-battle-minigame__result {
  font-weight: 900;
  line-height: 1.15;
}

.pokemon-battle-minigame__title {
  font-size: .84rem;
}

.pokemon-battle-minigame__instruction,
.pokemon-battle-minigame__result {
  min-height: 1.1rem;
  font-size: .75rem;
}

.pokemon-battle-minigame__result {
  color: var(--bs-light);
}

.pokemon-battle-minigame__visual {
  display: grid;
  place-items: center;
  min-height: 82px;
}

.pokemon-battle-minigame-gauge {
  position: relative;
  width: 100%;
  height: 1.08rem;
  margin: .28rem 0 .46rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.pokemon-battle-minigame-gauge__zone,
.pokemon-battle-minigame-gauge__needle {
  position: absolute;
  top: 0;
  bottom: 0;
}

.pokemon-battle-minigame-gauge__zone--weak { background: #6c757d; }
.pokemon-battle-minigame-gauge__zone--normal { background: #d9a812; }
.pokemon-battle-minigame-gauge__zone--perfect { background: #fd7e14; }
.pokemon-battle-minigame-gauge__zone--excellent {
  left: 47%;
  width: 6%;
  background: #198754;
}
.pokemon-battle-minigame-gauge__zone--weak-left { left: 0; width: 25%; }
.pokemon-battle-minigame-gauge__zone--normal-left { left: 25%; width: 15%; }
.pokemon-battle-minigame-gauge__zone--perfect-left { left: 40%; width: 7%; }
.pokemon-battle-minigame-gauge__zone--perfect-right { left: 53%; width: 7%; }
.pokemon-battle-minigame-gauge__zone--normal-right { left: 60%; width: 15%; }
.pokemon-battle-minigame-gauge__zone--weak-right { left: 75%; width: 25%; }

.pokemon-battle-minigame-gauge__needle {
  z-index: 2;
  width: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
}

.pokemon-battle-minigame-circle,
.pokemon-battle-minigame-reaction {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, .06);
  transition: background-color .12s ease, transform .12s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.pokemon-battle-minigame-circle:active,
.pokemon-battle-minigame-reaction:active {
  transform: scale(.97);
}

.pokemon-battle-minigame-circle__target,
.pokemon-battle-minigame-circle__ring,
.pokemon-battle-minigame-circle__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.pokemon-battle-minigame-circle__target {
  width: 42px;
  height: 42px;
  border: 2px solid var(--bs-success);
  background: rgba(25, 135, 84, .18);
}

.pokemon-battle-minigame-circle__ring {
  width: 68px;
  height: 68px;
  border: 3px solid var(--bs-warning);
}

.pokemon-battle-minigame-circle__dot {
  width: 10px;
  height: 10px;
  background: #fff;
}

.pokemon-battle-minigame-reaction {
  font-size: 2.15rem;
  font-weight: 900;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.pokemon-battle-minigame-reaction.is-ready {
  border-color: var(--bs-warning);
  background: rgba(255, 193, 7, .16);
  transform: scale(1.04);
}

.pokemon-battle-minigame-reaction__signal {
  opacity: .28;
  position: relative;
  z-index: 1;
  transition: opacity .15s ease;
}

.pokemon-battle-minigame-reaction__signal.is-visible {
  opacity: 1;
}

.pokemon-battle-charge {
  width: 100%;
  display: grid;
  gap: .36rem;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.pokemon-battle-charge__bar {
  position: relative;
  height: 1.24rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
}

.pokemon-battle-charge:focus-visible .pokemon-battle-charge__bar {
  outline: 2px solid rgba(255, 255, 255, .75);
  outline-offset: 3px;
}

.pokemon-battle-charge__zone,
.pokemon-battle-charge__fill,
.pokemon-battle-charge__cursor {
  position: absolute;
  top: 0;
  bottom: 0;
}

.pokemon-battle-charge__zone--early {
  left: 0;
  width: 35%;
  background: #6c757d;
}

.pokemon-battle-charge__zone--safe {
  left: 35%;
  width: 35%;
  background: #d9a812;
}

.pokemon-battle-charge__zone--perfect {
  left: 70%;
  width: 15%;
  background: #fd7e14;
}

.pokemon-battle-charge__zone--excellent {
  left: 78%;
  width: 4%;
  background: #198754;
}

.pokemon-battle-charge__zone--danger {
  left: 85%;
  width: 15%;
  background: #b02a37;
}

.pokemon-battle-charge__fill {
  z-index: 2;
  left: 0;
  width: 0;
  background: rgba(var(--bs-primary-rgb), .38);
}

.pokemon-battle-charge__cursor {
  z-index: 3;
  left: 0;
  width: 4px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
}

.pokemon-battle-charge__labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: .25rem;
  color: rgba(255, 255, 255, .65);
  font-size: .6rem;
  font-weight: 700;
}

.pokemon-battle-charge__labels span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-minigame__action {
  min-width: 126px;
  min-height: 42px;
  font-weight: 900;
  transition: transform .12s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.pokemon-battle-minigame__action:active {
  transform: translateY(1px) scale(.99);
}

.pokemon-battle-modal.is-battle-mini-game .pokemon-battle-controls,
#pokemonBattleModal.is-battle-mini-game .pokemon-battle-controls {
  pointer-events: none;
  opacity: .68;
}

.pokemon-battle-league-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto .5rem;
  padding: .35rem .6rem;
  border: 1px solid var(--pokemon-battle-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
  box-shadow: 0 10px 22px color-mix(in srgb, #020617 10%, transparent);
}

.pokemon-battle-league-timeline.d-none {
  display: none !important;
}

.pokemon-battle-league-timeline__label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.pokemon-battle-league-timeline__steps {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
}

.pokemon-battle-league-timeline__step {
  width: 12px;
  height: 12px;
  border: 2px solid color-mix(in srgb, var(--bs-secondary-color) 46%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-body-bg) 80%, transparent);
}

.pokemon-battle-league-timeline__step.is-complete {
  border-color: #16a34a;
  background: #16a34a;
}

.pokemon-battle-league-timeline__step.is-current {
  border-color: var(--bs-primary);
  background: var(--bs-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bs-primary) 18%, transparent);
}

.pokemon-battle-league-timeline__step.is-locked {
  opacity: .45;
}

.pokemon-battle-capture-stage {
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.pokemon-battle-capture-stage.d-none {
  display: none !important;
}

.pokemon-battle-capture-scene {
  --pokemon-battle-capture-scale: 1;
  --pokemon-battle-throw-drop: clamp(280px, 42vw, 470px);
  position: absolute;
  top: -48px;
  left: calc(100% - var(--enemy-sprite-right) - (var(--enemy-sprite-size) / 2));
  bottom: calc(var(--enemy-sprite-bottom) - 8px);
  width: 150px;
  min-height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  transform: translateX(-50%) scale(var(--pokemon-battle-capture-scale));
  transform-origin: center bottom;
}

.pokemon-battle-ball-shell {
  position: relative;
  z-index: 2;
  transform: scale(2.1);
  transform-origin: center bottom;
  transition: transform .2s ease, opacity .2s ease;
}

.pokemon-battle-ball-shell.escape-left {
  animation: pokemon-battle-escape-left .85s ease forwards;
}

.pokemon-battle-capture-ball {
  position: relative;
  transform-origin: center bottom;
  opacity: 1;
}

.pokemon-battle-capture-ball.open {
  background-position: var(--pokemon-battle-ball-x, 0) var(--pokemon-battle-ball-open-y);
}

.pokemon-battle-capture-ball.shake-once {
  animation: pokemon-battle-shake-once .55s steps(1) 1;
}

.pokemon-battle-capture-ball.captured {
  filter: brightness(.36) saturate(.45);
}

.pokemon-battle-capture-ball.success-pop {
  animation: pokemon-battle-success-pop .45s ease;
}

.pokemon-battle-capture-sparkles {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}

.pokemon-battle-capture-sparkles.show {
  opacity: 1;
}

.pokemon-battle-capture-sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  opacity: 0;
  animation: pokemon-battle-sparkle 1.2s ease-in-out infinite;
}

.pokemon-battle-capture-sparkle::before,
.pokemon-battle-capture-sparkle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: #fff2a8;
  box-shadow: 0 0 10px rgba(255, 244, 161, .7);
  transform: translate(-50%, -50%);
}

.pokemon-battle-capture-sparkle::before {
  width: 3px;
  height: 14px;
}

.pokemon-battle-capture-sparkle::after {
  width: 14px;
  height: 3px;
}

.pokemon-battle-capture-sparkle.s1 { top: 20px; left: 18px; animation-delay: 0s; }
.pokemon-battle-capture-sparkle.s2 { top: 12px; right: 24px; animation-delay: .2s; }
.pokemon-battle-capture-sparkle.s3 { top: 54px; left: 8px; animation-delay: .35s; }
.pokemon-battle-capture-sparkle.s4 { top: 46px; right: 8px; animation-delay: .5s; }
.pokemon-battle-capture-sparkle.s5 { bottom: 44px; left: 28px; animation-delay: .7s; }
.pokemon-battle-capture-sparkle.s6 { bottom: 48px; right: 24px; animation-delay: .9s; }

.pokemon-battle-sprite.is-capture-target {
  animation: pokemon-battle-capture-target .62s ease both;
}

.pokemon-battle-modal.is-battle-busy .pokemon-battle-controls {
  pointer-events: none;
}

@keyframes pokemon-battle-player-attack {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  35% { transform: translate3d(4px, -2px, 0) scale(1.018); }
  62% { transform: translate3d(2px, -1px, 0) scale(1.008); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes pokemon-battle-enemy-attack {
  45% { transform: translate(-22px, 20px); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .pokemon-battle-player-sprite-motion.is-attacking-player,
  .pokemon-battle-player-sprite-frame.is-attacking-player,
  .pokemon-battle-sprite--enemy.is-attacking-enemy {
    animation: none;
  }
}

@keyframes pokemon-battle-player-entry {
  from { opacity: 0; transform: translate(-32px, 14px) scale(.96); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}

@keyframes pokemon-battle-enemy-entry {
  from { opacity: 0; transform: translate(70px, -34px) scale(.9); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}

@keyframes pokemon-battle-throw-visibility {
  0% { opacity: 0; }
  10%, 100% { opacity: 1; }
}

@keyframes pokemon-battle-throw-x {
  0% { transform: translateX(-190%); }
  45% { transform: translateX(-35%); }
  100% { transform: translateX(0); }
}

@keyframes pokemon-battle-throw-y {
  0% {
    transform: translateY(calc(-1 * var(--pokemon-battle-throw-drop))) scaleY(1.05) scaleX(.95);
    animation-timing-function: ease-in;
  }
  35% {
    transform: translateY(0) scaleY(.78) scaleX(1.18);
    animation-timing-function: ease-out;
  }
  52% {
    transform: translateY(-52%) scaleY(1.08) scaleX(.94);
    animation-timing-function: ease-in;
  }
  70% {
    transform: translateY(0) scaleY(.86) scaleX(1.12);
    animation-timing-function: ease-out;
  }
  84% {
    transform: translateY(-22%) scaleY(1.04) scaleX(.98);
    animation-timing-function: ease-in;
  }
  100% { transform: translateY(0) scaleY(1) scaleX(1); }
}

@keyframes pokemon-battle-throw-sprite {
  0% { background-position-y: -40px; }
  8% { background-position-y: -80px; }
  16% { background-position-y: -120px; }
  24% { background-position-y: -160px; }
  32% { background-position-y: -200px; }
  40% { background-position-y: -240px; }
  50% { background-position-y: -280px; }
  60% { background-position-y: -320px; }
  70% { background-position-y: -240px; }
  82% { background-position-y: -160px; }
  92% { background-position-y: -80px; }
  100% { background-position-y: 0; }
}

@keyframes pokemon-battle-throw-sprite-shadow {
  0% {
    opacity: 0;
    transform: translateY(220%) scaleY(.3) scaleX(.3);
  }
  35% {
    opacity: .3;
    transform: translateY(0) scaleY(1) scaleX(1);
  }
  52% {
    opacity: 0;
    transform: translateY(220%) scaleY(.3) scaleX(.3);
  }
  70% {
    opacity: .3;
    transform: translateY(0) scaleY(1) scaleX(1);
  }
  84% {
    opacity: .05;
    transform: translateY(160%) scaleY(.45) scaleX(.45);
  }
  100% {
    opacity: .3;
    transform: translateY(0) scaleY(1) scaleX(1);
  }
}

@keyframes pokemon-battle-shake-once {
  0% { background-position-y: 0; }
  8.33% { background-position-y: -440px; }
  16.66% { background-position-y: -480px; }
  25% { background-position-y: -520px; }
  33.33% { background-position-y: -480px; }
  41.66% { background-position-y: -440px; }
  50% { background-position-y: 0; }
  58.33% { background-position-y: -560px; }
  66.66% { background-position-y: -600px; }
  75% { background-position-y: -640px; }
  83.33% { background-position-y: -600px; }
  91.66% { background-position-y: -560px; }
  100% { background-position-y: 0; }
}

@keyframes pokemon-battle-success-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes pokemon-battle-escape-left {
  0% {
    opacity: 1;
    transform: scale(2.1) translateX(0) translateY(0);
  }
  25% {
    opacity: 1;
    transform: scale(2.1) translateX(-4px) translateY(-4px);
  }
  100% {
    opacity: 0;
    transform: scale(1.65) translateX(-22px) translateY(-18px);
  }
}

@keyframes pokemon-battle-sparkle {
  0% { opacity: 0; transform: scale(.4) rotate(0deg); }
  25% { opacity: 1; transform: scale(1) rotate(45deg); }
  55% { opacity: 1; transform: scale(1.15) rotate(90deg); }
  100% { opacity: 0; transform: scale(.5) rotate(140deg); }
}

@keyframes pokemon-battle-capture-target {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: .28; transform: scale(.72); }
}

@keyframes pokemon-battle-danger-pulse {
  50% { filter: brightness(1.25); box-shadow: 0 0 14px rgba(239, 68, 68, .5); }
}

.pokemon-battle-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: var(--border-radius-20);
}

.pokemon-battle-result-overlay {
  z-index: 30;
}

.pokemon-battle-overlay.d-none {
  display: none !important;
  pointer-events: none;
}

.pokemon-battle-dialog {
  width: min(520px, 100%);
  box-shadow: 0 34px 90px rgba(2, 8, 23, .38), 0 12px 28px rgba(2, 8, 23, .22) !important;
}

.pokemon-battle-result-dialog {
  --pokemon-battle-result-accent: var(--bs-primary);
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
  overflow-y: auto;
}

.pokemon-battle-result-dialog[data-battle-result="victory"],
.pokemon-battle-result-dialog[data-battle-result="captured"] {
  --pokemon-battle-result-accent: var(--bs-primary);
}

.pokemon-battle-result-dialog[data-battle-result="defeat"] {
  --pokemon-battle-result-accent: var(--bs-danger);
}

.pokemon-battle-result-dialog[data-battle-result="flee"] {
  --pokemon-battle-result-accent: var(--bs-info);
}

.pokemon-battle-result-dialog[data-battle-result="abandon"] {
  --pokemon-battle-result-accent: var(--bs-secondary);
}

.pokemon-battle-result-main {
  position: relative;
  min-height: 190px;
}

.pokemon-battle-result-header {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: .35rem;
  max-width: 440px;
}

.pokemon-battle-result-pill {
  background-color: var(--pokemon-battle-result-accent);
  color: var(--bs-white);
}

.pokemon-battle-result-header .h3 {
  color: color-mix(in srgb, var(--pokemon-battle-result-accent) 82%, var(--bs-body-color));
}

.pokemon-battle-result-opponent {
  position: absolute;
  z-index: 1;
  top: -10px;
  right: 0;
  width: 218px;
  height: 224px;
  min-width: 0;
  text-align: center;
  pointer-events: none;
}

.pokemon-battle-result-opponent__visual {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: 206px;
  height: 206px;
  display: grid;
  place-items: center;
}

.pokemon-battle-result-opponent__visual img {
  width: 190px;
  height: 225px;
  object-fit: contain;
  image-rendering: pixelated;
}

.pokemon-battle-result-opponent__visual--pokemon img {
  width: 240px;
  height: 240px;
  max-width: none;
  max-height: none;
}

.pokemon-battle-result-opponent__visual i {
  font-size: 2rem;
}

.pokemon-battle-result-opponent small,
.pokemon-battle-result-opponent strong {
  display: block;
}

.pokemon-battle-result-opponent__text {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 28px;
  width: 206px;
  text-shadow: 0 0 7px black;
}

.pokemon-battle-result-sections,
.pokemon-battle-result-actions {
  position: relative;
  z-index: 4;
}

.pokemon-battle-result-tabs {
  position: relative;
  z-index: 5;
}

.pokemon-battle-result-tabs .nav-link {
  border-radius: var(--border-radius-10, 10px);
  color: var(--bs-secondary-color);
  font-size: .78rem;
  font-weight: 900;
  padding: .42rem .6rem;
  background: color-mix(in srgb, var(--pokemon-battle-result-accent) 48%, rgba(148, 163, 184, .32));
  backdrop-filter: blur(10px);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.pokemon-battle-result-tabs .nav-link.active {
  background: var(--pokemon-battle-result-accent);
  color: #fff;
}

.pokemon-battle-result-section-title {
  margin: 0 0 .55rem;
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pokemon-battle-result-subtitle {
  margin: 0 0 .4rem;
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.pokemon-battle-result-xp-list {
  display: grid;
  gap: .34rem;
  margin-bottom: .62rem;
}

.pokemon-battle-result-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  margin-bottom: .65rem;
}

.pokemon-battle-result-meta__item {
  display: grid;
  gap: .12rem;
  min-width: 0;
  padding: .48rem .55rem;
}

.pokemon-battle-result-meta__item span {
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

.pokemon-battle-result-meta__item strong {
  color: var(--bs-body-color);
  font-size: .84rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pokemon-battle-result-xp-row {
  color: var(--bs-secondary-color);
  font-size: .84rem;
}

.pokemon-battle-result-xp-row strong {
  color: var(--bs-body-color);
  text-align: right;
  white-space: nowrap;
}

.pokemon-battle-result-row {
  color: var(--bs-secondary-color);
  font-size: .84rem;
}

.pokemon-battle-result-row + .pokemon-battle-result-row {
  margin-top: .36rem;
}

.pokemon-battle-result-row strong {
  color: var(--bs-body-color);
  text-align: right;
  overflow-wrap: anywhere;
}

.pokemon-battle-result-badge {
  position: absolute;
  z-index: 1;
  bottom: 26px;
  left: -10px;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.pokemon-battle-result-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .92;
  filter: drop-shadow(0 .35rem .65rem rgba(0, 0, 0, .28));
}

.pokemon-battle-result-badge__fallback,
.pokemon-battle-result-badge-name {
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
}

.pokemon-battle-result-badge__fallback {
  max-width: 90px;
  color: var(--bs-secondary-color);
  text-align: center;
}

.pokemon-battle-controls .bi {
  display: none;
}

.pokemon-battle-action--flee-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  font-weight: 800;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.pokemon-battle-action--flee-control.pokemon-battle-action--flee {
  --bs-btn-color: #78350f;
  color: var(--bs-btn-color) !important;
}

.pokemon-battle-action--flee-control.pokemon-battle-action--abandon {
  --bs-btn-color: #fff;
  color: var(--bs-btn-color) !important;
}

.pokemon-battle-action--flee-control:hover,
.pokemon-battle-action--flee-control:focus-visible {
  background-color: var(--bs-btn-hover-bg) !important;
  border-color: var(--bs-btn-hover-border-color) !important;
  color: var(--bs-btn-hover-color) !important;
}

.pokemon-battle-action--flee-control:active {
  background-color: var(--bs-btn-active-bg) !important;
  border-color: var(--bs-btn-active-border-color) !important;
  color: var(--bs-btn-active-color) !important;
}

.pokemon-battle-pagination .page-link {
  border: 1px solid #d8deeb2c;
  background: #fff;
  color: #34405f;
  border-radius: var(--border-radius-10) !important;
  min-width: 30px;
  text-align: center;
}

.pokemon-battle-pagination .page-item.active .page-link {
  border-color: #2d63d3;
  background: #2d63d3;
  color: #fff;
}

.pokemon-battle-pagination .page-item.disabled .page-link {
  opacity: .55;
}

.pokemon-battle-pagination-wrap--mini .btn {
  min-width: 36px;
  padding-inline: .55rem;
}

[data-bs-theme="dark"] .pokemon-battle-pagination .page-link {
  background: var(--my-dark-bg-subtle, #1f242a);
  color: #d0d8e6;
}

[data-bs-theme="dark"] .pokemon-battle-modal {
  --pokemon-battle-panel: rgba(15, 23, 42, .78);
  --pokemon-battle-line: rgba(148, 163, 184, .25);
}

[data-bs-theme="dark"] .pokemon-battle-move-choice[data-type],
[data-bs-theme="dark"] .pokemon-battle-attack-card[data-type] {
  background: color-mix(in srgb, var(--pokemon-battle-type-color, #64748b) 15%, rgba(15, 23, 42, .86));
}

[data-bs-theme="dark"] .pokemon-battle-mode-card--primary {
  background: color-mix(in srgb, #0ea5e9 18%, rgba(15, 23, 42, .86));
}

[data-bs-theme="dark"] .pokemon-battle-arena {
  box-shadow: 0 24px 70px rgba(2, 8, 23, .45);
}

@media (max-width: 860px) {

  .pokedex-battle-modal__pokebattle {
    top: -9px;
    left: -37px;
    width: 170px;
  }

  .pokemon-battle-bag-grid,
  .pokemon-battle-opponent-modes {
    grid-template-columns: 1fr;
  }

  .pokemon-battle-hub-card,
  .pokemon-battle-hub-card:hover,
  .pokemon-battle-hub-card:focus-visible {
    overflow: hidden;
    transform: none;
  }

  .pokemon-battle-hub-card__content {
    max-width: 72%;
  }

  .pokemon-battle-choice-section--quick {
    height: auto;
  }

  .pokemon-battle-quick-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    padding-bottom: 0;
    gap: .4rem;
  }

  .pokemon-battle-quick-choice {
    min-width: 0;
    min-height: 56px;
    padding: .42rem .32rem;
  }

  .pokemon-battle-quick-choice span {
    max-width: 10ch;
    font-size: .74rem;
    line-height: 1.1;
    white-space: normal;
  }

  .pokemon-battle-combat-mobile {
    display: grid;
    gap: .65rem;
    min-width: 0;
  }

  .pokemon-battle-mobile-pagination .btn {
    min-width: 86px;
    min-height: 38px;
    display: inline-grid;
    place-items: center;
    padding: .35rem .65rem;
    font-size: .72rem;
    font-weight: 800;
  }

  .pokemon-battle-mobile-pagination span {
    min-width: 3.2rem;
    color: var(--bs-secondary-color);
    font-size: .78rem;
    font-weight: 800;
    text-align: center;
  }

  .pokemon-battle-combat-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .25rem;
    border-bottom: 0;
  }

  .pokemon-battle-combat-mobile-tabs .nav-link {
    min-width: 0;
    width: 100%;
    border: 1px solid var(--pokemon-battle-line);
    border-radius: var(--border-radius-10);
    background: color-mix(in srgb, var(--bs-body-bg) 86%, transparent);
    color: var(--bs-secondary-color);
    padding: .42rem .2rem;
    font-size: .62rem;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
  }

  .pokemon-battle-combat-mobile-tabs .nav-link.active {
    border-color: color-mix(in srgb, var(--bs-primary) 38%, var(--pokemon-battle-line));
    background: color-mix(in srgb, var(--bs-primary) 10%, var(--bs-body-bg));
    color: var(--bs-body-color);
  }

  .pokemon-battle-combat-mobile-panels {
    min-width: 0;
  }

  .pokemon-battle-combat-mobile-panel {
    display: none;
    min-width: 0;
  }

  .pokemon-battle-combat-mobile-panel.is-active {
    display: block;
  }

  .pokemon-battle-mobile-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .25rem;
    overflow: visible;
    padding: .04rem .02rem .2rem;
  }

  .pokemon-battle-mobile-card-grid > div {
    min-width: 0;
    min-height: 58px;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card--avatar {
    width: 100%;
    height: 100%;
    min-height: 58px;
    border-radius: var(--border-radius-10);
    padding: .16rem;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card__avatar img {
    width: 104%;
    height: 104%;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card--public-team {
    padding: 0;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card--public-team .pokemon-battle-mode-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card--avatar > span:last-child {
    inset: auto .12rem .12rem;
    max-width: calc(100% - .24rem);
    padding: .08rem .14rem;
    border-radius: var(--border-radius-10);
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card--avatar strong {
    line-height: 1;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card-wrap {
    width: 100%;
    height: 100%;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card__info-button {
    top: .16rem;
    left: .16rem;
    width: 1rem;
    height: 1rem;
    font-size: .56rem;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card__placeholder {
    width: 30px;
    height: 30px;
    font-size: .78rem;
  }

  .pokemon-battle-mobile-card-grid .pokemon-battle-mode-card--placeholder .pokemon-battle-mode-card__avatar {
    width: 30px;
    height: 30px;
  }

  .pokemon-battle-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 1065;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    min-height: 100dvh;
    padding: max(.5rem, env(safe-area-inset-top, 0px)) .5rem max(.5rem, env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    overflow: hidden;
  }

  .pokemon-battle-result-dialog {
    display: flex;
    flex-direction: column;
    width: min(100%, 520px);
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    overflow: hidden;
    padding: .65rem !important;
  }

  .pokemon-battle-result-main {
    flex: 0 0 auto;
    margin-bottom: .4rem;
  }

  .pokemon-battle-result-header {
    justify-items: center;
    text-align: center;
    max-width: none;
  }

  .pokemon-battle-result-header .h3 {
    font-size: 2rem;
  }

  .pokemon-battle-result-header p {
    font-size: .78rem;
    line-height: 1.18;
  }

  .pokemon-battle-result-opponent {
    top: 48px;
    right: 0;
    left: 0;
    width: 100%;
    height: 92px;
    justify-items: center;
    text-align: center;
    padding: .5rem !important;
  }

  .pokemon-battle-result-opponent__visual {
    top: 50px;
    right: calc(50% - 10%);
    width: 128px;
    height: 128px;
  }

  .pokemon-battle-result-opponent__visual img {
    max-width: 200px;
    max-height: 200px;
  }

  .pokemon-battle-result-opponent__visual--pokemon img {
    width: 126px;
    height: 126px;
    max-width: none;
    max-height: none;
  }

  .pokemon-battle-result-opponent__text {
    right: calc(50% - 105px);
    bottom: calc(10% - 100px);
    width: 210px;
    font-size: .78rem;
  }

  .pokemon-battle-result-tabs {
    flex: 0 0 auto;
    margin-bottom: .45rem !important;
  }

  .pokemon-battle-result-sections {
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: .55rem !important;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: .1rem;
  }

  .pokemon-battle-result-panel {
    display: none;
  }

  .pokemon-battle-result-panel.is-active {
    display: block;
  }

  .pokemon-battle-result-card > div {
    padding: .55rem !important;
  }

  .pokemon-battle-result-section-title,
  .pokemon-battle-result-subtitle {
    margin-bottom: .35rem;
    font-size: .66rem;
  }

  .pokemon-battle-result-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .32rem;
    margin-bottom: .45rem;
  }

  .pokemon-battle-result-meta__item {
    padding: .38rem .42rem;
  }

  .pokemon-battle-result-meta__item span {
    font-size: .58rem;
  }

  .pokemon-battle-result-meta__item strong {
    font-size: .75rem;
  }

  .pokemon-battle-result-row,
  .pokemon-battle-result-xp-row {
    font-size: .78rem;
  }

  .pokemon-battle-result-row + .pokemon-battle-result-row {
    margin-top: .24rem;
  }

  .pokemon-battle-result-xp-list {
    gap: .22rem;
    margin-bottom: .45rem;
  }

  .pokemon-battle-result-badge {
    top: 14px;
    left: calc(50% - 70px);
    width: 58px;
    height: 58px;
  }

  .pokemon-battle-result-badge__fallback {
    max-width: 58px;
    font-size: .58rem;
  }

  .pokemon-battle-result-actions {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem !important;
    margin-top: auto;
    padding-top: .5rem;
    padding-bottom: max(.1rem, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(148, 163, 184, .22);
  }

  .pokemon-battle-result-actions .btn {
    width: 100%;
    min-height: 40px;
    padding-top: .42rem;
    padding-bottom: .42rem;
    white-space: normal;
  }

  .pokemon-battle-result-actions .btn:nth-child(3) {
    grid-column: 1 / -1;
  }

  .pokemon-battle-trainer-tabs {
    width: auto;
    max-width: 100%;
  }

  .pokemon-battle-trainer-tabs button {
    flex: 1 1 auto;
  }

  .pokemon-battle-league-timeline {
    width: 100%;
    justify-content: space-between;
    gap: .45rem;
  }

  .pokemon-battle-league-timeline__label span {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pokemon-battle-bag-grid--balls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pokemon-battle-action-panel[data-battle-active-panel="bag"] {
    max-height: min(42vh, 310px);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .15rem;
  }

  .pokemon-battle-bag-layout,
  .pokemon-battle-bag-section {
    min-height: 0;
    gap: .45rem;
  }

  .pokemon-battle-bag-layout {
    gap: .55rem;
  }

  .pokemon-battle-bag-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
  }

  .pokemon-battle-bag-item {
    min-height: 0;
    border-radius: var(--border-radius-10, 10px);
    padding: .42rem;
    gap: .35rem;
    font-size: .78rem;
    line-height: 1.15;
  }

  .pokemon-battle-bag-item__visual {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .pokemon-battle-bag-item__visual img {
    padding: 3px;
  }

  .pokemon-battle-bag-item strong {
    font-size: .8rem;
    line-height: 1.05;
  }

  .pokemon-battle-bag-item small {
    font-size: .66rem;
    line-height: 1.08;
  }

  .pokemon-battle-bag-grid:not(.pokemon-battle-bag-grid--balls) .pokemon-battle-bag-item > small:last-child {
    display: none;
  }

  .pokemon-battle-bag-targets {
    gap: .25rem;
    margin-top: .1rem;
  }

  .pokemon-battle-bag-targets .btn {
    padding: .12rem .3rem;
    font-size: .64rem;
    line-height: 1.1;
  }

  .pokemon-battle-bag-note {
    border-radius: var(--border-radius-10);
    padding: .38rem .45rem;
    font-size: .66rem;
    line-height: 1.12;
  }

  .pokemon-battle-ball-choice {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .pokemon-battle-ball-choice__image,
  .pokemon-battle-ball-choice__fallback {
    width: 30px;
    height: 30px;
    border-radius: var(--border-radius-10);
  }

  .pokemon-battle-ball-choice__image {
    padding: 3px;
  }

  .pokemon-battle-team-list,
  .pokemon-battle-switch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pokemon-battle-move-grid {
    grid-template-columns: repeat(2, minmax(136px, 148px));
    justify-content: center;
    overflow-x: hidden;
  }

  .pokemon-battle-attack-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pokemon-battle-controls {
    padding: .65rem !important;
  }

  .pokemon-battle-controls [role="group"] {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .35rem !important;
  }

  .pokemon-battle-controls [data-battle-panel],
  .pokemon-battle-controls [data-battle-flee] {
    width: 100%;
    min-height: 38px;
    margin-left: 0 !important;
    padding: .35rem .25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
  }

  .pokemon-battle-controls .bi {
    display: inline-grid;
    place-items: center;
    font-style: normal;
    line-height: 1;
  }

  .pokemon-battle-controls .bi-lightning-charge::before { content: "⚡"; }
  .pokemon-battle-controls .bi-bag::before { content: "▣"; }
  .pokemon-battle-controls .bi-people::before { content: "◉"; }
  .pokemon-battle-controls .bi-box-arrow-right::before { content: "↪"; }

  .pokemon-battle-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .pokemon-battle-choice-section {
    gap: .5rem;
    padding: .7rem 0 !important;
  }

  .pokemon-battle-choice-section--list,
  .pokemon-battle-choice-section--leagues {
    overflow: hidden;
  }

  .pokemon-battle-league-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
  }

  .pokemon-battle-league-region-card {
    border-radius: var(--border-radius-10);
  }

  .pokemon-battle-league-region-card > strong {
    margin-bottom: .26rem;
    font-size: .62rem;
    line-height: 1.05;
  }

  .pokemon-battle-league-region-card__items {
    --pokemon-battle-region-bg-opacity: .42;
    --pokemon-battle-region-bg-size: 104%;
    --pokemon-battle-region-overlay-left: rgba(2, 6, 23, .88);
    gap: .28rem;
  }

  .pokemon-battle-league-choice {
    min-height: 54px;
    grid-template-columns: 1fr;
    gap: .18rem;
    padding: .3rem;
    border-radius: var(--border-radius-10);
  }

  .pokemon-battle-league-choice strong {
    font-size: .56rem;
  }

  .pokemon-battle-league-choice small {
    font-size: .52rem;
    line-height: 1.05;
  }

  .pokemon-battle-league-choice__status {
    margin-top: .06rem;
  }

  .pokemon-battle-arena {
    --enemy-sprite-size: 130px;
    --enemy-sprite-right: 7%;
    --enemy-sprite-bottom: 43%;
    min-height: 250px;
  }

  .pokemon-battle-turn-overlay {
    max-width: min(260px, calc(100% - 1rem));
    border-radius: var(--border-radius-10);
    padding: .42rem .55rem;
    font-size: .78rem;
    line-height: 1.18;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .2);
  }

  .pokemon-battle-minigame {
    bottom: .5rem;
    width: min(320px, calc(100% - .7rem));
  }

  .pokemon-battle-minigame__panel {
    border-radius: var(--border-radius-10);
    padding: .52rem .58rem .62rem;
  }

  .pokemon-battle-minigame__visual {
    min-height: 78px;
  }

  .pokemon-battle-minigame-gauge {
    height: .95rem;
    margin-block: .24rem .36rem;
  }

  .pokemon-battle-charge__bar {
    height: 1.05rem;
  }

  .pokemon-battle-charge__labels {
    font-size: .54rem;
  }

  .pokemon-battle-minigame-circle,
  .pokemon-battle-minigame-reaction {
    width: 96px;
    height: 96px;
  }

  .pokemon-battle-minigame__action {
    width: 100%;
    min-height: 44px;
  }

  .pokemon-battle-hud {
    width: 156px;
    padding: .65rem;
  }

  .pokemon-battle-hud strong,
  .pokemon-battle-hud span {
    font-size: .72rem;
  }

  .pokemon-battle-hud small,
  .pokemon-battle-hud .small {
    font-size: .62rem;
  }

  .pokemon-battle-team-preview {
    gap: .12rem;
    margin-top: .24rem;
    margin-bottom: .12rem;
  }

  .pokemon-battle-team-preview__slot {
    --pokemon-battle-team-ball-size: .78rem;
    width: calc(var(--pokemon-battle-team-ball-size) + .16rem);
    height: calc(var(--pokemon-battle-team-ball-size) + .16rem);
  }

  .pokemon-battle-hp {
    height: .36rem;
  }

  .pokemon-battle-xp {
    height: .28rem;
  }

  .pokemon-battle-hud .pokemon-battle-type-badge {
    min-height: .9rem;
    padding: .09rem .28rem;
    font-size: .52rem;
  }

  .pokemon-battle-sprite--enemy {
    width: var(--enemy-sprite-size);
    height: var(--enemy-sprite-size);
    right: var(--enemy-sprite-right);
    top: auto;
    bottom: var(--enemy-sprite-bottom);
  }

  #pokemonBattleModal.is-battle-active .pokemon-battle-sprite--enemy {
    width: var(--enemy-sprite-size) !important;
    height: var(--enemy-sprite-size) !important;
    right: var(--enemy-sprite-right) !important;
    top: auto !important;
    bottom: var(--enemy-sprite-bottom) !important;
  }

  .pokemon-battle-capture-scene {
    --pokemon-battle-capture-scale: .7;
    --pokemon-battle-throw-drop: 230px;
    width: 132px;
    min-height: 132px;
  }

  .pokemon-battle-trainer-sprite {
    width: 82px;
    height: 82px;
    right: 39%;
    top: 22%;
  }

  .pokemon-battle-player-sprite-frame {
    left: 2%;
    bottom: -6%;
    width: clamp(96px, 34vw, 150px);
    height: clamp(96px, 34vw, 150px);
  }

  .pokemon-battle-team-layout > .col-12.col-lg-5{
    display: block;
    min-height: 0;
  }

  .pokemon-battle-team-layout > .col-12.col-lg-7 {
    display: block;
    min-height: 0;
  }

  .pokemon-battle-team-layout {
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible !important;
    overscroll-behavior: contain;
  }

  .pokemon-battle-team-layout [data-battle-team-mobile-panel] {
    display: none !important;
    min-height: 0 !important;
  }

  .pokemon-battle-team-layout [data-battle-team-mobile-panel].pokemon-battle-mobile-panel-active {
    display: flex !important;
    min-height: 0;
  }

  .pokemon-battle-team-layout [data-battle-team-mobile-panel="captured"].pokemon-battle-mobile-panel-active {
    display: grid !important;
    min-height: auto;
  }

  .pokemon-battle-team-layout [data-battle-team-mobile-panel="moves"].pokemon-battle-mobile-panel-active {
    margin-top: 0 !important;
    padding-block: .65rem !important;
    max-height: none;
  }

  .pokemon-battle-move-editor {
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .pokemon-battle-move-editor__header {
    margin-bottom: .5rem !important;
  }

  .pokemon-battle-move-grid {
    flex: 0 1 auto;
    max-height: min(46dvh, 360px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .pokemon-battle-team-layout > .col-12.col-lg-5 > .pokemon-battle-panel:last-child,
  .pokemon-battle-team-layout > .col-12.col-lg-7 > .pokemon-battle-panel:last-child {
    flex: none;
  }

  .pokemon-battle-team-card {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: .35rem;
    padding: .55rem;
    text-align: center;
    min-height: 118px;
    max-height: 138px;
  }

  .pokemon-battle-team-card__actions {
    justify-content: center;
    gap: .25rem;
  }

  .pokemon-battle-team-card__actions .btn {
    padding: .15rem .35rem;
    font-size: .72rem;
  }

  .pokemon-battle-switch-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .pokemon-battle-switch-card__meta {
    width: 100%;
  }

  .pokemon-battle-switch-card__meta strong {
    font-size: .68rem;
  }

  .pokemon-battle-switch-card__meta small,
  .pokemon-battle-switch-card__hp {
    font-size: .62rem;
  }
}

@media (min-width: 861px) and (max-width: 1199px) {
  .pokemon-battle-move-grid {
    grid-template-columns: repeat(3, minmax(160px, 170px));
  }
}

@media (max-width: 520px) {
  .pokemon-battle-league-region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pokemon-battle-move-grid {
    width: 100%;
    max-width: 350px;
    grid-template-columns: repeat(2, minmax(135px, 1fr));
    gap: 10px;
  }

  .pokemon-battle-attack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pokemon-battle-attack-card .pokemon-battle-type-badge {
    display: none;
  }

  .pokemon-battle-bag-grid,
  .pokemon-battle-bag-grid--balls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pokemon-battle-battle-header:not(.d-none) {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .pokemon-battle-battle-header__title {
    grid-column: 1 / -1;
    order: -1;
  }
}

@media (max-width: 340px) {
  .pokemon-battle-move-grid {
    max-width: 180px;
    grid-template-columns: minmax(150px, 1fr);
  }
}

/* Battle hub and team builder refresh */
@media (min-width: 1200px) {
  #pokemonBattleModal.is-team-management-view .modal-dialog {
    max-width: min(1420px, calc(100vw - 2.5rem));
  }
}

.pokemon-battle-hub {
  min-height: min(58vh, 560px);
}

.pokemon-battle-hub-card {
  overflow: hidden !important;
  background: var(--pokemon-battle-hub-card-bg-fallback) !important;
}

.pokemon-battle-hub-card--feature {
  min-height: 520px;
  padding: clamp(1rem, 2vw, 1.45rem);
  align-content: end;
}

.pokemon-battle-hub-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(5, 10, 20, 0.062), rgba(5, 10, 20, .52));
  pointer-events: none;
}

.pokemon-battle-hub-card:hover,
.pokemon-battle-hub-card:focus-visible {
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
  filter: brightness(1.04);
  transform: scale(1.02);
}

.pokemon-battle-hub-card:hover::before,
.pokemon-battle-hub-card:focus-visible::before {
  transform: scale(1.035);
}

.pokemon-battle-hub-card__content {
  justify-items: center;
  width: 100%;
  max-width: none;
  padding: .5rem .75rem;
  text-align: center;
  border-radius: 0;
  background: transparent;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .38);
}


.pokemon-battle-hub-card strong {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.05;
}

.pokemon-battle-hub-side {
  min-height: 500px;
}

.pokemon-battle-hub-team-summary__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}

.pokemon-battle-hub-team-slot {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: .15rem;
  text-align: center;
}

.pokemon-battle-hub-team-slot__sprite {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--bs-secondary-color);
  font-weight: 900;
}

.pokemon-battle-hub-team-slot__sprite img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  image-rendering: pixelated;
}

.pokemon-battle-hub-team-slot__name,
.pokemon-battle-hub-team-slot__level {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-hub-team-slot__name {
  font-size: .68rem;
  font-weight: 900;
}

.pokemon-battle-hub-team-slot__level {
  color: var(--bs-secondary-color);
  font-size: .62rem;
  font-weight: 800;
}

.pokemon-battle-team-layout > .col-12 {
  min-height: 0 !important;
}

.pokemon-battle-team-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .65rem;
  max-height: none;
  overflow: visible;
}

.pokemon-battle-team-card {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 100%;
  max-height: none;
  padding: .6rem;
  border-radius: var(--border-radius-10, 10px);
  text-align: center !important;
}

.pokemon-battle-team-card__sprite {
  width: 70px;
  height: 70px;
}

.pokemon-battle-team-card__sprite img {
  width: 68px;
  height: 68px;
}

.pokemon-battle-team-card__meta {
  display: grid;
  gap: .1rem;
  width: 100%;
}

.pokemon-battle-team-card__meta strong,
.pokemon-battle-team-card__meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-team-card__actions {
  min-height: 26px;
  justify-content: center;
}

.pokemon-battle-team-card__actions .btn {
  min-width: 30px;
  min-height: 26px;
  padding: .08rem .34rem;
  font-size: .78rem;
  line-height: 1;
}

.pokemon-battle-team-card__actions [aria-disabled="true"] {
  opacity: .36;
}

.pokemon-battle-team-card--empty {
  color: var(--bs-secondary-color);
  border-style: dashed;
}

.pokemon-battle-captured-select {
  max-width: 230px;
}

.pokemon-battle-captured-grid-wrap {
  min-height: 0;
  overflow: visible;
}

.pokemon-battle-captured-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .45rem;
}

.pokemon-battle-captured-card {
  position: relative;
  min-width: 0;
  min-height: 116px;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: .08rem;
  padding: 4.9rem .24rem .38rem;
  border: 1px solid var(--pokemon-battle-line);
  border-radius: var(--border-radius-10, 10px);
  background: color-mix(in srgb, var(--bs-body-bg) 84%, transparent);
  color: var(--bs-body-color);
  overflow: hidden;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.pokemon-battle-captured-card:hover,
.pokemon-battle-captured-card:focus-visible,
.pokemon-battle-captured-card.is-selected {
  border-color: color-mix(in srgb, var(--bs-primary) 55%, var(--pokemon-battle-line));
  background: color-mix(in srgb, var(--bs-primary) 9%, var(--bs-body-bg));
}

.pokemon-battle-captured-card.is-in-team::after {
  content: "";
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: var(--bs-success);
}

.pokemon-battle-captured-card.is-other-team-locked {
  border-color: color-mix(in srgb, var(--bs-warning) 48%, var(--pokemon-battle-line));
}

.pokemon-battle-captured-card__badges {
  position: absolute;
  top: .32rem;
  left: .32rem;
  right: .32rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: .18rem;
  pointer-events: none;
}

.pokemon-battle-captured-card__team-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .12rem .34rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-warning) 88%, #111827);
  color: #111827;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .16);
  font-size: .58rem;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-captured-card__sprite {
  position: absolute;
  top: .25rem;
  left: 0;
  right: 0;
  height: 82px;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.pokemon-battle-captured-card__sprite img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  image-rendering: pixelated;
  transform: translateY(8px);
}

.pokemon-battle-captured-card__name,
.pokemon-battle-captured-card__level {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-captured-card__name {
  position: relative;
  z-index: 1;
  font-size: .68rem;
  font-weight: 900;
}

.pokemon-battle-captured-card__level {
  position: relative;
  z-index: 1;
  color: var(--bs-secondary-color);
  font-size: .62rem;
  font-weight: 800;
}

.pokemon-battle-selected-identity {
  gap: .7rem;
}

.pokemon-battle-selected-identity__top {
  padding-right: 2rem;
}

.pokemon-battle-selected-identity .pokemon-battle-info__sprite {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
}

.pokemon-battle-selected-identity .pokemon-battle-info__sprite img {
  width: 96px;
  height: 96px;
}

.pokemon-battle-info-xp {
  max-width: 320px;
}

.pokemon-battle-selected-key-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}

.pokemon-battle-selected-key-info span {
  min-width: 0;
  display: grid;
  gap: .08rem;
  padding: .45rem .5rem;
  border: 1px solid var(--pokemon-battle-line);
  border-radius: var(--border-radius-10, 10px);
  background: color-mix(in srgb, var(--bs-body-bg) 80%, transparent);
}

.pokemon-battle-selected-key-info small {
  color: var(--bs-secondary-color);
  font-size: .64rem;
  font-weight: 800;
}

.pokemon-battle-selected-key-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
}

.pokemon-battle-stats-radar {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
}

.pokemon-battle-stats-radar svg {
  width: 128px;
  height: 128px;
}

.pokemon-battle-stats-radar line,
.pokemon-battle-stats-radar__ring {
  fill: none;
  stroke: var(--pokemon-battle-line);
  stroke-width: 1;
}

.pokemon-battle-stats-radar text {
  fill: var(--bs-secondary-color);
  font-size: 7px;
  font-weight: 900;
  text-anchor: middle;
}

.pokemon-battle-stats-radar__ring--inner {
  opacity: .7;
}

.pokemon-battle-stats-radar__shape {
  fill: color-mix(in srgb, var(--bs-primary) 34%, transparent);
  stroke: color-mix(in srgb, var(--bs-primary) 72%, #fff);
  stroke-width: 1.4;
}

.pokemon-battle-stats-radar__values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .28rem .45rem;
}

.pokemon-battle-stats-radar__values span {
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  color: var(--bs-secondary-color);
  font-size: .72rem;
  font-weight: 800;
}

.pokemon-battle-stats-radar__values strong {
  color: var(--bs-body-color);
}

.pokemon-battle-move-editor {
  position: relative;
  overflow: visible;
}

.pokemon-battle-selected-moves-list,
.pokemon-battle-move-list {
  display: grid;
  gap: .45rem;
}

.pokemon-battle-move-row {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  padding: .52rem .6rem;
  border: 1px solid var(--pokemon-battle-line);
  border-radius: var(--border-radius-10, 10px);
  background: color-mix(in srgb, var(--pokemon-battle-type-color, var(--bs-primary)) 8%, var(--bs-body-bg));
  color: var(--bs-body-color);
  text-align: left;
}

.pokemon-battle-move-row.is-selected {
  border-color: color-mix(in srgb, var(--pokemon-battle-type-color, var(--bs-primary)) 52%, var(--pokemon-battle-line));
}

.pokemon-battle-move-row.is-locked {
  opacity: .56;
}

.pokemon-battle-move-row__check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--pokemon-battle-line);
  border-radius: 50%;
}

.pokemon-battle-move-row__check.is-checked {
  border-color: var(--bs-primary);
  background: radial-gradient(circle, var(--bs-primary) 45%, transparent 48%);
}

.pokemon-battle-move-row__main {
  min-width: 0;
  display: grid;
  gap: .1rem;
}

.pokemon-battle-move-row__main .pokemon-battle-move-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-battle-move-row__meta {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: .25rem;
}

.pokemon-battle-move-row__meta small,
.pokemon-battle-move-row__main small {
  color: var(--bs-secondary-color);
  font-size: .68rem;
  font-weight: 800;
}

.pokemon-battle-move-row__details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .12rem .3rem;
  min-width: 0;
  line-height: 1.18;
}

@media (min-width: 992px) and (max-height: 850px) {
  #pokemonBattleModal.is-team-management-view {
    --pokemon-battle-modal-max-height: calc(100dvh - 1rem);
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-modal__header {
    padding-top: .75rem;
    padding-bottom: .55rem;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-modal__body {
    padding-top: .75rem !important;
    padding-bottom: .75rem !important;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-team-management__header > .mb-3 {
    margin-bottom: .65rem !important;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-team-layout {
    --bs-gutter-y: .65rem;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-team-layout .pokemon-battle-panel {
    padding: .75rem !important;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-team-strip {
    gap: .45rem;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-selected-moves-list,
  #pokemonBattleModal.is-team-management-view .pokemon-battle-move-list {
    gap: .34rem;
  }

  .pokemon-battle-result-dialog {
    max-height: calc(100dvh - 1rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: .85rem !important;
  }

  .pokemon-battle-result-main {
    min-height: 150px;
    margin-bottom: .65rem !important;
  }

  .pokemon-battle-result-header .h3 {
    font-size: 1.35rem;
    margin-bottom: .1rem !important;
  }

  .pokemon-battle-result-header p {
    font-size: .9rem;
    line-height: 1.25;
  }

  .pokemon-battle-result-opponent {
    top: -4px;
    width: 176px;
    height: 178px;
  }

  .pokemon-battle-result-opponent__visual {
    width: 166px;
    height: 166px;
  }

  .pokemon-battle-result-opponent__visual img {
    max-width: 182px;
    max-height: 182px;
  }

  .pokemon-battle-result-opponent__visual--pokemon img {
    width: 178px;
    height: 178px;
  }

  .pokemon-battle-result-opponent__text {
    bottom: 16px;
    width: 166px;
  }

  .pokemon-battle-result-sections {
    --bs-gutter-y: .65rem;
    margin-bottom: .75rem !important;
  }

  .pokemon-battle-result-card > div {
    padding: .75rem !important;
  }

  .pokemon-battle-result-meta {
    gap: .38rem;
    margin-bottom: .5rem;
  }

  .pokemon-battle-result-row + .pokemon-battle-result-row {
    margin-top: .26rem;
  }

  .pokemon-battle-result-xp-list {
    gap: .24rem;
    margin-bottom: .45rem;
  }
}

@media (max-width: 1199.98px) {
  .pokemon-battle-team-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pokemon-battle-captured-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .pokemon-battle-hub {
    min-height: 0;
  }

  .pokemon-battle-hub-card--feature,
  .pokemon-battle-hub-side {
    min-height: 120px;
  }

  .pokemon-battle-captured-select {
    max-width: 100%;
    width: 100%;
  }

  .pokemon-battle-team-mobile-tabs {
    margin-bottom: 0 !important;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-team-management__body {
    padding-top: .65rem;
  }

  #pokemonBattleModal.is-team-management-view .pokemon-battle-team-layout [data-battle-team-mobile-panel].pokemon-battle-mobile-panel-active {
    margin-top: .65rem !important;
  }

  .pokemon-battle-team-mobile-tabs + .pokemon-battle-team-layout {
    --bs-gutter-y: .65rem;
    margin-top: 0 !important;
    padding-top: .85rem;
  }

  .pokemon-battle-team-actions {
    justify-content: space-between !important;
  }

  .pokemon-battle-team-actions__primary,
  .pokemon-battle-team-actions__secondary {
    flex: 0 1 auto;
  }

  .pokemon-battle-team-actions__secondary {
    justify-content: flex-end;
  }

  .pokemon-battle-captured-controls {
    width: 100%;
  }

}

@media (max-width: 860px) {
  .pokemon-battle-team-layout [data-battle-team-mobile-panel="details"].pokemon-battle-mobile-panel-active {
    display: block !important;
  }

  .pokemon-battle-hub-card__content {
    max-width: none;
  }

  .pokemon-battle-team-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .pokemon-battle-team-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .pokemon-battle-captured-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pokemon-battle-stats-radar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pokemon-battle-stats-radar__values {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .pokemon-battle-hub-card--feature {
    min-height: auto;
  }

  .pokemon-battle-hub-side {
    min-height: 0;
  }

  .pokemon-battle-hub-team-summary__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pokemon-battle-hub-team-slot {
    padding-inline: .2rem;
  }

  .pokemon-battle-team-strip{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pokemon-battle-captured-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pokemon-battle-selected-identity__top {
    align-items: flex-start !important;
  }

  .pokemon-battle-selected-identity .pokemon-battle-info__sprite {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
  }

  .pokemon-battle-selected-identity .pokemon-battle-info__sprite img {
    width: 78px;
    height: 78px;
  }


  .pokemon-battle-move-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .36rem;
    padding: .38rem .45rem;
    border-radius: 9px;
  }

  .pokemon-battle-move-row__meta {
    grid-column: 2;
    justify-content: start;
    align-items: center;
    gap: .35rem;
  }

  .pokemon-battle-selected-moves-list,
  .pokemon-battle-move-list {
    gap: .34rem;
  }

  .pokemon-battle-move-row__check {
    width: 16px;
    height: 16px;
    border-width: 2px;
  }

  .pokemon-battle-move-row__main {
    gap: .04rem;
  }

  .pokemon-battle-move-row__main .pokemon-battle-move-title strong {
    font-size: .86rem;
  }

  .pokemon-battle-move-row__main small,
  .pokemon-battle-move-row__meta small {
    font-size: .62rem;
  }

  .pokemon-battle-move-row__details {
    gap: .08rem .24rem;
  }

  .pokemon-battle-move-row .pokemon-battle-type-badge {
    min-height: 1rem;
    padding: .12rem .38rem;
    font-size: .58rem;
    line-height: 1;
  }

  .pokemon-battle-move-editor__header {
    margin-bottom: .38rem !important;
  }

  .pokemon-battle-move-editor__header h4 {
    font-size: .95rem;
  }

  .pokemon-battle-move-editor__actions {
    justify-content: center;
  }
}
