:root {
  color-scheme: light;
  font-family:
    "Segoe UI",
    "Noto Sans KR",
    system-ui,
    -apple-system,
    sans-serif;
  background: #f4f7f6;
  color: #17211f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(31, 93, 84, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(226, 124, 73, 0.14), transparent 42%),
    #f4f7f6;
}

.panel {
  width: min(720px, 100%);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dce5e2;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(23, 33, 31, 0.14);
  padding: 24px;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #59716c;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1f5d54;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2aa876;
}

.chat {
  min-height: 320px;
  max-height: 52vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e3ebe8;
  border-radius: 8px;
  background: #fbfcfc;
}

.message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

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

.message p {
  max-width: min(520px, 82%);
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  line-height: 1.55;
}

.message.agent p {
  background: #edf5f2;
  color: #17322d;
}

.message.user p {
  background: #263d39;
  color: #fff;
}

.avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1f5d54;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 16px;
}

input {
  min-width: 0;
  border: 1px solid #cbd8d5;
  border-radius: 8px;
  padding: 13px 14px;
  color: #17211f;
  background: #fff;
}

input:focus {
  border-color: #1f5d54;
  outline: 3px solid rgba(31, 93, 84, 0.16);
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.composer button {
  padding: 0 18px;
  background: #d62828;
  color: #fff;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chips button {
  padding: 9px 12px;
  background: #fff0f0;
  color: #a31621;
  border: 1px solid #f0b4b4;
}

@media (max-width: 560px) {
  .app {
    padding: 12px;
    align-items: stretch;
  }

  .panel {
    padding: 18px;
  }

  h1 {
    font-size: 28px;
  }

  .chat {
    min-height: 52vh;
  }

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

  .composer button {
    min-height: 46px;
  }
}
