:root {
  --bg: #f3efe7;
  --panel: rgba(255, 252, 248, 0.82);
  --panel-border: rgba(38, 61, 44, 0.12);
  --text: #16221b;
  --muted: #6a786e;
  --accent: #1c6b4a;
  --accent-strong: #145138;
  --assistant: #ffffff;
  --user: linear-gradient(135deg, #1c6b4a, #2c8f63);
  --shadow: 0 20px 60px rgba(15, 37, 28, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(85, 138, 109, 0.25), transparent 35%),
    radial-gradient(circle at bottom right, rgba(241, 182, 90, 0.22), transparent 30%),
    linear-gradient(180deg, #efe6d8 0%, #f7f4ef 100%);
}
.app-shell { display: grid; place-items: center; min-height: 100vh; padding: 32px 16px; }
.chat-panel {
  width: min(960px, 100%);
  min-height: 80vh;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
}
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px 18px;
  border-bottom: 1px solid rgba(38, 61, 44, 0.08);
}
.chat-header h1 { margin: 4px 0 0; font-size: clamp(1.4rem, 2vw, 2rem); }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); font-size: 0.72rem; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(28, 107, 74, 0.08);
  color: var(--accent);
  font-weight: 700;
}
.status-pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #24b26b; }
.message-list { overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.message { display: flex; }
.message.user { justify-content: flex-end; }
.bubble {
  max-width: min(75%, 700px);
  padding: 16px 18px;
  border-radius: 20px;
  line-height: 1.55;
  box-shadow: 0 8px 30px rgba(15, 37, 28, 0.08);
}
.assistant .bubble { background: var(--assistant); border-bottom-left-radius: 6px; }
.user .bubble { color: white; background: var(--user); border-bottom-right-radius: 6px; }
.card-list { width: min(100%, 760px); display: grid; gap: 14px; }
.park-card {
  background: #fffdfa;
  border: 1px solid rgba(38, 61, 44, 0.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(15, 37, 28, 0.06);
}
.park-name { margin: 0 0 12px; font-size: 1.08rem; }
.park-meta { display: grid; gap: 8px; color: var(--muted); }
.loading { display: flex; gap: 8px; padding: 0 28px 18px; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: 0.12s; }
.loading span:nth-child(3) { animation-delay: 0.24s; }
.hidden { display: none; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 20px 28px 28px; }
.composer input {
  border: 1px solid rgba(38, 61, 44, 0.16);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 1rem;
  outline: none;
}
.composer input:focus { border-color: rgba(28, 107, 74, 0.48); box-shadow: 0 0 0 4px rgba(28, 107, 74, 0.08); }
.composer button {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  padding: 0 24px;
  font-weight: 700;
  cursor: pointer;
}
.composer button:hover { filter: brightness(1.04); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
@keyframes pulse {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-4px); opacity: 1; }
}
@media (max-width: 720px) {
  .chat-panel { min-height: 100vh; border-radius: 0; }
  .chat-header, .message-list, .composer { padding-left: 18px; padding-right: 18px; }
  .bubble { max-width: 90%; }
  .composer { grid-template-columns: 1fr; }
  .composer button { min-height: 52px; }
}