:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #173b4d;
  background: #eef6fa;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { min-height: 100vh; background-color: #eef6fa; background-image: linear-gradient(#d6e7ef 1px, transparent 1px), linear-gradient(90deg, #d6e7ef 1px, transparent 1px); background-size: 52px 52px; }
button, textarea { font: inherit; }
button { cursor: pointer; }

.xfz-page { display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
.xfz-header { width: min(1180px, calc(100% - 48px)); height: 90px; display: flex; align-items: center; justify-content: space-between; margin: 0 auto; border-bottom: 1px solid #c7dbe6; }
.xfz-brand { display: inline-flex; align-items: center; gap: 12px; color: #174b5e; text-decoration: none; font-size: 18px; font-weight: 800; }
.xfz-brand-mark { display: grid; width: 40px; height: 40px; place-items: center; color: #fff; border-radius: 12px; background: #e05b4a; box-shadow: 3px 3px 0 #f2b45f; font-size: 14px; font-weight: 800; }
.xfz-status { display: inline-flex; align-items: center; gap: 9px; color: #52717e; font-size: 15px; font-weight: 650; }
.xfz-status span { width: 10px; height: 10px; border-radius: 50%; background: #3f9c79; box-shadow: 0 0 0 4px #3f9c7922; }
.xfz-main { width: min(1180px, calc(100% - 48px)); flex: 1; display: flex; align-items: center; justify-content: center; margin: 0 auto; padding: 42px 0 188px; }
.xfz-chat { width: min(840px, 100%); min-height: 480px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; margin: 0 auto; padding: 36px 0 24px; }
.xfz-welcome { display: flex; flex-direction: column; align-items: center; text-align: center; margin: auto; }
.xfz-emblem { position: relative; width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: 24px; }
.xfz-emblem::before, .xfz-emblem::after { content: ""; position: absolute; width: 76px; height: 76px; border: 2px solid #6ba6c0; border-radius: 18px; }
.xfz-emblem::before { transform: translate(-11px, -7px); }
.xfz-emblem::after { transform: translate(11px, 8px); border-color: #f0ad63; }
.xfz-emblem span { position: relative; z-index: 1; width: 58px; height: 58px; display: grid; place-items: center; color: #fff; border-radius: 16px; background: #e05b4a; box-shadow: 4px 4px 0 #f2b45f; font-size: 22px; font-weight: 800; transform: rotate(45deg); }
.xfz-emblem span i { font-style: normal; transform: rotate(-45deg); }
.xfz-slogan { margin: 12px 0 0; color: #52717e; font-size: 18px; font-weight: 600; }
.message { display: flex; gap: 12px; width: 100%; margin: 0 0 24px; line-height: 1.75; }
.message.user { flex-direction: row-reverse; }
.avatar { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-size: 12px; font-weight: 800; }
.message.user .avatar { color: #2c6681; background: #d9edf5; }
.message.assistant .avatar { color: #fff; background: #e05b4a; }
.message-content { min-width: 0; max-width: 78%; padding: 2px 4px; color: #1d4b5d; font-size: 17px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user .message-content { padding: 12px 16px; color: #173b4d; border: 1px solid #c4dde8; border-radius: 16px 4px 16px 16px; background: #e2f1f6; }
.message.assistant .message-content { max-width: 100%; }
.error { color: #b74842; }
.cursor { display: inline-block; width: 7px; height: 17px; margin-left: 2px; vertical-align: -1px; background: #e05b4a; animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.xfz-composer-wrap { position: fixed; right: 0; bottom: 0; left: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 18px 24px 88px; background: linear-gradient(transparent, #eef6fa 30px); }
.xfz-composer { width: min(860px, calc(100% - 70px)); min-height: 72px; display: flex; align-items: center; gap: 12px; padding: 12px 13px 12px 21px; border: 2px solid #b5d2de; border-radius: 16px; background: rgba(255,255,255,.97); box-shadow: 0 12px 30px #2f6f861c; }
.xfz-composer:focus-within { border-color: #e05b4a; box-shadow: 0 0 0 4px #e05b4a1a, 0 12px 30px #2f6f861c; }
.xfz-composer textarea { flex: 1; min-height: 36px; max-height: 160px; padding: 5px 0; resize: none; outline: 0; color: #174252; border: 0; background: transparent; font-size: 17px; line-height: 1.5; }
.xfz-composer textarea::placeholder { color: #8fa9b3; }
.xfz-composer button { flex: 0 0 46px; width: 46px; height: 46px; display: grid; place-items: center; padding: 0 0 4px; color: #fff; border: 0; border-radius: 12px; background: #e05b4a; box-shadow: 2px 2px 0 #f2b45f; font-size: 30px; line-height: 1; }
.xfz-composer button:hover { background: #ca4c3d; }
.xfz-composer button:disabled { color: #a7bac3; background: #e2ebef; box-shadow: none; }

@media (max-width: 700px) {
  body { background-size: 35px 35px; }
  .xfz-header, .xfz-main { width: calc(100% - 32px); }
  .xfz-header { height: 74px; }
  .xfz-brand { gap: 9px; font-size: 16px; }
  .xfz-brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; }
  .xfz-status { font-size: 12px; }
  .xfz-status span { width: 8px; height: 8px; }
  .xfz-main { padding: 18px 0 160px; }
  .xfz-chat { min-height: 395px; padding: 22px 0 16px; }
  .xfz-welcome { margin: auto; }
  .xfz-emblem { transform: scale(.84); margin-bottom: 11px; }
  .xfz-slogan { font-size: 16px; }
  .message { gap: 10px; margin-bottom: 20px; }
  .message-content { max-width: 86%; font-size: 16px; }
  .message.user .message-content { padding: 11px 14px; }
  .xfz-composer-wrap { padding: 12px 12px 76px; }
  .xfz-composer { width: 100%; min-height: 64px; padding-left: 15px; border-radius: 13px; }
  .xfz-composer textarea { font-size: 16px; }
}
