div#finalscorewrapper {
  width: 1139px;
  height: 634px;
  left: 422px;
  top: 160px;
  background-color: black;
  border: 1px solid white;
  z-index: 1;
  border-radius: 0 0 15px 15px;
}

div#finalscorewrapper:not(.activated) { display: none; }

/* Faction Selector */

div#factionselectorwrapper {
  left: -1px;
  top: -72px;
  width: 1139px;
}

div#factionselectorwrapper > div.factionselector {
  width: calc(25%);
  height: 50px;
  border: 1px solid white;
  background-color: black;
  /* display: flex;
  justify-content: center;
  align-items: center; */
  padding: 10px 0 10px 0;
  border-radius: 15px 15px 0 0;
}
div#factionselectorwrapper > div.factionselector:not(.selected):hover {
  background-color: gray;
}
div#factionselectorwrapper > div.factionselector.selected {
  border-bottom: 1px solid black;
}
div#factionselectorwrapper > div.factionselector1 { left: 0px; }
div#factionselectorwrapper > div.factionselector2 { left: 25%; }
div#factionselectorwrapper > div.factionselector3 { left: 50%; }
div#factionselectorwrapper > div.factionselector4 { left: 75%; }

/* Rounddiv */

div.rounddiv {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 20px;
  height: 18px;
  background-color: white;
  color: black;
  font-size: 16px;
  border-radius: 10px;
  padding-top: 2px;
}


/* Round Bonus */

div#finalscoreboard_roundbonuswrapper {
  left: 10px;
  top: 10px;
}

div#finalscoreboard_roundbonuswrapper div.roundbonus {
  width: 89px;
  height: 101px;
  background-size: 100%;
}
div#finalscoreboard_roundbonuswrapper div.roundbonus1 {
  -webkit-transform: rotate(285deg);
  transform: rotate(285deg);
  left: 11px;
  top: 89px;
}
div#finalscoreboard_roundbonuswrapper div.roundbonus2 {
  -webkit-transform: rotate(315deg);
  transform: rotate(315deg);
  left: 42px;
  top: 35px;
}
div#finalscoreboard_roundbonuswrapper div.roundbonus3 {
  -webkit-transform: rotate(345deg);
  transform: rotate(345deg);
  left: 96px;
  top: 3px;
}
div#finalscoreboard_roundbonuswrapper div.roundbonus4 {
  -webkit-transform: rotate(15deg);
  transform: rotate(15deg);
  left: 158px;
  top: 3px;
}
div#finalscoreboard_roundbonuswrapper div.roundbonus5 {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  left: 212px;
  top: 35px;
}
div#finalscoreboard_roundbonuswrapper div.roundbonus6 {
  -webkit-transform: rotate(75deg);
  transform: rotate(75deg);
  left: 243px;
  top: 89px;
}

div#finalscoreboard_roundbonuswrapper div.buildPI {
  width: 30px;
  height: 28px;
  background-size: 100%;
}
div#finalscoreboard_roundbonuswrapper div.buildPI1 {
  left: 106px;
  top: 144px;
}
div#finalscoreboard_roundbonuswrapper div.buildPI2 {
  left: 118px;
  top: 118px;
}
div#finalscoreboard_roundbonuswrapper div.buildPI3 {
  left: 142px;
  top: 104px;
}
div#finalscoreboard_roundbonuswrapper div.buildPI4 {
  left: 170px;
  top: 104px;
}
div#finalscoreboard_roundbonuswrapper div.buildPI5 {
  left: 194px;
  top: 118px;
}
div#finalscoreboard_roundbonuswrapper div.buildPI6 {
  left: 206px;
  top: 144px;
}

div#finalscoreboard_roundbonuswrapper div.text {
  top: 178px;
  width: 58px;
  font-size: 24px;
  color: white;
}
div#finalscoreboard_roundbonuswrapper div.text1 { left: 0px;}
div#finalscoreboard_roundbonuswrapper div.text2 { left: 58px;}
div#finalscoreboard_roundbonuswrapper div.text3 { left: 116px;}
div#finalscoreboard_roundbonuswrapper div.text4 { left: 174px;}
div#finalscoreboard_roundbonuswrapper div.text5 { left: 232px;}
div#finalscoreboard_roundbonuswrapper div.text6 { left: 290px;}

/* Booster */

div#finalscoreboard_boosterwrapper {
  left: 9px;
  top: 270px;
}

div#finalscoreboard_boosterwrapper > div.booster { width: 55px; height: 161px; }
div#finalscoreboard_boosterwrapper > div.booster1 { left: 0px; }
div#finalscoreboard_boosterwrapper > div.booster2 { left: 58px; }
div#finalscoreboard_boosterwrapper > div.booster3 { left: 116px; }
div#finalscoreboard_boosterwrapper > div.booster4 { left: 174px; }
div#finalscoreboard_boosterwrapper > div.booster5 { left: 232px; }
div#finalscoreboard_boosterwrapper > div.booster6 { left: 290px; }

div#finalscoreboard_boosterwrapper div.text {
  top: 166px;
  width: 58px;
  font-size: 24px;
  color: white;
}
div#finalscoreboard_boosterwrapper div.text1 { left: 0px;}
div#finalscoreboard_boosterwrapper div.text2 { left: 58px;}
div#finalscoreboard_boosterwrapper div.text3 { left: 116px;}
div#finalscoreboard_boosterwrapper div.text4 { left: 174px;}
div#finalscoreboard_boosterwrapper div.text5 { left: 232px;}
div#finalscoreboard_boosterwrapper div.text6 { left: 290px;}

/* 연방이랑 함대들어가기랑 정큐액션 */

div#finalscoreboard_fedqicactionwrapper {
  left: 360px;
  top: 10px;
  width: 740px;
  height: 100px;
  display: flex;
  justify-content: left;
  gap: 10px;
}

div#finalscoreboard_fedqicactionwrapper > div.fedwrapper {
  position: relative;
  width: 59px;
  height: 100px;
}
div#finalscoreboard_fedqicactionwrapper > div.fedwrapper > div.text {
  width: 59px;
  height: 24px;
  top: 74px;
  font-size: 24px;
  color: white;
}

div#finalscoreboard_fedqicactionwrapper > div.fleetlogowrapper {
  position: relative;
  width: 60px;
  height: 100px;
}
div#finalscoreboard_fedqicactionwrapper > div.fleetlogowrapper > div.fleetlogo {
  width: 60px;
  height: 66px;
  background-size: 100%;
  background-position: 0 6px;
}
div#finalscoreboard_fedqicactionwrapper > div.fleetlogowrapper > div.text {
  width: 60px;
  height: 24px;
  top: 74px;
  font-size: 24px;
  color: white;
}

div#finalscoreboard_fedqicactionwrapper > div.qicactionwrapper {
  position: relative;
  width: 60px;
  height: 100px;
  background-size: 100%;
  background-position: 50% 4px;
}
div#finalscoreboard_fedqicactionwrapper > div.qicactionwrapper > div.fleet {
  width: 60px;
  height: 27px;
  background-size: 45%;
  background-position: 50% 50%;
}
div#finalscoreboard_fedqicactionwrapper > div.qicactionwrapper > div.qicaction {
  top: 30px;
}
div#finalscoreboard_fedqicactionwrapper > div.qicactionwrapper > div.text {
  width: 60px;
  height: 24px;
  top: 74px;
  font-size: 24px;
  color: white;
}

/* 일반기술이랑 고급기술이랑 인공물 */

div#finalscoreboard_techartifactwrapper {
  left: 360px;
  top: 120px;
  width: 730px;
  height: 118px;
  display: flex;
  justify-content: left;
  gap: 10px;
}

div#finalscoreboard_techartifactwrapper > div.basetechwrapper {
  position: relative;
  width: 120px;
  height: 118px;
}
div#finalscoreboard_techartifactwrapper > div.basetechwrapper > div.basetech {
  width: 120px;
  height: 90px;
  background-size: 100%;
}
div#finalscoreboard_techartifactwrapper > div.basetechwrapper > div.text {
  width: 120px;
  height: 24px;
  top: 94px;
  font-size: 24px;
  color: white;
}

div#finalscoreboard_techartifactwrapper > div.advtechwrapper {
  position: relative;
  width: 98px;
  height: 118px;
}
div#finalscoreboard_techartifactwrapper > div.advtechwrapper > div.advtech {
  width: 98px;
  height: 77px;
  top: 5px;
  background-size: 100%;
}
div#finalscoreboard_techartifactwrapper > div.advtechwrapper > div.text {
  width: 98px;
  height: 24px;
  top: 94px;
  font-size: 24px;
  color: white;
}

div#finalscoreboard_techartifactwrapper > div.artifactwrapper {
  position: relative;
  width: 120px;
  height: 118px;
}
div#finalscoreboard_techartifactwrapper > div.artifactwrapper > div.artifact {
  width: 120px;
  height: 92px;
  background-size: 100%;
}
div#finalscoreboard_techartifactwrapper > div.artifactwrapper > div.text {
  width: 120px;
  height: 24px;
  top: 94px;
  font-size: 24px;
  color: white;
}

/* 경제랑 가이아5랑 원시행성이랑 글린이랑 수동적액션 */

div#finalscoreboard_etcwrapper {
  left: 360px;
  top: 250px;
  width: 740px;
  height: 120px;
  display: flex;
  justify-content: left;
  gap: 10px;
}

div#finalscoreboard_etcwrapper > div#Gaia5wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}
div#finalscoreboard_etcwrapper > div#Gaia5wrapper > div.Gaia {
  width: 120px;
  height: 60px;
  background-color: #a81874;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px 0 0 0;
}
div#finalscoreboard_etcwrapper > div#Gaia5wrapper > div.Gaia > div.gaiaplanet {
  width: 60px;
  height: 60px;
  background-image: url('planet_gaia.png');
  background-size: 100%;
}
div#finalscoreboard_etcwrapper > div#Gaia5wrapper > div.text {
  width: 120px;
  height: 24px;
  top: 64px;
  font-size: 24px;
  color: white;
}


div#finalscoreboard_etcwrapper > div#Econwrapper {
  position: relative;
  width: 120px;
  height: 120px;
}
div#finalscoreboard_etcwrapper > div#Econwrapper > div.Econ {
  width: 120px;
  height: 60px;
  background-color: #f0a108;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 20px 0 0 0;
}
div#finalscoreboard_etcwrapper > div#Econwrapper > div.Econ > div.text {
  position: relative;
  width: 20px; 
  height: 20px;
}
div#finalscoreboard_etcwrapper > div#Econwrapper > div.Econ > div.vp1 { position: relative; }
div#finalscoreboard_etcwrapper > div#Econwrapper > div.text {
  width: 120px;
  height: 24px;
  top: 64px;
  font-size: 24px;
  color: white;
}

div#finalscoreboard_etcwrapper > div#protowrapper {
  position: relative;
  width: 60px;
  height: 120px;
}
div#finalscoreboard_etcwrapper > div#protowrapper > div.proto {
  width: 60px;
  height: 60px;
  background-image: url('planet_proto.png');
  background-size: 100%;
}
div#finalscoreboard_etcwrapper > div#protowrapper > div.text {
  width: 60px;
  height: 24px;
  top: 64px;
  font-size: 24px;
  color: white;
}


div#finalscoreboard_etcwrapper > div#Gleensvpwrapper {
  position: relative;
  width: 68px;
  height: 120px;
}
div#finalscoreboard_etcwrapper > div#Gleensvpwrapper > div.Gleensvp {
  width: 68px;
  height: 60px;
  background-image: url('Gleensvp.png');
  background-size: 100%;
}
div#finalscoreboard_etcwrapper > div#Gleensvpwrapper > div.text {
  width: 68px;
  height: 24px;
  top: 64px;
  font-size: 24px;
  color: white;
}

div#finalscoreboard_etcwrapper > div#leechhexwrapper {
  position: relative;
  width: 60px;
  height: 120px;
  --distance: 29px;
  --gap: 1px;
  --sqrt3: 1.7320508;
}
div#finalscoreboard_etcwrapper > div#leechhexwrapper > div.leechhex {
  width: calc(var(--sqrt3) * (var(--distance) + var(--gap)));
  height: calc(2 * (var(--distance) + var(--gap)));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background-color:dimgray;
  overflow:visible;
}
div#finalscoreboard_etcwrapper > div#leechhexwrapper > div.leechhex::before {
  content: "";
  inset: var(--gap) calc(var(--sqrt3) / 2 * var(--gap)) var(--gap) calc(var(--sqrt3) / 2 * var(--gap));
  position: absolute;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background-color:black;
}
div#finalscoreboard_etcwrapper > div#leechhexwrapper > div.TS {
  width: 25px;
  height: 30px;
  left: 14px;
  top: 24px;
  background-image: url('TS.png');
  background-size: 100%;
}
div#finalscoreboard_etcwrapper > div#leechhexwrapper > div.powercharge {
  left: 17px;
  top: 5px;
}
div#finalscoreboard_etcwrapper > div#leechhexwrapper > div.text {
  width: 52px;
  height: 24px;
  top: 64px;
  font-size: 24px;
  color: white;
}

/* 연구점수 */

div#finalscoreboard_researchwrapper {
  left: 360px;
  top: 350px;
  width: 120px;
  height: 110px;
}

div#finalscoreboard_researchwrapper > div#researchvpwrapper {
  width: 120px;
  height: 78px;
  display: flex;
  justify-content: center;
  align-items: end;
  border-top: 1px solid gray;
  border-bottom: 1px solid gray;
}

div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.researchtrack {
  position: relative;
  width: 20px;
}

div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.level0 { height: 0%; }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.level1 { height: 20%; }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.level2 { height: 40%; }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.level3 { height: 60%; }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.level4 { height: 80%; }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.level5 { height: 100%; }

div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.track_Terra { background-color: #7b4f40; }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.track_Nav { background-color: #6c84a3 }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.track_AI { background-color: #53a235 }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.track_Gaia { background-color: #a81874 }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.track_Econ { background-color: #f0a108 }
div#finalscoreboard_researchwrapper > div#researchvpwrapper > div.track_Sci { background-color: #1ea9db }

div#finalscoreboard_researchwrapper > div.text {
  width: 120px;
  height: 24px;
  top: 86px;
  font-size: 24px;
  color: white;
}

/* 미션 */

div#finalscoreboard_final1wrapper {
  left: 490px;
  top: 350px;
  width: 120px;
  height: 110px;
}
div#finalscoreboard_final1wrapper > div.final {
  width: 121px;
  height: 80px;
  background-size: 100%;
}
div#finalscoreboard_final1wrapper > div.text {
  width: 121px;
  height: 24px;
  top: 86px;
  font-size: 24px;
  color: white;
}

div#finalscoreboard_final2wrapper {
  left: 621px;
  top: 350px;
  width: 120px;
  height: 110px;
}
div#finalscoreboard_final2wrapper > div.final {
  width: 121px;
  height: 80px;
  background-size: 100%;
}
div#finalscoreboard_final2wrapper > div.text {
  width: 121px;
  height: 24px;
  top: 86px;
  font-size: 24px;
  color: white;
}

/* 자원점수 */

div#finalscoreboard_resourcevpwrapper {
  left: 750px;
  top: 350px;
  width: 80px;
  height: 110px;
}

div#finalscoreboard_resourcevpwrapper > div.credit {
  left: 10px;
  top: 30px;
}
div#finalscoreboard_resourcevpwrapper > div.ore {
  left: 30px;
  top: 30px;
}
div#finalscoreboard_resourcevpwrapper > div.knowledge {
  left: 50px;
  top: 30px;
}
div#finalscoreboard_resourcevpwrapper > div.text {
  width: 80px;
  height: 24px;
  top: 86px;
  font-size: 24px;
  color: white;
}


/* 요약창 */

table#finalscoresummary {
  position: absolute;
  left: 5px;
  top: 500px;
  width: 1129px;
  border-collapse: collapse;
  font-size: 20px;
  border: none;
}
table#finalscoresummary > tbody > tr {
  height: 56px;
  display: flex;
}
table#finalscoresummary > tbody > tr.margin {
  height: 10px;
}
table#finalscoresummary > tbody > tr > td {
  flex: auto;
  position: relative;
  border-right: 1px solid gray;
  display: flex;
  justify-content: center;
}
table#finalscoresummary > tbody > tr > td.lastchild { /* 동적으로 추가함 */
  border-right: none;
}
table#finalscoresummary > tbody > tr > td > div.text {
  top: 28px;
  width: 100%;
}