* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: #fff;
  color: #111;
}

.app {
  height: 100vh;
}

/* ===== 初期画面 ===== */
.start-screen {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.start-inner {
  text-align: center;
}

.start-inner h1 {
  font-size: 20px;
  margin-bottom: 16px;
}

.start-inner input {
  width: 360px;
  max-width: 90%;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.start-inner input:focus {
  outline: none;
  border-color: #bbb;
}

/* ===== チャット画面 ===== */
.chat-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.hidden {
  display: none;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}

.messages {
  width: 720px;
  max-width: 95%;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 行 */
.message-row {
  display: flex;
}

.message-row.user {
  justify-content: flex-end;
}

.message-row.ai {
  justify-content: flex-start;
}

/* カード */
.message-card {
  background: #f4f4f5;
  border-radius: 14px;
  padding: 12px 16px;
  max-width: 70%;
  font-size: 14px;
  line-height: 1.6;
}

.ai-plain {
  max-width: 70%;
  font-size: 14px;
  padding: 4px 0;
}

/* 区切り線 */
.divider {
  height: 1px;
  background: #e5e5e5;
  margin: 16px 0;
}

/* 入力 */
.input-wrapper {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid #e5e5e5;
}

#chat-input {
  width: 640px;
  max-width: calc(95% - 48px);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

#chat-send {
  width: 40px;
  border-radius: 10px;
  border: none;
  background: #111;
  color: #fff;
  cursor: pointer;
}
