:root { color-scheme: light; font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: #000; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.app-shell { height: 100dvh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { min-height: 0; overflow-y: auto; border-right: 1px solid #000; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; background: #000; color: #fff; }
.outline, #composer { border: 1px solid #000; background: #fff; }
.outline { height: 42px; text-align: left; padding: 0 12px; }
#conversation-list { display: grid; gap: 4px; }
.conversation { width: 100%; min-height: 38px; padding: 0 8px; border: 0; background: #fff; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation.active { background: #000; color: #fff; }
.text-button { margin-top: auto; border: 0; border-top: 1px solid #000; background: #fff; padding: 12px 0 0; text-align: left; font-size: 13px; }
.chat { min-width: 0; display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
header { height: 62px; border-bottom: 1px solid #000; padding: 0 28px; display: flex; align-items: center; gap: 16px; }
header h2 { margin: 0; font-size: 15px; }
#knowledge-status { margin-left: auto; font-size: 12px; }
#history-toggle { display: none; border: 1px solid #000; background: #fff; width: 30px; height: 30px; }
#empty-state, #messages { width: min(800px, calc(100% - 40px)); margin: 0 auto; }
#empty-state { flex: 1 1 auto; display: grid; place-content: center; padding: 0; text-align: center; }
#empty-state[hidden] { display: none; }
#empty-state h1 { font-size: 28px; margin: 0 0 10px; }
#empty-state p, .note { color: #555; font-size: 13px; }
#messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 42px 0 32px; display: grid; align-content: start; gap: 28px; }
.message { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; line-height: 1.75; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #000; font-size: 12px; font-weight: 700; }
.assistant .avatar { color: #fff; background: #000; }
.user .content { white-space: pre-wrap; }
.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h1, .markdown h2, .markdown h3 { margin: 22px 0 10px; line-height: 1.35; text-wrap: balance; }
.markdown h1 { font-size: 22px; }
.markdown h2 { font-size: 19px; }
.markdown h3 { font-size: 16px; }
.markdown p { margin: 0 0 14px; text-wrap: pretty; }
.markdown ul, .markdown ol { margin: 0 0 14px; padding-left: 22px; }
.markdown blockquote { margin: 0 0 14px; padding-left: 14px; border-left: 1px solid #000; }
.markdown code { padding: 1px 4px; background: #000; color: #fff; font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.9em; }
.markdown pre { overflow-x: auto; margin: 0 0 14px; padding: 14px; background: #000; color: #fff; }
.markdown pre code { padding: 0; background: transparent; }
#composer { position: static; margin: 0 max(20px, (100vw - 1072px) / 2); min-height: 58px; display: flex; align-items: flex-end; padding: 8px 8px 8px 14px; gap: 10px; }
#prompt { flex: 1; border: 0; resize: none; padding: 10px 0; outline: 0; background: transparent; }
#composer button { border: 0; width: 38px; height: 38px; color: #fff; background: #000; }
.note { position: static; min-height: calc(31px + env(safe-area-inset-bottom)); padding: 7px 0 env(safe-area-inset-bottom); text-align: center; margin: 0 max(20px, (100vw - 1072px) / 2); }
dialog { width: min(390px, calc(100% - 32px)); border: 1px solid #000; padding: 0; }
dialog::backdrop { background: #000; }
#email-form { display: grid; gap: 12px; padding: 28px; background: #fff; }
#email-form h1 { margin: 0 0 12px; font-size: 23px; }
#email-form input { height: 42px; border: 1px solid #000; padding: 0 10px; }
#email-form button { height: 42px; border: 0; background: #000; color: #fff; }
#email-error { min-height: 18px; margin: 0; font-size: 13px; }
@media (max-width: 720px) { .app-shell { display: block; } .sidebar { position: fixed; inset: 0 72px 0 0; z-index: 2; background: #fff; transform: translateX(-100%); transition: transform 180ms ease-out; } .sidebar.open { transform: translateX(0); } #history-toggle { display: block; } header { padding: 0 16px; } #messages { padding-top: 28px; padding-bottom: 32px; } #composer { margin: 0 16px; } .note { margin: 0; } }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }
