#ai-icon {
  position: fixed;
  right: 32px;
  bottom: 31px;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #2196F3 0%, #EB66F3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 1001;
  flex-shrink: 0;
}

#ai-icon img {
  width: 50px;
  height: 50px;
}

#ai-icon .tooltip {
  width: 180px;   
  height: auto;  
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: absolute;
  bottom: 80px;
  left: -12px;
  transform: translateX(-50%);
  z-index: 1002;
}

#ai-icon:hover .tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1.15);  
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

#chat-modal {
  position: fixed;
  right: 18px;
  bottom: 17px;
  width: 30.7%;
  height: 76.6%;
  background: white;
  border-radius: 16px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 1001;
  padding: 16px;
}

#chat-modal.hidden,
#overlay.hidden {
  display: none;
}

.modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; 
  font-weight: bold;
}

.modal-header span {
  padding-top: 6px;
  font-size: 24px;
}

#close-modal {
  position: absolute;
  right: 1px;
  top: 1px;
  padding: 8px;
}


#close-modal img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  cursor: pointer;
  position: relative;
  top: -8.7px;
  left: 5px;
}

.modal-content {
  position: relative;
}

.ai-row {
  display: flex;
  align-items: center;
  gap: 26px;
}

.ai-icon-box {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #2196F3 0%, #EB66F3 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  margin-left: 9px;
  margin-top: 16px;
}

.ai-icon-box img {
  width: 50px;
  height: 50px;
}

.ai-message {
  max-width: 70%;            
  word-wrap: break-word;      
  overflow-wrap: break-word; 
  white-space: normal;        
}

.ai-message p {
  margin: 0;
  font-size: 21px;
  color: #666;
}


