:root{
  --bg0: #202020;
  --bg1: #202020;
  --card: #292929;
  --card2: #313131;
  --stroke: #3b3b3b;
  --stroke2: #4a4a4a;
  --text: #f1f1f1;
  --muted: #b8b8b8;
  --muted2: #949494;

  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --shadow2: 0 12px 40px rgba(0,0,0,.22);

  --r12: 4px;
  --r16: 6px;
  --r20: 8px;

  --pmin: 0%;
  --pmax: 100%;

  --spriteTable: 54px;
  --spriteMini: 46px;
  --spriteHero: 96px;
  --itemIco: 30px;
}

*{ box-sizing: border-box; }


html { background: var(--bg0); }
html, body { min-height: 100%; }

body{
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.25;

  background: transparent;
  position: relative;
  z-index: 0;
}

body::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;

  background: var(--bg0);
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  transform: translate3d(0,0,0);
}


a{ color: inherit; }
.muted{ color: var(--muted); font-size: 12px; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }

.page{
  width: min(1200px, 100%);
  margin: 28px auto 50px;
  padding: 0 18px;
}

.seoFooter{
  margin-top: 14px;
}

.seoCard + .seoCard,
.seoCard + .summaryGrid,
.summaryGrid + .seoCard{
  margin-top: 14px;
}

.eyebrow{
  margin: 0 0 8px;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  font-weight: 800;
}

.seoCard h2{
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.lede{
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 78ch;
  line-height: 1.5;
}

.summaryGrid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.summaryCard{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  background: #2d2d2d;
  padding: 12px;
}

.summaryLabel{
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.summaryValue{
  display: block;
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.2;
}

.top{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.top h1{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 24px;
  letter-spacing: .2px;
}

.brandMark{
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}
.top h1 span{
  font-weight: 600;
  color: var(--muted);
}

.topRight{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.langSelectWrap{
  display: inline-flex;
  min-width: 0;
}

.langSelectWrap select{
  height: 34px;
  width: 52px;
  padding: 0 6px;
  border-radius: 6px;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.githubLink{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--stroke2);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}

.githubLink svg{
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.githubLink:hover{
  background: var(--card2);
  border-color: #595959;
  transform: translateY(-1px);
}

.githubLink:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}

.bar{
  display:grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.45fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: var(--r20);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  align-items: end;
}

@media (max-width: 1100px){
  .summaryGrid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bar{ grid-template-columns: repeat(3, minmax(160px, 1fr)); }
}
@media (max-width: 720px){
  .bar{ grid-template-columns: 1fr; }
}

label{
  display:flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

input, select, button{
  font: inherit;
  color: var(--text);
}

input, select{
  height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: #252525;
  outline: none;
}
input::placeholder{ color: rgba(255,255,255,.40); }

select{
  appearance: auto;
}

input:focus, select:focus{
  border-color: #636363;
  box-shadow: 0 0 0 3px rgba(255,255,255,.10);
}

.rangeBlock{
  grid-column: 5 / 7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
@media (max-width: 1100px){ .rangeBlock{ grid-column: 1 / -1; } }
@media (max-width: 720px){ .rangeBlock{ grid-column: span 1; } }

.rangeWrap{
  position: relative;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: #252525;
  overflow: hidden;
  display:flex;
  align-items:center;
  padding: 0 10px;
}

.rangeTrack{
  position: absolute;
  left: 10px;
  right: 10px;
  height: 6px;
  border-radius: 4px;
  background: #3f3f3f;
  pointer-events: none;
  overflow: hidden;
}

.rangeTrack::after{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pmin);
  width: calc(var(--pmax) - var(--pmin));
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8f8f8f 0%, #c4c4c4 100%);
}

.rangeWrap input[type="range"]{
  position: absolute;
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  height: 40px;
  margin: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  border: 0;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}
.rangeWrap input[type="range"]:focus,
.rangeWrap input[type="range"]:focus-visible{
  box-shadow: none;
}
.rangeWrap input[type="range"]::-webkit-slider-runnable-track{
  height: 6px;
  background: transparent;
}
.rangeWrap input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  height: 18px;
  width: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fafafa 0%, #d7d7d7 100%);
  border: 1px solid rgba(20,20,20,.5);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
  margin-top: -6px;
}
.rangeWrap input[type="range"]::-moz-range-track{
  height: 6px;
  background: transparent;
}
.rangeWrap input[type="range"]::-moz-range-thumb{
  pointer-events: auto;
  height: 18px;
  width: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fafafa 0%, #d7d7d7 100%);
  border: 1px solid rgba(20,20,20,.5);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.rangeWrap input[type="range"]:focus-visible::-webkit-slider-thumb{
  box-shadow: 0 0 0 3px rgba(255,255,255,.14), 0 2px 10px rgba(0,0,0,.35);
}
.rangeWrap input[type="range"]:focus-visible::-moz-range-thumb{
  box-shadow: 0 0 0 3px rgba(255,255,255,.14), 0 2px 10px rgba(0,0,0,.35);
}

.tableWrap{
  margin-top: 14px;
  border-radius: var(--r20);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: #262626;
  box-shadow: var(--shadow);
}

.tabsRow{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rulesNotice{
  margin-top: 14px;
}

.rulesNotice .lede{
  margin: 0;
  max-width: none;
}

.tabs{
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: #262626;
}

.typeFilter{
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: #262626;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.typeBtn{
  height: 30px;
  min-width: 30px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.typeBtn img{
  width: 20px;
  height: 20px;
  display: block;
}

.typeIcons{
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.typeIcons img{
  width: 18px;
  height: 18px;
  display: block;
}

.attackNameWrap{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pokeNameLine{
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.moveWithType{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pokeNameLine .typeIcons{
  gap: 2px;
}

.pokeNameLine .typeIcons img{
  width: 18px;
  height: 18px;
}

.typeBtn:hover{
  background: #323232;
  border-color: var(--stroke2);
}

.typeBtn.isActive{
  border-color: var(--stroke2);
  background: #3a3a3a;
}

@media (max-width: 980px){
  .tabsRow{
    flex-direction: column;
    align-items: stretch;
  }
  .typeFilter{
    justify-content: flex-start;
  }
}

.tabBtn{
  height: 34px;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.tabBtn:hover{
  background: #323232;
  color: var(--text);
}

.tabBtn.isActive{
  color: var(--text);
  border-color: var(--stroke2);
  background: #3a3a3a;
}

.tabPanel{ display: none; }
.tabPanel.isActive{ display: block; }
.isHidden{ display: none !important; }

.teamControls{
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
}

.teamControls label{
  width: fit-content;
}

.teamFilterGroup{
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.teamFilterGroup > span{
  font-size: 12px;
  color: var(--muted);
}

.teamMemberSlots{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.teamMemberSlot{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  max-width: 180px;
  height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: #2f2f2f;
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
}

.teamMemberSlot:hover{
  background: #353535;
}

.teamMemberSlot img{
  width: 24px;
  height: 24px;
  border-radius: 5px;
  image-rendering: pixelated;
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
}

.teamMemberSlot span{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teamMemberPlus{
  font-weight: 800;
  color: var(--muted);
}

.teamMemberClear{
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.teamPicker{
  position: absolute;
  top: calc(100% + 8px);
  left: 170px;
  z-index: 4;
  width: min(420px, 100%);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: #252525;
  box-shadow: var(--shadow2);
  overflow: hidden;
}

.teamPickerSearchWrap{
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.teamPickerSearch{
  width: 100%;
}

.teamPickerList{
  max-height: 320px;
  overflow: auto;
}

.teamPickerOption{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.teamPickerOption:hover{
  background: #323232;
}

.teamPickerOption img{
  width: 28px;
  height: 28px;
  border-radius: 5px;
  image-rendering: pixelated;
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
}

.teamPickerEmpty{
  padding: 12px;
  color: var(--muted);
}

table{
  width: 100%;
  border-collapse: collapse;
}
thead th{
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 12px;
  background: #2b2b2b;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: middle;
}

thead th[data-sort],
thead th[data-attack-sort],
thead th[data-team-sort]{
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
thead th[data-sort]:hover,
thead th[data-attack-sort]:hover,
thead th[data-team-sort]:hover{
  background: #333333;
}
.sortInd{
  margin-left: 6px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
}
thead th.isActive{
  color: rgba(255,255,255,.92);
}

tbody tr{ transition: background .12s ease; }
tbody tr.clickable{ cursor: pointer; }
tbody tr.clickable:hover{ background: #303030; }

.poke{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 240px;
}

.poke img{
  width: var(--spriteTable);
  height: var(--spriteTable);
  image-rendering: pixelated;
  border-radius: 6px;
  background: rgba(0,0,0,.15);
  border: 1px solid rgba(255,255,255,.10);
  flex: 0 0 auto;
}

.poke b{
  font-size: 14px;
  letter-spacing: .1px;
}

.teamComp{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
}

.teamSprites{
  display: grid;
  grid-template-columns: repeat(3, 34px);
  gap: 4px;
  flex: 0 0 auto;
}

.teamSprites img{
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  border-radius: 6px;
  background: rgba(0,0,0,.15);
  border: 1px solid rgba(255,255,255,.10);
}

.teamNames b{
  font-size: 14px;
  line-height: 1.35;
}

.mobileStatLabel{
  display: none;
}

.mobileStatValue{
  font-size: inherit;
  font-weight: inherit;
}

.mobileSortStat{
  position: relative;
  outline: none;
}

.mobileSortStat:focus-visible{
  box-shadow: 0 0 0 2px rgba(255,255,255,.16);
}

.mobileSortInd{
  display: none;
  min-width: 12px;
  font-size: 11px;
  color: rgba(255,255,255,.72);
  text-align: center;
}

.mobileStatValueWrap{
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.mobileSortStat.isActive{
  border-color: rgba(255,255,255,.18);
}

@media (max-width: 720px){
  :root{ --spriteTable: 48px; }
  .poke{ min-width: unset; }
  .teamControls{ flex-direction: column; }
  .teamPicker{ position: static; width: 100%; }
  .teamMemberSlot{ min-width: calc(50% - 4px); max-width: none; }
  .mobileSortInd{ display: inline-block; }
}

.btn{
  height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: #2f2f2f;
  cursor: pointer;
}
.btn:hover{ background: #373737; }

.modalBack{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
  background: rgba(0,0,0,.45);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.modal{
  width: min(1200px, 100%);
  max-height: min(90vh, 100%);
  overflow: hidden;
  background: #262626;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow2);

  transform: translate3d(0,0,0);
  will-change: transform;
  contain: layout paint;
}

.modalHeader{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #262626;
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.modalHeader b{
  font-size: 13px;
  color: rgba(255,255,255,.86);
}

.modalBody{
  padding: 14px;
  overflow: auto;
  max-height: calc(min(90vh, 100vh) - 58px);
  -webkit-overflow-scrolling: touch;
  contain: content;
}

.detailGrid{
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
}
@media (max-width: 980px){ .detailGrid{ grid-template-columns: 1fr; } }

.card{
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: #2d2d2d;
  padding: 12px;
}
.card h3, .card h4{
  margin: 0 0 10px 0;
  letter-spacing: .2px;
}
.card h3{ font-size: 14px; color: rgba(255,255,255,.90); }
.card h4{ font-size: 13px; color: rgba(255,255,255,.84); }

.heroRow{ display:flex; gap: 12px; align-items: center; }
.heroSprite{
  width: var(--spriteHero);
  height: var(--spriteHero);
  image-rendering: pixelated;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
}
.heroTitle{
  font-size: 22px;
  font-weight: 850;
  line-height: 1.05;
}
.heroSub{
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  background: #343434;
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.80);
}
.chip b{ font-weight: 900; color: rgba(255,255,255,.92); }

.statGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 980px){ .statGrid{ grid-template-columns: 1fr; } }

.topStatsRow{
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.2fr 1.2fr;
  gap: 10px;
  align-items: start;
}

.abilitiesGrid{
  margin-top: 0;
  grid-template-columns: 1fr;
}

.statBoxTight{ padding: 10px; }

.baseStatsList{
  margin-top: 6px;
  display: grid;
  gap: 8px;
}

.statBarRow{
  display: grid;
  gap: 4px;
}

.statBarRowInline{
  display: flex;
  align-items: center;
  gap: 8px;
}

.statName{
  width: 34px;
  font-size: 12px;
  color: rgba(255,255,255,.88);
  font-weight: 700;
  flex: 0 0 auto;
}

.statNum{
  width: 30px;
  text-align: right;
  flex: 0 0 auto;
}

.statBarHead{
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,.88);
}

.statBarTrack{
  width: 100%;
  flex: 1 1 auto;
  height: 12px;
  overflow: hidden;
}

.statBarFill{
  height: 100%;
  background: linear-gradient(90deg, #73d8ff 0%, #7ce0a4 100%);
}

.statBarFill.isRed{ background: linear-gradient(90deg, #ff6b6b 0%, #ff3b3b 100%); }
.statBarFill.isOrange{ background: linear-gradient(90deg, #ffb454 0%, #ff8b2b 100%); }
.statBarFill.isYellow{ background: linear-gradient(90deg, #ffe27a 0%, #ffd54a 100%); }
.statBarFill.isGreen{ background: linear-gradient(90deg, #74e39f 0%, #42c978 100%); }
.statBarFill.isBlue{ background: linear-gradient(90deg, #7cc4ff 0%, #4a8dff 100%); }

@media (max-width: 1100px){
  .topStatsRow{ grid-template-columns: 1fr; }
}

.statBox{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
  border-radius: 6px;
  padding: 10px;
}
.statLabel{ color: var(--muted); font-size: 12px; }
.statValue{ font-weight: 900; font-size: 20px; margin-top: 3px; }

.abilitiesGrid .statValue{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.abilityBox{
  padding: 8px 10px;
}

.abilityRow{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.abilityName{
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.abilityPct{
  font-size: 13px;
  color: var(--muted);
  flex: 0 0 auto;
}

.minirow{
  display:flex;
  align-items:center;
  gap: 12px;
  margin: 10px 0;
}
.minirow img{
  width: var(--spriteMini);
  height: var(--spriteMini);
  image-rendering: pixelated;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
}
.miniName{ font-weight: 850; font-size: 14px; }
.miniMeta{ color: var(--muted); font-size: 12px; margin-top: 3px; }

.listLine{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255,255,255,.10);
}
.listLine:last-child{ border-bottom: 0; }

.itemico{
  width: var(--itemIco);
  height: var(--itemIco);
  image-rendering: pixelated;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  flex: 0 0 auto;
}

img[src$=".gif"]{ filter: none !important; }

html.modal-open body{ overflow: hidden; }

@media (max-width: 720px){
  .seoCard h2{ font-size: 20px; }
  .summaryGrid{ grid-template-columns: 1fr; }

  .page{
    margin: 18px auto 32px;
    padding: 0 12px;
  }

  .top{
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  .top h1{
    justify-content: center;
    align-items: center;
    font-size: 24px;
    line-height: 1;
    text-align: center;
  }

  .top h1 span{
    display: none;
  }

  .topRight{
    align-items: stretch;
    justify-content: flex-start;
    margin-top: -10px;
  }

  .langSelectWrap,
  .githubLink{
    flex: 0 0 auto;
  }

  .bar{
    gap: 10px;
    padding: 12px;
  }

  .tabs{
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tabBtn{
    width: 100%;
  }

  .typeFilter{
    width: 100%;
    justify-content: flex-start;
  }

  .tableWrap{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table{
    min-width: 760px;
  }

  #panel_pokemon .tableWrap{
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  #panel_pokemon table,
  #panel_pokemon thead,
  #panel_pokemon tbody,
  #panel_pokemon tr,
  #panel_pokemon td{
    display: block;
  }

  #panel_pokemon table{
    min-width: 0;
  }

  #panel_teams table{
    min-width: 0;
  }

  #panel_pokemon thead{
    display: none;
  }

  #panel_teams thead{
    display: none;
  }

  #panel_pokemon tbody{
    display: grid;
    gap: 10px;
  }

  #panel_teams tbody{
    display: grid;
    gap: 10px;
  }

  #panel_pokemon tbody tr{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-radius: var(--r20);
    border: 1px solid var(--stroke);
    background: #262626;
    box-shadow: var(--shadow);
  }

  #panel_teams tbody tr{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-radius: var(--r20);
    border: 1px solid var(--stroke);
    background: #262626;
    box-shadow: var(--shadow);
  }

  #panel_pokemon tbody td{
    padding: 0;
    border: 0;
  }

  #panel_teams tbody td{
    padding: 0;
    border: 0;
  }

  #panel_pokemon tbody td:first-child{
    grid-column: 1 / -1;
    padding-bottom: 4px;
  }

  #panel_teams tbody td:first-child{
    grid-column: 1 / -1;
    padding-bottom: 4px;
  }

  #panel_pokemon .mobileStat{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    background: #2f2f2f;
  }

  #panel_pokemon .mobileSortStat,
  #panel_teams .mobileSortStat{
    cursor: pointer;
  }

  #panel_pokemon .mobileSortStat:active,
  #panel_teams .mobileSortStat:active{
    background: #383838;
  }

  #panel_teams .mobileStat{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    background: #2f2f2f;
  }

  #panel_pokemon .mobileStatLabel{
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.15;
  }

  #panel_teams .mobileStatLabel{
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.15;
  }

  #panel_pokemon .mobileStatValue{
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    text-align: right;
  }

  #panel_teams .mobileStatValue{
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    text-align: right;
  }

  .poke{
    gap: 10px;
  }

  .teamComp{
    min-width: unset;
    align-items: flex-start;
  }

  .teamSprites{
    grid-template-columns: repeat(3, 30px);
  }

  .teamSprites img{
    width: 30px;
    height: 30px;
  }

  .poke b{
    display: inline-block;
    line-height: 1.2;
  }

  .modalBack{
    padding: 10px;
    align-items: flex-end;
  }

  .modal{
    width: 100%;
    max-height: min(92vh, 100%);
  }

  .modalBody{
    padding: 12px;
  }

  .heroRow{
    align-items: flex-start;
  }

  .heroTitle{
    font-size: 18px;
  }

  .heroSub{
    gap: 6px;
  }

  .chip{
    padding: 6px 8px;
  }

  .listLine,
  .abilityRow,
  .minirow{
    align-items: flex-start;
  }

  .listLine{
    flex-direction: column;
  }

  .abilityRow{
    flex-wrap: wrap;
  }

  .abilityName{
    white-space: normal;
  }

  .minirow{
    gap: 10px;
  }

  .detailGrid[style*="margin-top: 14px"],
  .card > div[style*="grid-template-columns: 1fr 1fr"]{
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px){
  :root{
    --spriteHero: 78px;
    --spriteMini: 40px;
    --itemIco: 26px;
  }

  .brandMark{
    width: 52px;
    height: 52px;
  }

  .top h1{
    gap: 8px;
    font-size: 26px;
    margin-bottom: 0;
  }

  .githubLink{
    width: 100%;
    justify-content: center;
  }

  .typeBtn{
    min-width: 32px;
  }

  #panel_pokemon tbody tr{
    grid-template-columns: 1fr;
  }

  .moveWithType,
  .attackNameWrap,
  .pokeNameLine{
    flex-wrap: wrap;
  }

  .statBarRowInline{
    gap: 6px;
  }

  .statName{
    width: 28px;
  }

  .statNum{
    width: 26px;
  }
}
