:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #202127;
  background: #fff;
  font-synthesis: none;
  --muted: #97989f;
  --border: #ededf0;
  --accent: #6179de;
}
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
button, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button, a, textarea { touch-action: manipulation; }
button { color: inherit; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid #b8c6ff; outline-offset: 4px; }
button { transition: background .16s, border-color .16s, transform .16s; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.header { flex-shrink: 0; height: 86px; padding: 0 44px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #202127; font-size: 20px; font-weight: 650; letter-spacing: -.7px; }
.new-chat { display: flex; align-items: center; gap: 7px; padding: 9px 14px; background: white; border: 1px solid #e9e9ed; border-radius: 10px; font-size: 13px; color: #64656d; min-height: 40px; }
.new-chat svg { width: 17px; height: 17px; }
.new-chat:hover { background: #f7f7f9; }
.workspace { width: min(100% - 96px, 1080px); min-height: 0; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }
.welcome { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
.intro { flex: 1; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px 0 44px; text-align: center; }
.eyebrow { font-size: 12px; color: #a0a1a8; letter-spacing: 2px; display: flex; align-items: center; gap: 7px; }
.eyebrow > span { width: 5px; height: 5px; border-radius: 50%; background: #a8b5df; }
h1 { margin: 21px 0 12px; font-size: clamp(29px, 3.4vw, 42px); letter-spacing: -1.5px; line-height: 1.45; font-weight: 600; }
.intro > p { font-size: 14px; color: #999aa1; margin: 0; letter-spacing: .4px; }
.suggestions { padding: 0 4px 23px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.suggestions-label { margin: 0 0 3px 2px; font-size: 12px; color: #a1a2a8; letter-spacing: .5px; }
.suggestion { display: flex; align-items: center; gap: 11px; background: #fff; border: 1px solid #eaeaec; border-radius: 13px; padding: 12px 16px; min-height: 45px; font-size: 13px; color: #5b5d65; text-align: left; }
.suggestion svg { color: #8f929c; width: 17px; height: 17px; }
.suggestion-arrow { color: #b4b6c0; font-size: 16px; margin-left: 11px; }
.suggestion:hover { border-color: #cdd5f0; background: #fafbff; transform: translateX(3px); }
.composer-area { flex-shrink: 0; padding-top: 1px; padding-bottom: 20px; }
.composer { position: relative; border: 1.5px solid #dce2f5; border-radius: 24px; background: #fff; padding: 19px 19px 14px; box-shadow: 0 5px 26px #273f7a06; transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: #b2c3ff; box-shadow: 0 3px 30px #627cc310; }
textarea { display: block; border: 0; resize: none; width: 100%; min-height: 63px; max-height: 180px; background: transparent; outline: none; padding: 1px 5px 8px; color: #262830; font-size: 16px; line-height: 1.7; }
textarea::placeholder { color: #b0b1b7; }
.composer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }
.upload-button { border: 0; border-radius: 9px; background: transparent; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #747680; padding: 8px 8px 8px 3px; min-height: 38px; }
.upload-button svg { height: 24px; width: 24px; color: #60626d; }
.upload-button:hover { background: #f6f7fa; }
.upload-button:disabled { opacity: .5; }
.send-controls { display: flex; align-items: center; gap: 17px; }
.model-label { color: #93959d; font-size: 12px; max-width: 220px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.send-button { width: 39px; height: 39px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #262a36; color: #fff; }
.send-button:disabled { background: #f1f2f6; color: #b3b8c6; }
.send-button:not(:disabled):hover { background: #454e6d; }
.send-button.is-streaming { background: #e9edfb; color: #5b6ec0; }
#stop-icon { fill: currentColor; stroke-width: 0; width: 19px; height: 19px; }
.input-hint { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #a6a8b0; margin: 12px 14px 0; }
.hint-dot { padding: 0 9px; color: #b9bcc5; }
.notice { font-size: 12px; line-height: 1.7; color: #a3483c; background: #fff5f2; border: 1px solid #f6e1da; border-radius: 10px; padding: 9px 13px; margin-bottom: 10px; overflow-wrap: anywhere; }
.attachments { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 5px 14px; }
.attachment { position: relative; width: 70px; height: 70px; }
.attachment img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.remove-image { position: absolute; right: -6px; top: -6px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; border: 2px solid white; background: #535866; color: white; font-size: 16px; padding: 0; line-height: 1; }
.drop-overlay { display: none; position: absolute; inset: 0; z-index: 2; border-radius: 23px; background: #f5f7fffa; border: 2px dashed #9bacdf; align-items: center; justify-content: center; gap: 12px; color: #6378b5; pointer-events: none; }
.composer.is-dragging .drop-overlay { display: flex; }
.conversation { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #dedfe6 transparent; margin-bottom: 20px; }
.messages { display: flex; flex-direction: column; gap: 29px; padding: 25px 7px 25px; }
.message { display: flex; gap: 13px; align-items: flex-start; max-width: 91%; }
.message.user { align-self: flex-end; flex-direction: row-reverse; max-width: 80%; }
.avatar { width: 29px; height: 29px; flex-shrink: 0; }
.message-body { min-width: 0; padding-top: 2px; }
.message.user .message-body { border-radius: 20px 20px 5px 20px; padding: 13px 19px; background: #f3f4f7; }
.message-text { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; margin: 0; }
.markdown-body { white-space: normal; }
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p, .markdown-body ul, .markdown-body ol, .markdown-body blockquote, .markdown-body pre, .markdown-body table { margin: 0 0 14px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin: 22px 0 10px; line-height: 1.5; letter-spacing: 0; font-weight: 650; }
.markdown-body h1 { font-size: 1.5em; }
.markdown-body h2 { font-size: 1.3em; }
.markdown-body h3 { font-size: 1.15em; }
.markdown-body h4, .markdown-body h5, .markdown-body h6 { font-size: 1em; }
.markdown-body strong { font-weight: 650; }
.markdown-body ul, .markdown-body ol { padding-left: 1.6em; }
.markdown-body li { margin: 4px 0; }
.markdown-body li > p { margin-bottom: 6px; }
.markdown-body li > ul, .markdown-body li > ol { margin-bottom: 0; }
.markdown-body blockquote { border-left: 3px solid #d1d9ef; padding: 3px 0 3px 16px; color: #747987; }
.markdown-body blockquote > :last-child { margin-bottom: 0; }
.markdown-body a { color: #526bbd; text-decoration: underline; text-underline-offset: 3px; }
.markdown-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; padding: 2px 5px; border-radius: 5px; background: #f1f3f8; }
.markdown-body pre { max-width: 100%; overflow-x: auto; padding: 14px 16px; border: 1px solid #e8ebf2; border-radius: 12px; background: #f6f7fa; white-space: pre; line-height: 1.65; }
.markdown-body pre code { padding: 0; background: transparent; border-radius: 0; overflow-wrap: normal; }
.code-block { position: relative; min-width: 0; margin: 0 0 14px; }
.markdown-body .code-block pre { margin: 0; padding-top: 48px; }
.code-actions { position: absolute; top: 7px; right: 8px; left: 8px; display: flex; flex-direction: row-reverse; align-items: center; gap: 6px; pointer-events: none; }
.code-actions .copy-button { flex-shrink: 0; pointer-events: auto; }
.code-actions .copy-feedback { background: #f6f7fa; line-height: 1.4; }
.markdown-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .95em; }
.markdown-body th, .markdown-body td { padding: 8px 12px; border: 1px solid #e4e7ee; text-align: left; min-width: 90px; }
.markdown-body th { background: #f6f7fa; font-weight: 600; }
.markdown-body hr { margin: 20px 0; border: 0; border-top: 1px solid #e4e7ee; }
.message-images { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.message-images:only-child { margin-bottom: 0; }
.message-images img { max-width: min(230px, 100%); max-height: 240px; border-radius: 10px; object-fit: contain; }
.message-status { margin: 7px 0 0; font-size: 12px; line-height: 1.6; color: #9698a1; }
.message-status.is-error { color: #a85b50; }
.message-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.copy-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 7px; background: transparent; color: #92959d; }
.copy-button svg { width: 20px; height: 20px; }
.copy-button:hover { background: #f3f4f7; color: #596171; }
.copy-button:disabled { opacity: .5; }
.copy-feedback { font-size: 12px; color: #818793; }
.copy-feedback:empty { display: none; }
.retry-button { margin-top: 9px; font-size: 12px; background: #fff; border: 1px solid #e1e3e9; border-radius: 8px; padding: 7px 12px; }
.message-actions .retry-button { margin-top: 0; }
.retry-button:hover { background: #f5f6fa; }
.thinking { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 5px 0; }
.thinking span { background: #a3acc5; width: 5px; height: 5px; border-radius: 50%; animation: pulse 1.2s infinite ease-in-out; }
.thinking span:nth-child(2) { animation-delay: .15s; }
.thinking span:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 0%, 70%, 100% { opacity: .4; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
@media (min-height: 900px) { .intro { padding-bottom: 80px; } .composer-area { padding-bottom: 30px; } .suggestions { padding-bottom: 28px; } }
@media (max-width: 640px) {
  .header { height: 69px; padding: 0 21px; }
  .brand { font-size: 18px; }
  .brand img { width: 28px; height: 28px; }
  .new-chat { padding: 7px 10px; font-size: 12px; }
  .workspace { width: calc(100% - 32px); }
  .intro { min-height: 245px; padding: 23px 0 28px; }
  .eyebrow { font-size: 11px; }
  h1 { font-size: 28px; margin-top: 17px; letter-spacing: -1px; }
  .intro > p { font-size: 12px; }
  .suggestions { padding-bottom: 18px; gap: 8px; }
  .suggestion { font-size: 12px; padding: 10px 12px; min-height: 42px; border-radius: 11px; }
  .suggestions-label { font-size: 11px; }
  .composer { border-radius: 20px; padding: 15px 12px 10px; }
  .composer-area { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  textarea { font-size: 16px; min-height: 58px; }
  .keyboard-hint { display: none; }
  .input-hint { justify-content: center; margin-top: 9px; }
  .model-label { max-width: 140px; font-size: 11px; }
  .message { max-width: 100%; gap: 9px; }
  .message.user { max-width: 90%; }
  .message-text { font-size: 14px; }
  .messages { padding: 13px 1px; gap: 24px; }
  .avatar { width: 25px; height: 25px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
