* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-width: 900px;
}

body {
  display: inline;
  background: #333;
  overflow-x: hidden;
}

footer {
  text-align: center;
  background-color: #474950;
  width: 100vw;
  position: fixed;
  bottom: 0px;
}

footer a {
  color: aliceblue;
}

#footer1 {
  margin-right: 1rem;
}

#footer2 {
  margin-left: 1rem;
}

#init {
  height: 100vh;
  width: 100vw;
  background: whitesmoke;
  transition: all 1s;
  position: fixed;
  top: 0;
}

.spinner {
  width: 100px;
  height: 100px;
  margin: 200px auto;
  background-color: #000000;
  border-radius: 100%;
  animation: sk-scaleout 1.0s infinite ease-in-out;
}

/* ローディングアニメーション */
@keyframes sk-scaleout {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1.0);
    opacity: 0;
  }
}

.loaded {
  opacity: 0;
  visibility: hidden;
}

.key-arrangement {
  font-size: 1.2rem;
  background: rgb(240, 158, 82);
  color: white;
  text-align: center;
}

.keys label span {
  user-select: none;
  display: block;
  justify-content: center;
  text-align: center;
  align-items: center;
  padding: 5px;
  border: none;
  outline: none;
  background: #202325;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5),
    -3px -3px 7px rgba(255, 255, 255, 0.05);
  margin: 2px;
  color: rgb(184, 184, 184);
  font-size: 0.8rem;
  border-radius: 5px;
  cursor: default;
  font-weight: bold;
}

.keys label span.mod {
  background: #423042;
}

.keys label span p {
  font-size: 0.7rem;
  line-height: 0.8rem;
}

#layerNum {
  font-size: 1.5rem;
  position: absolute;
  top: 0px;
  left: 225px;
  color: white;
  text-wrap: nowrap;
}

.layer {
  width: max-content;
  position: absolute;
  display: grid;
  top: 0%;
  left: 80%;
  /*transform: translateY(-50%) translateX(-50%);
  -webkit-transform: translateY(-50%) translateX(-50%);*/
  border: solid;
  border-color: silver;
  padding: 5px;
}

input[type="radio"] {
  /* フォーム要素のスタイルを初期化 */
  width: 15px;
  height: 15px;
  border: 1px solid black;
  border-radius: 50%;
  margin: 3px;
}

input[type="radio"]:before {
  content: "";
  display: block;
  width: 60%;
  height: 60%;
  margin: 20% auto;
  border-radius: 50%;
}

.layer input#layer0:checked::before {
  background: gray;
}

.layer input#layer1:checked::before {
  background: red;
}

.layer input#layer2:checked::before {
  background: rgb(255, 187, 0);
}

.layer input#layer3:checked::before {
  background: green;
}

.layer input#layer4:checked::before {
  background: blue;
}

.layer input#layer5:checked::before {
  background: rgb(204, 0, 204);
}

.mask {
  accent-color: #393b41;
}

#apply {
  margin-top: 5px;
  font-size: 15px;
  font-variant-caps: all-petite-caps;
}

#frame {
  display: flex;
  height: 190px;
  width: 900px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  -webkit-transform: translateY(-50%) translateX(-50%);
}

.devices {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  -webkit-transform: translateY(-50%) translateX(-50%);
}

.devices .keys label span {
  background: #bec4d4;
  color: #2e3237;
}

#knob {
  display: flex;
  margin-top: 50px;
}

.keys label #left {
  user-select: none;
  width: 40px;
  height: 80px;
  border-radius: 40px 0 0 40px;
  padding-top: 10px
}

.keys label #right {
  user-select: none;
  width: 40px;
  height: 80px;
  border-radius: 0 40px 40px 0;
  padding-top: 10px
}

.devices .keybord-wrapper {
  display: flex;
}

.devices .keys {
  flex-direction: column;
}

#knob.keys {
  flex-direction: row;
}

#row0 {
  padding: 30px;
  background: #ececec;
  min-height: 270px;
  position: relative;
}

#row0 .keybord-wrapper {
  padding: 5px;
  border-radius: 10px;
  background: #303030;
  margin: 0 auto;
  transform: scale(1.35);
}

#row0 .keys label span {
  font-size: 0.6rem;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.helpbutton {
  width: 30px;
  height: 30px;
  float: right;
  margin: -25px;
}

#row1 {
  padding: 30px;
}

#row1 .keybord-wrapper {
  min-width: 820px;
  max-width: 820px;
  padding: 5px;
  border-radius: 10px;
  background: #bec4d4;
  margin: 0 auto;
}

#row2 {
  text-align-last: center;
  margin-bottom: 30px;
  margin-top: -30px;
  white-space: nowrap;
  padding: 0 30px;
}

#row2 .keybord-wrapper {
  min-width: 173px;
  max-width: 173px;
  height: 200px;
  padding: 5px;
  border-radius: 10px;
  background: #bec4d4;
  margin: 0 auto;
  display: inline-grid;
  align-content: stretch;
  justify-content: center;
}

#pad3.keybord-wrapper {
  min-width: 226px;
  max-width: 226px;
  padding: 5px;
  border-radius: 10px;
  background: #bec4d4;
  margin: 0 auto;
}

.keybord-wrapper .keys {
  display: flex;
}

.keybord-wrapper .keys label input:checked+span {
  color: #ff602b;
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.5),
    inset -3px -3px 7px rgba(255, 255, 255, 0.05);
}


#separator {
  height: 0.5rem;
}

.keys label input {
  display: none;
}

#blank {
  background: transparent;
  box-shadow: none;
}

.u0_25 {
  height: 30px;
  width: 12.5px;
}

.u0_5 {
  height: 30px;
  width: 25px;
}

.u0_75 {
  height: 30px;
  width: 37.5px;
}

.u1 {
  height: 30px;
  width: 50px;
}

.u1e {
  height: 68px;
  width: 50px;
  position: absolute;
}

.u1p {
  position: absolute;
  height: 68px;
  width: 50px;
}

.u1h {
  height: 60px;
  width: 60px;
}

.u1_25 {
  height: 30px;
  width: 62.5px;
}

.u1_5 {
  height: 30px;
  width: 75px;
}

.u2 {
  height: 30px;
  width: 104px;
}

.u2_5 {
  height: 30px;
  width: 125px;
}

.u4 {
  height: 30px;
  width: 200px;
}

.u6 {
  height: 30px;
  width: 300px;
}

#menu {
  user-select: none;
  font-size: 1.5rem;
  position: absolute;
  top: 0;
  padding: 5px;
}

.content {
  position: absolute;
  padding: 5px;
}

#connect {
  width: 180px;
  font-size: 1rem;
}

#disconnect {
  width: 180px;
  font-size: 1rem;
}

#write {
  width: 180px;
  font-size: 1rem;
}

#read {
  width: 180px;
  font-size: 1rem;
}

/* 開いて実行されるアニメーションを設定*/
details[open] .content {
  animation: fadeIn 1.0s ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    /* Transparent */
    transform: translateX(-100px);
    /* translateX(+100px)：右から表示 */
    /* translateX(-100px)：左から表示 */
    /* translateY(+100px)：下から表示 */
    /* translateY(-100px)：上から表示 */

  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.arrow_right {
  display: flex;
  position: relative;
  margin: 0 auto;
  user-select: none;
  width: 30px;
  border: none;
  background: none;
}

.arrow_right::before {
  content: "";
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 13px;
  height: 13px;
  border-top: 3px solid #000;
  border-right: 3px solid #000;
  transform: rotate(45deg);
  user-select: none;
}

.arrow_right:active::before {
  border-top: 3px solid #eb7d00;
  border-right: 3px solid #eb7d00;
  user-select: none;
}

.arrow_left {
  display: flex;
  position: relative;
  margin: 0 auto;
  user-select: none;
  width: 30px;
  border: none;
  background: none;
  user-select: none;
}

.arrow_left::before {
  content: "";
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: 13px;
  height: 13px;
  border-top: 3px solid #000;
  border-right: 3px solid #000;
  transform: rotate(225deg);
  user-select: none;
}

.arrow_left:active::before {
  border-top: 3px solid #eb7d00;
  border-right: 3px solid #eb7d00;
  user-select: none;
}

#cheat-sheet {
  font-size: 1rem;
  display: inline-table;
  width: 230px;
  height: 200px;
  background: #bec4d4;
  padding: 8px;
  border-radius: 10px;
  font-weight: bold;
  user-select: none;
}

#cheat-sheet p {
  display: flex;
  justify-content: center;
}

table,
td {
  border: 1px solid #333;
  width: 150px;
  margin: 0 auto;
}

thead,
tfoot {
  background-color: #333;
  color: #fff;
}

#table1 {
  overflow-y: scroll;
  height: 170px;
}