:root {
  --bg-1: #f5efe3;
  --bg-2: #e7d8c4;
  --panel: rgba(255, 252, 246, 0.9);
  --text: #1c1a18;
  --muted: #655f57;
  --accent: #0d5a46;
  --accent-2: #08392d;
  --line: rgba(13, 90, 70, 0.14);
  --user: #d8ebe3;
  --bot: #fffdf8;
  --shadow: 0 24px 70px rgba(27, 29, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 90, 70, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(189, 121, 53, 0.2), transparent 34%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

.app {
  width: min(920px, 100%);
  min-height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 28px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(244,236,222,0.92));
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-size: 0.82rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  letter-spacing: 0.06em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  overflow-y: auto;
}

.message {
  max-width: min(78ch, 82%);
  padding: 14px 16px;
  line-height: 1.45;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: 20px;
  animation: rise 160ms ease-out;
}

.message.user {
  align-self: flex-end;
  background: var(--user);
  border-bottom-right-radius: 6px;
}

.message.bot {
  align-self: flex-start;
  background: var(--bot);
  border-bottom-left-radius: 6px;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.86);
}

input,
button {
  font: inherit;
}

input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(13, 90, 70, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 0 24px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

button:disabled,
input:disabled {
  opacity: 0.65;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  body {
    padding: 0;
  }

  .app {
    min-height: 100vh;
    border-radius: 0;
  }

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

  .message {
    max-width: 100%;
  }
}
