:root {
  --bg: #f3f1e9;
  --panel: #fffef9;
  --ink: #1f2622;
  --muted: #727870;
  --line: #dbddd5;
  --human-bg: #e6f1fb;
  --human-ink: #0c447c;
  --coach-bg: #e9f3df;
  --coach-ink: #294d2b;
  --coach-core-bg: #fff1cf;
  --coach-core-ink: #503b13;
  --coach-core-line: #dfc27a;
  --accent: #335f37;
  --warm: #fff4d8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; padding: 18px 12px 52px; color: var(--ink); background: var(--bg); }
button, textarea { font: inherit; }
button { cursor: pointer; }
.room { width: min(800px, 100%); min-height: calc(100dvh - 70px); margin: 0 auto; display: grid; grid-template-rows: auto auto auto auto auto minmax(340px, 1fr) auto; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 18px 46px rgba(39,52,42,.09); }
.room-head { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 7px; color: #596159; font-size: 11px; font-weight: 750; letter-spacing: .02em; }
.brand-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: #fff; background: var(--accent); font-size: 10px; }
.room-head h1 { margin: 0; font: 600 23px/1.2 Georgia, "Songti SC", serif; }
.room-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.about { padding: 8px 11px; border: 1px solid #cdd3cb; border-radius: 10px; color: var(--accent); background: #fff; font-size: 11px; font-weight: 700; }
.people { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); background: #fafbf6; }
.person-card { display: flex; min-width: 0; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.person-card strong, .person-card span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card strong { font-size: 13px; }
.person-card span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.person-card em { padding: 2px 4px; border-radius: 4px; color: var(--coach-ink); background: var(--coach-bg); font-size: 9px; font-style: normal; }
.conversation-line { display: flex; gap: 5px; }
.conversation-line i { width: 4px; height: 4px; border-radius: 50%; background: #9cab99; }
.avatar { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; border-radius: 11px; font-size: 13px; font-weight: 800; }
.human-avatar { color: var(--human-ink); background: var(--human-bg); }
.coach-avatar { color: var(--coach-ink); background: var(--coach-bg); }
.truth-note, .audit-notice { padding: 9px 18px; font-size: 10px; line-height: 1.6; }
.truth-note { border-bottom: 1px solid #eadfbf; color: #66542a; background: var(--warm); }
.audit-notice { border-bottom: 1px solid #d7e1e8; color: #36556a; background: #f3f8fb; }
.audit-notice a, dialog a { color: #174d74; }
.quick-prompts { display: flex; gap: 7px; padding: 9px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #fff; scrollbar-width: none; }
.quick-prompts::-webkit-scrollbar { display: none; }
.quick-prompts button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #d8ded4; border-radius: 999px; color: #4f6250; background: #f8fbf4; font-size: 10px; }
.messages { min-height: 0; padding: 22px 18px 30px; overflow-y: auto; overscroll-behavior: contain; background: #fdfdf9; }
.message { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 15px; }
.message.continuation { margin-top: -8px; }
.message.continuation .message-avatar, .message.continuation .message-label { visibility: hidden; }
.message.segment-core.continuation .message-label { visibility: visible; color: #8a6b2d; }
.message.user { flex-direction: row-reverse; }
.message.user .message-avatar { display: none; }
.message.user .message-body { align-items: flex-end; }
.message-body { display: flex; max-width: 80%; flex-direction: column; gap: 5px; }
.message-label { padding: 0 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.message-receipt { padding: 0 3px; color: #8a8d84; font-size: 9px; letter-spacing: .02em; }
.bubble { padding: 11px 14px; border: 1px solid transparent; border-radius: 5px 15px 15px; font-size: 14px; line-height: 1.66; white-space: pre-wrap; word-break: break-word; }
.user .bubble { border-radius: 15px 5px 15px 15px; color: var(--human-ink); background: var(--human-bg); border-color: #c8e0f5; }
.coach .bubble { color: var(--coach-ink); background: var(--coach-bg); border-color: #d2e5c3; }
.coach.segment-core .message-body { max-width: 88%; }
.coach.segment-core .bubble { color: var(--coach-core-ink); background: var(--coach-core-bg); border-color: var(--coach-core-line); border-left-width: 3px; }
.typing .bubble::after { content: "•••"; letter-spacing: 4px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.composer-area { padding: 12px 14px 14px; border-top: 1px solid var(--line); background: #fff; }
.status { min-height: 18px; color: #806031; font-size: 11px; }
.composer { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: end; }
.mic, .send { height: 44px; border-radius: 11px; }
.mic { width: 44px; border: 1px solid var(--line); background: #fff; }
.mic.listening { color: #fff; background: #a94f25; }
.send { min-width: 62px; padding: 0 14px; border: 0; color: #fff; background: var(--accent); font-weight: 750; }
textarea { width: 100%; max-height: 120px; min-height: 44px; padding: 10px 12px; resize: none; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--ink); background: #fff; line-height: 1.5; }
textarea:focus { border-color: #87a486; }
button:disabled, textarea:disabled { opacity: .48; cursor: default; }
.input-note { display: flex; justify-content: space-between; gap: 12px; margin: 8px 2px 0 52px; color: #918f87; font-size: 10px; }
#quota-note { color: #526d7e; white-space: nowrap; }
.share-disclaimer { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; padding: 9px 12px max(9px, env(safe-area-inset-bottom)); border-top: 1px solid #dfdbd3; color: #6d6963; background: rgba(250,249,246,.97); text-align: center; font-size: 10px; }
dialog { width: min(520px, calc(100% - 30px)); padding: 24px; border: 0; border-radius: 17px; color: var(--ink); box-shadow: 0 24px 70px rgba(20,28,21,.24); }
dialog::backdrop { background: rgba(24,30,25,.55); }
.dialog-kicker { color: #617361; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
dialog h2 { margin: 7px 0 12px; font: 600 25px Georgia, "Songti SC", serif; }
dialog p, dialog li { color: #676b65; font-size: 12px; line-height: 1.7; }
dialog ul { padding-left: 20px; }
dialog li { margin-bottom: 9px; }
dialog li strong, dialog li span { display: block; }
dialog button { width: 100%; padding: 10px; border: 0; border-radius: 9px; color: #fff; background: var(--accent); }
@media (max-width: 620px) {
  body { padding: 0 0 47px; }
  .room { min-height: calc(100dvh - 47px); border: 0; border-radius: 0; }
  .room-head { padding: max(14px, env(safe-area-inset-top)) 14px 13px; grid-template-columns: 1fr auto; }
  .brand { display: none; }
  .people { padding: 9px; gap: 7px; }
  .person-card { padding: 8px; }
  .person-card span { display: none; }
  .message-body { max-width: 88%; }
  .input-note { margin-left: 2px; flex-wrap: wrap; }
  .composer { grid-template-columns: auto 1fr; }
  .send { grid-column: 2; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; scroll-behavior: auto !important; } }
