:root {
  color-scheme: light;
  --blue: #173aa8;
  --blue-dark: #0f2779;
  --red: #df2630;
  --text: #34465c;
  --muted: #68788d;
  --line: #d9e0ea;
  --surface: #ffffff;
  --soft: #f4f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
}

.app {
  min-height: 100vh;
  padding: 0;
  background: var(--soft);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 720px;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.chat-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--blue-dark);
}

.chat-header p {
  margin: 0;
  color: var(--muted);
}

.badge {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.message {
  max-width: 82%;
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.48;
  white-space: pre-wrap;
}

.message p {
  margin: 0 0 10px;
}

.message p:last-child {
  margin-bottom: 0;
}

.assistant {
  background: #f1f4f8;
  border: 1px solid #e1e7f0;
}

.user {
  margin-left: auto;
  background: var(--blue);
  color: #fff;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  max-height: 180px;
  padding: 12px;
  border: 1px solid #cfd7e2;
  border-radius: 6px;
  font: inherit;
}

button {
  align-self: end;
  min-width: 108px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #c71f29;
}

.footnote {
  margin: 0;
  padding: 0 24px 18px;
  font-size: 12px;
  color: var(--muted);
  background: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .chat-panel {
    min-height: 640px;
    border-left: 0;
    border-right: 0;
  }

  .chat-header {
    display: block;
  }

  .badge {
    display: inline-block;
    margin-top: 12px;
  }

  .message {
    max-width: 100%;
  }

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

  button {
    width: 100%;
  }
}
