@charset "UTF-8";
body {
  font-family: "Yusei Magic", "Poetsen One", sans-serif;
  margin: 0;
  padding: 0;
  height: 100vh;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

.header {
  background: #0a3d62;
  color: #fff;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.header__title {
  font-size: 40px;
}

.chat-container {
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px;
  padding-bottom: 140px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  margin-top: 80px;
}

.chat {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 1rem;
  width: 80%;
  max-width: 900px;
  margin: 0 auto;
  white-space: pre-wrap;
}

#chatEnd {
  height: 0; /* 入力欄の高さに合わせて調整 */
}

.message {
  padding: 12px 18px;
  border-radius: 12px;
  line-height: 1.6;
  max-width: 80%;
  word-wrap: break-word;
}

.user {
  -ms-flex-item-align: end;
      align-self: flex-end;
  background: #38ada9;
  color: #fff;
}

.ai {
  -ms-flex-item-align: start;
      align-self: flex-start;
  background: #fff;
  border: 1px solid #ccc;
  color: #333;
}

.input-area {
  position: fixed;
  bottom: 0;
  left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  background: #f5f6fa;
  border-top: 1px solid #ccc;
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto; /* 高さ固定 */
  z-index: 200;
}

.input-box {
  width: 80%;
  max-width: 900px;
  margin: 0 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 20px;
}
@media screen and (max-width: 767px) {
  .input-box {
    display: block;
  }
}

#question {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  padding: 10px;
  border: 2px solid #0a3d62;
  border-radius: 10px;
  resize: none;
  font-size: 1rem;
  width: 100%;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

#sendBtn {
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 8px;
  background: #38ada9;
  color: white;
  border: none;
  cursor: pointer;
  -webkit-transition: 0.2s;
  transition: 0.2s;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}
@media screen and (max-width: 767px) {
  #sendBtn {
    width: 100%;
    margin-top: 10px;
  }
}
#sendBtn:hover {
  background: rgb(43.5283842795, 134.4716157205, 131.3624454148);
}