* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #f3f4f6;
  color: #111827;
}

body {
  display: flex;
  justify-content: center;
}

.app {
  width: 100%;
  max-width: 760px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.header {
  padding:
    calc(16px + env(safe-area-inset-top))
    20px
    14px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.brand {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.5px;
}

.agent {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 13px;
  color: #6b7280;
}

.status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.conversation {
  flex: 1;
  overflow-y: auto;
  padding: 22px 16px 120px;
}

.message {
  display: flex;
  margin-bottom: 14px;
}

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

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

.assistant .bubble {
  background: #f3f4f6;
  border-bottom-left-radius: 6px;
}

.user .bubble {
  background: #111827;
  color: #ffffff;
  border-bottom-right-radius: 6px;
}

.composer {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 760px;

  display: flex;
  align-items: flex-end;
  gap: 8px;

  padding:
    12px
    12px
    calc(12px + env(safe-area-inset-bottom));

  border-top: 1px solid #e5e7eb;
  background: rgba(255,255,255,.96);
}

textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;

  padding: 11px 13px;

  border: 1px solid #d1d5db;
  border-radius: 18px;

  font: inherit;
  outline: none;
}

textarea:focus {
  border-color: #111827;
}

button {
  border: 0;
  cursor: pointer;
}

.audio-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f4f6;
  color: #111827;
  font-size: 18px;
}

.send-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 18px;
  background: #111827;
  color: #ffffff;
  font-weight: 650;
}

@media (min-width: 761px) {
  .app {
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
  }
}
