.chat {
  position: relative;
  overflow: auto;
  padding: 12px 28px 18px;
  min-height: 0;          /* 关键：让 1fr 行能收缩并出现滚动条，输入框始终贴底 */
}

.welcome {
  max-width: 720px;
  margin: 48px auto 0;
  text-align: center;
}

.kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--muted);
}

.welcome h2 {
  font-family: var(--font-display);
  font-size: var(--title-char-size);
  font-weight: 500;
  margin: 10px 0 14px;
  background: linear-gradient(90deg, var(--neon-orange), var(--neon-pink), var(--neon-yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(255, 156, 64, 0.25));
}

.lead {
  color: var(--ink-soft);
  line-height: 1.7;
}

.quick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.quick button {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
  transition: 0.15s;
}

.quick button:hover {
  background: rgba(255, 156, 64, 0.12);
  border-color: rgba(255, 156, 64, 0.4);
  color: var(--neon-orange);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
  padding-bottom: 12px;
}

.msg {
  display: grid;
  gap: 8px;
  max-width: 86%;
}

.msg.user { margin-left: auto; }
.msg.bot { margin-right: auto; }

.bubble {
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.65;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.msg.user .bubble {
  background: linear-gradient(180deg, rgba(255, 156, 64, 0.15), rgba(56, 187, 212, 0.10));
  border-color: rgba(255, 156, 64, 0.32);
}

/* 思考中：呼吸光晕 */
.bubble.typing {
  animation: typing-pulse 1.1s ease-in-out infinite;
  border-color: rgba(255, 156, 64, 0.4);
}

@keyframes typing-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 156, 64, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 156, 64, 0.12); }
}

.who {
  font-size: 12px;
  color: var(--muted);
}

.card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.card img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
}

.meta {
  font-size: 12px;
  color: var(--muted);
}

.result-grid {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.result-item b {
  font-weight: 500;
  color: var(--neon-cyan);
}
