body {
  font-family: sans-serif;
  background: #fff;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 600px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: white;
  margin-top: -5vh;
  box-sizing: border-box;
}

.chatbox {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  max-width: 80%;
  line-height: 1.4;
  word-break: break-word;
}

.gsdn {
  background: #f3f4f6;
  align-self: flex-start;
}

.user {
  background: #2563eb;
  color: white;
  align-self: flex-end;
}

.input-area {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-sizing: border-box;
}

button {
  padding: 0.75rem 1.25rem;
  background: #111827;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background: #1f2937;
  transform: scale(1.05);
}

button:active {
  transform: scale(0.97);
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #888;
}

@media (max-width: 600px) {
  .container {
    padding: 1.5rem 1rem;
    margin-top: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  input, button {
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
  }

  .input-area {
    flex-direction: column;
    gap: 0.75rem;
  }

  .message {
    font-size: 0.9rem;
  }
}

/* モーダル関連スタイル */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-close {
  margin-top: 1.5rem;
  text-align: right;
}
.modal-close button {
  background: #111827;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

footer a {
  color: #666;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
footer a:hover {
  color: #111827;
  text-decoration: underline dotted;
}

/* モーダルのビジュアルを洗練 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 16px;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  font-size: 1rem;
  line-height: 1.6;
}

.modal-content h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.modal-content p {
  margin: 0.5rem 0;
}

.modal-close {
  margin-top: 2rem;
  text-align: right;
}
.modal-close button {
  background: #111827;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}
