body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #fff; 
}

.chat-container {
  width: 100%;
  height: 100vh; 
  height: 100dvh;
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  color: #333;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-box {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

#welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #333;
    width: 90%;
}

#welcome-message h2 {
    font-size: 1.7rem;
    font-weight: 500;
    color: #444;
}

.message {
  display: flex;
  align-items: flex-start;
  margin: 25px 0;
  line-height: 1.6;
}

.message-icon {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.message.user .message-icon {
    background-color: #19C37D;
}

.message.bot .message-icon {
    background-color: #7556d4;
}

.message-text {
  max-width: calc(100% - 45px);
  color: #333;
  white-space: pre-wrap;
}

.input-area {
  padding: 10px 15px 20px 15px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.chat-input {
  display: flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  padding: 5px 5px 5px 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  /* --- ↓↓↓ ここから追加 ↓↓↓ --- */
  max-width: 768px;
  margin-left: auto;
  margin-right: auto;
  /* --- ↑↑↑ ここまで追加 ↑↑↑ --- */
}

.chat-input input {
  flex: 1;
  padding: 10px 0;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
}

.chat-input button {
  background: #E0E0E0;
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: background-color 0.2s;
}

.chat-input button.active {
    background-color: #7556d4;
}

.chat-input button:hover:not(.active) {
    background-color: #d5d5d5;
}

.send-icon {
    transform: rotate(0deg);
}

.footer-text {
    font-size: 12px;
    color: #999;
    text-align: center;
    margin-top: 15px;
    /* --- ↓↓↓ ここから追加 ↓↓↓ --- */
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
    /* --- ↑↑↑ ここまで追加 ↑↑↑ --- */
}

.citation {
  font-size: 12px;
  color: #808080;
  margin-top: 12px;
  display: block;
  text-align: right;
}

@media (min-width: 768px) {
  #welcome-message h2 {
    font-size: 2.5rem;
  }
}

#info-icon {
  cursor: pointer;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#info-icon:hover {
  color: #333;
}

#info-popup {
  display: none;
  position: absolute;
  top: 50px;
  right: 15px;
  width: 280px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 15px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  z-index: 20;
}