:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #18312e;
  background: #f5f8f5;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, textarea { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.topbar { background: #fff; border-bottom: 1px solid #e3ebe7; }
.topbar-inner { max-width: 1000px; min-height: 68px; margin: auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #173d36; font-weight: 750; text-decoration: none; font-size: 17px; letter-spacing: .01em; }
.brand-mark { width: 31px; height: 31px; display: inline-grid; place-items: center; border-radius: 10px; background: #176e5c; color: #fff; font-size: 21px; font-weight: 700; }
.topbar-note { color: #697c75; font-size: 13px; }
.shell { max-width: 852px; margin: 0 auto; padding: 62px 24px 48px; }
.intro { margin-bottom: 28px; }
.eyebrow { color: #257967; font-size: 12px; font-weight: 750; letter-spacing: .13em; }
h1 { margin: 12px 0 10px; font-size: clamp(26px, 4vw, 38px); line-height: 1.27; letter-spacing: -.035em; }
.intro p { margin: 0; color: #6a7c76; line-height: 1.7; font-size: 15px; }
.chat-card { overflow: hidden; border: 1px solid #dce8e2; border-radius: 19px; background: #fff; box-shadow: 0 18px 48px rgba(32, 76, 60, .055); }
.card-head { min-height: 76px; padding: 19px 25px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e9efeb; }
.card-head strong { display: block; font-size: 16px; }
.head-subtitle { display: block; margin-top: 5px; color: #879790; font-size: 12px; }
.badge { flex: none; padding: 7px 10px; border-radius: 100px; background: #f2f5f3; color: #70847b; font-size: 12px; }
.badge.ready { background: #e9f5ee; color: #26755a; }
.messages { height: min(53vh, 470px); min-height: 305px; overflow-y: auto; padding: 24px 25px; display: flex; flex-direction: column; gap: 20px; }
.empty-chat { margin: auto; text-align: center; color: #82958b; font-size: 14px; }
.empty-chat p { margin: 12px 0 0; }
.empty-icon { display: inline-grid; width: 50px; height: 50px; place-items: center; border-radius: 16px; background: #eef7f0; color: #4a9b75; font-size: 25px; }
.message { max-width: min(84%, 610px); align-self: flex-start; }
.message.user { align-self: flex-end; }
.message-label { display: block; margin: 0 0 7px 4px; color: #80938a; font-size: 12px; }
.message.user .message-label { text-align: right; margin-right: 4px; }
.message-body { padding: 13px 16px; border: 1px solid #e8efea; border-radius: 4px 15px 15px; background: #f6f9f6; line-height: 1.65; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user .message-body { border-color: #176e5c; border-radius: 15px 4px 15px 15px; background: #176e5c; color: #fff; }
.composer { padding: 18px 22px 20px; border-top: 1px solid #e9efeb; }
.composer textarea { display: block; width: 100%; max-height: 145px; resize: vertical; padding: 10px 3px; border: 0; outline: none; color: #18312e; background: transparent; line-height: 1.6; font-size: 14px; }
.composer textarea::placeholder { color: #9aaba2; }
.composer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.composer-bottom span:first-child { color: #8d9c94; font-size: 12px; line-height: 1.5; }
.composer button { flex: none; border: 0; border-radius: 10px; background: #176e5c; color: #fff; padding: 10px 16px; font-weight: 650; font-size: 13px; }
.composer button:hover { background: #115846; }
.composer button:disabled { cursor: wait; opacity: .6; }
.footnote { margin: 16px 3px; color: #9aaa9e; font-size: 12px; }

@media (max-width: 600px) {
  .topbar-inner { min-height: 59px; padding: 0 17px; }
  .shell { padding: 39px 13px 24px; }
  .intro { padding: 0 7px; }
  .chat-card { border-radius: 15px; }
  .card-head { padding: 16px; }
  .messages { height: 49vh; min-height: 280px; padding: 18px 15px; }
  .composer { padding: 11px 15px 15px; }
  .message { max-width: 90%; }
  .composer-bottom span:first-child { max-width: 45%; }
}
