* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 199, 145, 0.35), transparent 35%),
    linear-gradient(160deg, #f5efe6, #dfecf7 55%, #d7e4d2);
  color: #1f2937;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.chat-card {
  width: min(720px, 100%);
  height: min(80vh, 760px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(64, 86, 109, 0.16);
}

.chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.chat-head h1,
.chat-head p {
  margin: 0;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7c6f64;
}

.note {
  margin-top: 10px;
  max-width: 420px;
  font-size: 14px;
  line-height: 1.5;
  color: #5b6472;
}

.status {
  padding-top: 8px;
  font-size: 14px;
  color: #4b5563;
}

.messages {
  overflow: auto;
  padding: 8px 4px;
}

.message {
  max-width: 86%;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(69, 89, 108, 0.1);
}

.message.system {
  max-width: 100%;
  text-align: center;
  color: #6b7280;
  background: transparent;
  box-shadow: none;
}

.message p {
  margin: 0;
  line-height: 1.5;
  word-break: break-word;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #6b7280;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.composer input,
.composer button {
  border: 0;
  border-radius: 14px;
  font: inherit;
}

.composer input {
  min-width: 0;
  padding: 14px 16px;
  background: rgba(245, 247, 250, 0.95);
  outline: 1px solid rgba(132, 147, 166, 0.2);
}

.composer button {
  padding: 14px 20px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c, #f97316);
  cursor: pointer;
}

@media (max-width: 640px) {
  .chat-card {
    height: 100vh;
    padding: 16px;
    border-radius: 0;
  }

  .chat-head {
    flex-direction: column;
  }

  .composer {
    grid-template-columns: 1fr;
  }
}
