:root {
  --bg: #edf5ef;
  --card: rgba(255, 255, 255, 0.97);
  --brand: #157347;
  --brand-soft: #dcefe3;
  --accent: #c7a44c;
  --text: #183226;
  --muted: #688172;
  --border: rgba(21, 115, 71, 0.14);
  --assistant: #eef7f1;
  --user: #157347;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(199, 164, 76, 0.18), transparent 32%),
    linear-gradient(180deg, #f7fbf8 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

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

.chat-card {
  width: min(100%, 430px);
  min-height: calc(100vh - 24px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: 0 20px 60px rgba(17, 48, 31, 0.08);
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.brand-hero {
  padding: 34px 18px 8px;
  text-align: center;
}

.brand-logo {
  display: block;
  width: min(100%, 250px);
  margin: 0 auto 12px;
}

.operator-portrait {
  display: block;
  width: min(100%, 380px);
  max-height: 420px;
  object-fit: contain;
  margin: 0 auto;
}

.slogan {
  margin: 8px auto 0;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.icon-button,
.send-button {
  border: none;
  cursor: pointer;
}

.chat-window {
  min-height: 260px;
  padding: 0 18px 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
}

.empty-stage {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 380px;
}

.message {
  display: flex;
}

.message-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message.user {
  justify-content: end;
}

.message.user .message-body {
  align-items: end;
}

.bubble {
  max-width: 84%;
  padding: 13px 14px;
  border-radius: 18px;
  line-height: 1.45;
  font-size: 15px;
}

.message.assistant .bubble {
  background: var(--assistant);
  color: var(--text);
  border-bottom-left-radius: 8px;
}

.message.user .bubble {
  background: var(--user);
  color: white;
  border-bottom-right-radius: 8px;
}

.message-source {
  font-size: 12px;
  color: var(--brand);
  text-decoration: none;
  padding-left: 4px;
}

.composer {
  padding: 10px 18px 40px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
}

.icon-button {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 22px;
}

.icon-button.recording {
  background: #ffdede;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(21, 115, 71, 0.12);
  border-radius: 16px;
  padding: 15px 16px;
  background: white;
  color: var(--text);
}

input:focus {
  outline: 2px solid rgba(21, 115, 71, 0.22);
  border-color: transparent;
}

.send-button {
  background: #1f6de0;
  color: white;
  border-radius: 16px;
  padding: 15px 16px;
  font-weight: 700;
}

@media (min-width: 768px) {
  .app-shell {
    padding: 24px;
  }

  .chat-card {
    min-height: 820px;
  }
}
