:root {
  --bg: #f3f7f6;
  --surface: #ffffff;
  --surface-alt: #eef5f3;
  --text: #132522;
  --muted: #5c7270;
  --border: #c8d8d4;
  --primary: #0f766e;
  --primary-dark: #0b5d57;
  --accent: #e7f5f2;
  --user: #0f766e;
  --user-text: #ffffff;
  --shadow: 0 12px 40px rgba(16, 42, 39, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dff3ee 0%, transparent 60%),
    radial-gradient(900px 400px at 100% 0%, #e8f1fb 0%, transparent 55%),
    var(--bg);
  line-height: 1.5;
}

.topbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.brand-mark {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; border-radius: 10px; font-size: 1.1rem;
}
.tagline { margin: 0; color: var(--muted); font-size: 0.95rem; }

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 20px 20px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 20px;
  min-height: calc(100vh - 120px);
}

.hero {
  padding: 28px 8px 20px 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.hero p { margin: 0 0 20px; color: var(--muted); font-size: 1.05rem; max-width: 520px; }

.suggestions { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.chip:hover { border-color: #b8ccc7; box-shadow: 0 4px 14px rgba(16,42,39,0.06); transform: translateY(-1px); }

.chat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 560px;
  max-height: calc(100vh - 140px);
  min-width: 0;
}
.chat-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fbfdfd);
  border-radius: 24px 24px 0 0;
}
.assistant { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
}
.assistant-name { font-weight: 600; }
.assistant-status { font-size: 0.85rem; color: var(--muted); }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fbfdfc;
}
.message { display: flex; }
.message.bot { justify-content: flex-start; }
.message.user { justify-content: flex-end; }
.bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.98rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.message.bot .bubble {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid #e3ecea;
  border-bottom-left-radius: 6px;
}
.message.user .bubble {
  background: var(--user);
  color: var(--user-text);
  border-bottom-right-radius: 6px;
}
.bubble strong { font-weight: 600; }
.bubble ul { margin: 8px 0 4px; padding-left: 20px; }
.bubble li { margin: 4px 0; }
.bubble .place-title { font-weight: 700; }
.bubble .hint { color: var(--muted); font-size: 0.9rem; margin-top: 8px; display: block; }
.message.user .bubble .hint { color: rgba(255,255,255,0.85); }

.typing {
  display: inline-flex; gap: 5px; align-items: center; padding: 4px 2px;
}
.typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #9bb3ae;
  animation: bounce 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.composer {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: #fff;
  align-items: flex-end;
  border-radius: 0 0 24px 24px;
}
.composer textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.4;
  max-height: 140px;
  outline: none;
  background: #fcfefe;
  position: relative;
  z-index: 1;
}
.composer textarea:focus { border-color: #9fc9c3; box-shadow: 0 0 0 3px rgba(15,118,110,0.1); }
.send {
  width: 46px; height: 46px; padding: 0; border: none; border-radius: 14px;
  background: var(--primary); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 46px;
  transition: background 0.12s ease, transform 0.1s ease;
}
.send:hover { background: var(--primary-dark); }
.send:active { transform: scale(0.97); }
.send:disabled { opacity: 0.55; cursor: default; }
.send svg { width: 22px; height: 22px; fill: currentColor; display: block; }

.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.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: 900px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 4px; }
  .page { grid-template-columns: 1fr; gap: 12px; min-height: 0; }
  .hero { padding: 8px 0 4px; }
  .hero h1 { font-size: 2rem; }
  .chat { min-height: 70vh; max-height: none; }
}
@media (max-width: 520px) {
  .topbar, .page, .footer { padding-left: 14px; padding-right: 14px; }
  .messages { padding: 14px; }
  .bubble { max-width: 92%; }
}
