footer.footer {
  display: none;
}

#chat {
  background: #f5f5f5;
  position: relative;
}

#thinking {
  text-align: center;
  padding: 10px;
}

#input-tail {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 20px;
}

.reset {
  height: 64px;
  display: flex;
  flex-flow: row wrap;
  align-content: center;
  justify-content: flex-start;
  align-items: center;
  background: #f5f5f5;
  padding-top: 4px;
  padding-inline: 24px;
  position: sticky;
  left: 0;
  z-index: 99;
}
.reset a {
  color: #ff6705;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 12px;
  position: relative;
}

.reset a::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 2px;
  background: #ff6705;
}
.reset a::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-left: 2px solid;
  border-bottom: 2px solid;
  rotate: 45deg;
  position: absolute;
  left: 0;
  top: 50%;
  translate: 0 -50%;
}
.chat_inner {
  width: min(850px, 100%);
  padding-inline: 25px;
  margin-inline: auto;
}
.chat_note {
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 400;
}
.chat_note p:nth-of-type(n + 2) {
  margin-top: 20px;
}
.chat_note p.sub {
  font-size: 12px;
}
.chat_area {
  display: flex;
  flex-flow: column wrap;
  align-items: flex-end;
}
.fukidashi {
  display: inline-block;
  padding: 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.fukidashi.fromai {
  width: 100%;
  background: #fff;
}
.fukidashi.toai {
  width: min(100%, 454px);
  background: #ff6705;
  color: #fff;
}
.fukidashi + .fukidashi {
  margin-top: 32px;
}
.fukidashi.fromai + .fukidashi.fromai,
.fukidashi.toai + .fukidashi.toai {
  margin-top: 16px;
}
.fukidashi::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 16px;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  position: absolute;
  top: 24px;
}
.fukidashi.fromai::before {
  background: #fff;
  right: calc(100% - 1px);
}
.fukidashi.toai::before {
  background: #ff6705;
  left: calc(100% - 1px);
  rotate: 180deg;
}

@media screen and (min-width: 768px) {
  .reset a,
  .reset a::before,
  .reset a::after {
    transition: 0.3s;
  }
  .reset a:hover {
    color: #333;
    &::before {
      translate: -4px 0;
      background: #333;
    }
    &::after {
      translate: -4px -50%;
    }
  }
}

@media screen and (max-width: 767px) {
  .reset {
    height: 60px;
    padding-top: 0;
    padding-inline: 20px;
  }
  .chat_inner {
    padding-inline: 20px;
  }
  .chat_note {
    margin-bottom: 24px;
  }
  .chat_note p:nth-of-type(n + 2) {
    margin-top: 12px;
  }
  .fukidashi + .fukidashi {
    margin-top: 16px;
  }
  .fukidashi.fromai + .fukidashi.fromai,
  .fukidashi.toai + .fukidashi.toai {
    margin-top: 8px;
  }
  .fukidashi::before {
    width: 10px;
    height: 10px;
    top: 16px;
  }
}

#input {
  background: #e5e5e5;
  width: 100%;
  position: fixed;
  left: 0;
  bottom: 0;
}
#input form {
  width: min(850px, 100%);
  padding: 20px 25px 48px;
  margin-inline: auto;
  position: relative;
}
#input form textarea {
  resize: none;
  width: 100%;
  height: 80px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  font-size: 16px;
  outline: none;
}
.check {
  position: static;
  left: 25px;
  bottom: 20px;
  display: flex;
  flex-flow: row wrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
}
.check input {
  display: none;
}
.check .checkbox {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ff6707;
  border-radius: 2px;
  position: relative;
  transition: 0.3s;
}
.check input:checked + .checkbox {
  background: #ff6707;
}
.check input:checked + .checkbox::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 12px;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -60%;
  rotate: 45deg;
}
.btns,
.voicebtns {
  position: absolute;
  right: 35px;
  bottom: 70px;
  display: flex;
  flex-flow: row wrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.btns button,
.voicebtns button {
  display: flex;
  width: 32px;
  height: 32px;
  border-radius: 300px;
  background: no-repeat center / 20px;
  cursor: pointer;
  position: relative;
}
button.voice {
  background-image: url(../img/ai_chat/voice.png);
  border: 1px solid #dddddd;
}
button.send {
  background-image: url(../img/ai_chat/send.png);
  background-color: #ff6705;
  border: none;
}
button.cancelbtn {
  border: 1px solid #dddddd;
}
button.cancelbtn::before,
button.cancelbtn::after {
  content: "";
  display: inline-block;
  width: 40%;
  height: 2px;
  background: #888;
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  rotate: 45deg;
}
button.cancelbtn::after {
  rotate: 135deg;
}
button.compbtn::before {
  content: "";
  display: inline-block;
  width: 10%;
  height: 25%;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -60%;
  rotate: 45deg;
}

button.compbtn {
  background-color: #ff6705;
  border: none;
}

.voiceinput {
  width: 100%;
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
  padding: 36px 41px 0;
  color: #222;
  font-size: 12px;
}
.voiceinput::before {
  content: "";
  display: inline-block;
  width: calc(100% - 120px);
  border-bottom: 1px dashed #757575;
}

@media screen and (max-width: 767px) {
  #input form {
    padding: 20px 20px 34px;
  }
  #input form textarea {
    font-size: 13px;
  }
  .check {
    left: 20px;
    bottom: 16px;
    gap: 4px;
    font-size: 12px;
  }
  .check .checkbox {
    width: 14px;
    height: 14px;
  }
  .check input:checked + .checkbox::before {
    width: 2px;
    height: 6px;
  }
  .btns,
  .voicebtns {
    right: 28px;
    bottom: 46px;
    gap: 6px;
  }
  .btns button,
  .voicebtns button {
    width: 24px;
    height: 24px;
    background-size: 15px;
  }
  .voiceinput {
    padding: 41px 36px 0;
    gap: 10px;
  }
  .voiceinput::before {
    width: 100%;
  }
}

div.error {
  width: auto;
  font-size: 90%;
  font-weight: bold;
  color: red;
  box-sizing: border-box;
}

