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

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: #edf3f6;
  background-image: linear-gradient(rgba(33, 84, 92, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(33, 84, 92, .035) 1px, transparent 1px);
  background-size: 40px 40px;
}

button, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid rgba(41, 75, 83, .12);
  background: rgba(250, 253, 253, .88);
  backdrop-filter: blur(16px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: #18343a; text-decoration: none; font-size: 16px; font-weight: 700; }
.brand-mark, .avatar { display: grid; place-items: center; font-weight: 800; letter-spacing: 0; }
.brand-mark { width: 31px; height: 31px; color: #fff; border-radius: 7px; background: #1d7375; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .1); font-size: 10px; }
.brand-status { display: inline-flex; align-items: center; gap: 8px; color: #667a7e; font-size: 13px; }
.brand-status i { width: 7px; height: 7px; border-radius: 50%; background: #36a86d; box-shadow: 0 0 0 4px #36a86d1a; }

.chat { width: min(840px, calc(100% - 32px)); flex: 1; margin: 0 auto; padding: 40px 0 182px; }
.welcome { position: relative; max-width: 700px; margin: 14vh auto 0; padding: 26px 0; text-align: center; }
.brand-architecture { position: relative; width: 112px; height: 82px; margin: 0 auto 27px; }
.brand-architecture span { position: absolute; display: block; border: 1px solid #72a5a5; }
.brand-architecture span:nth-child(1) { width: 68px; height: 68px; top: 0; left: 5px; }
.brand-architecture span:nth-child(2) { width: 68px; height: 68px; right: 5px; bottom: 0; border-color: #d69455; }
.brand-architecture span:nth-child(3) { width: 44px; height: 44px; top: 19px; left: 34px; border: 0; background: #1d7375; transform: rotate(45deg); }
.brand-architecture b { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; color: #fff; font-size: 15px; letter-spacing: 1px; }
.welcome-kicker { display: block; margin-bottom: 12px; color: #1d7375; font-size: 11px; font-weight: 750; letter-spacing: 2px; }
h1 { margin: 0; color: #173e45; font-size: 42px; font-weight: 750; line-height: 1.2; letter-spacing: 0; }
.welcome h1::after { display: block; width: 42px; height: 3px; margin: 18px auto 0; content: ""; background: #db8b42; }
.welcome p { margin: 18px 0 0; color: #60757a; font-size: 16px; }

.message { display: flex; gap: 13px; margin: 0 0 30px; line-height: 1.75; }
.avatar { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 7px; font-size: 10px; }
.message.user .avatar { color: #256068; background: #dceff0; }
.message.assistant .avatar { color: #fff; background: #1d7375; }
.message-content { min-width: 0; padding-top: 3px; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user .message-content { color: #203036; }
.message.assistant .message-content { color: #263e44; }
.cursor { display: inline-block; width: 7px; height: 16px; margin-left: 2px; vertical-align: -2px; background: #1d7375; animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: 0; } }

.composer-wrap { position: fixed; right: 0; bottom: 0; left: 0; padding: 26px max(16px, calc((100vw - 840px) / 2)) 20px; background: linear-gradient(to bottom, transparent, #edf3f6 35px); }
.composer { display: flex; align-items: flex-end; gap: 10px; min-height: 62px; padding: 11px 11px 11px 17px; border: 1px solid rgba(42, 92, 100, .22); border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(21, 63, 71, .12); }
.composer:focus-within { border-color: #498f91; box-shadow: 0 0 0 3px rgba(29, 115, 117, .13), 0 12px 30px rgba(21, 63, 71, .12); }
textarea { display: block; flex: 1; min-height: 28px; max-height: 160px; padding: 5px 0; resize: none; outline: 0; color: #203036; line-height: 1.5; border: 0; background: transparent; }
textarea::placeholder { color: #92a1a4; }
.send-button { display: grid; flex: 0 0 38px; width: 38px; height: 38px; padding: 0; color: #fff; place-items: center; border: 0; border-radius: 7px; background: #1d7375; transition: background .15s, transform .15s; }
.send-button:hover { background: #155e61; transform: translateY(-1px); }
.send-button:disabled { cursor: not-allowed; color: #9eaaad; background: #e8edef; transform: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.notice { margin: 8px 0 0; color: #809095; text-align: center; font-size: 12px; }
.error { color: #bd3d3d; }

@media (max-width: 560px) {
  .topbar { height: 62px; padding: 0 16px; }
  .brand-status { font-size: 12px; }
  .chat { width: min(100% - 24px, 840px); padding-top: 25px; }
  .welcome { margin-top: 11vh; }
  .brand-architecture { transform: scale(.9); margin-bottom: 19px; }
  h1 { font-size: 34px; }
  .composer-wrap { padding: 20px 12px 15px; }
  .message { gap: 10px; margin-bottom: 23px; }
}
