:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #20211f;
  background: #fff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, .attach-button:focus-visible, textarea:focus-visible { outline: 2px solid #3b7563; outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { width: 258px; flex: none; display: flex; flex-direction: column; justify-content: space-between; padding: 22px 13px 19px; background: #f7f7f5; border-right: 1px solid #eeeeea; }
.sidebar-top { display: grid; gap: 29px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 15px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 30px; height: 30px; display: block; border-radius: 9px; object-fit: contain; }
.brand-sub { margin-left: 4px; color: #646962; font-weight: 400; }
.new-chat { width: 100%; display: flex; align-items: center; gap: 9px; border: 1px solid #dedfda; border-radius: 12px; padding: 10px 13px; background: #fff; color: #292d27; text-align: left; font-size: 13px; font-weight: 600; transition: background .15s, border-color .15s; }
.new-chat:hover { background: #f0f3ef; border-color: #c7d1c8; }
.new-chat span { font-size: 21px; line-height: 18px; font-weight: 400; }
.sidebar-section { flex: 1; padding-top: 32px; }
.sidebar-label { margin: 0 11px 10px; color: #959a94; font-size: 11px; font-weight: 600; }
.nav-question { display: block; width: 100%; border: 0; border-radius: 9px; background: transparent; padding: 10px 11px; color: #515650; text-align: left; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-question:hover { background: #ecefeb; color: #273b2e; }
.sidebar-foot { display: flex; align-items: flex-start; gap: 9px; padding: 14px 10px 0; border-top: 1px solid #e9e9e5; color: #757b74; font-size: 11px; line-height: 1.6; }
.sidebar-foot small { color: #9a9e98; font-size: 10px; }
.foot-dot, .online-dot { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: #64a67c; }
.main-panel { position: relative; min-width: 0; flex: 1; display: flex; flex-direction: column; background: #fff; }
.topbar { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.topbar-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.topbar-right { display: flex; align-items: center; gap: 9px; margin-left: auto; color: #747c74; font-size: 12px; }
.account-button { border: 1px solid #dce5dd; border-radius: 9px; padding: 7px 14px; background: #f2f7f2; color: #315a40; font-size: 12px; font-weight: 600; }
.account-button:hover { background: #e8f1e9; }
.account-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #315a40; font-weight: 600; }
.logout-button { border: 0; background: transparent; color: #969b95; font-size: 11px; }
.logout-button:hover { color: #315a40; }
.online-dot { margin: 0; width: 6px; height: 6px; }
.mobile-menu { display: none !important; }
.messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px max(28px, calc((100% - 800px) / 2)) 24px; display: flex; flex-direction: column; gap: 28px; scrollbar-color: #d9ddd8 transparent; scrollbar-width: thin; }
.welcome { width: 100%; max-width: 750px; margin: auto; padding: 10px 0 36px; }
.welcome-symbol { width: 50px; height: 50px; display: block; border-radius: 13px; object-fit: contain; }
.welcome h1 { margin: 22px 0 8px; font-size: clamp(26px, 3vw, 34px); font-weight: 650; letter-spacing: -.035em; }
.welcome p { margin: 0; color: #757b75; font-size: 14px; line-height: 1.8; }
.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 37px; }
.prompt-grid button { position: relative; min-height: 105px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; border: 1px solid #e7e9e5; border-radius: 15px; padding: 17px 18px; background: #fff; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
.prompt-grid button:hover { border-color: #b7c8ba; box-shadow: 0 6px 18px #263d2910; transform: translateY(-2px); }
.prompt-grid button > span:first-child { color: #79917e; font-size: 11px; }
.prompt-grid strong { color: #353a34; font-size: 13px; font-weight: 550; line-height: 1.5; }
.prompt-grid .prompt-arrow { position: absolute; right: 17px; top: 15px; color: #a7b4a8; font-size: 16px; }
.message { width: 100%; max-width: 800px; flex: none; display: flex; align-items: flex-start; gap: 15px; margin-inline: auto; }
.message.assistant { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; row-gap: 9px; }
.message.user { justify-content: flex-end; }
.avatar { grid-column: 1; grid-row: 1; width: 28px; height: 28px; display: block; border-radius: 8px; object-fit: contain; }
.assistant-content { grid-column: 2; grid-row: 1; min-width: 0; width: 100%; }
.message.user .bubble { max-width: min(85%, 650px); padding: 12px 17px; border-radius: 19px; background: #f2f3f0; color: #2b302b; overflow-wrap: anywhere; line-height: 1.7; font-size: 14px; white-space: pre-wrap; }
.user-images { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; margin-bottom: 8px; }
.user-images img { width: 95px; height: 95px; object-fit: cover; border-radius: 13px; border: 1px solid #e5e7e3; background: #f4f4f2; }
.user-content { display: flex; flex-direction: column; align-items: flex-end; max-width: 100%; }
.answer { color: #30342f; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.answer p { margin: 0 0 13px; }
.answer p:last-child { margin-bottom: 0; }
.answer h2, .answer h3 { margin: 16px 0 8px; font-size: 15px; font-weight: 700; }
.answer ul, .answer ol { margin: 0 0 12px; padding-left: 24px; }
.answer li { margin: 3px 0; }
.answer code { border-radius: 4px; background: #f2f3f0; padding: 2px 4px; font-size: .92em; }
.answer pre { overflow: auto; border-radius: 10px; background: #f4f5f2; padding: 12px; font-size: 12px; line-height: 1.6; }
.answer pre code { padding: 0; background: transparent; }
.answer strong { font-weight: 700; }
.sources { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.sources span { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid #e5eae5; border-radius: 6px; padding: 4px 7px; color: #778478; font-size: 10px; }
.message-meta { grid-column: 2; color: #a0a6a0; font-size: 10px; }
.pending .answer { color: #888e88; }
.pending .avatar { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.composer-dock { flex: none; padding: 14px 24px 12px; background: linear-gradient(0deg, #fff 88%, #ffffffdd); }
.composer-area { max-width: 800px; margin: auto; }
.composer { border: 1px solid #dfe3dd; border-radius: 22px; background: #fff; padding: 12px 13px 11px 15px; box-shadow: 0 3px 16px #1a2b2010; transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: #9fbaa5; box-shadow: 0 4px 20px #2d5a3920; }
.composer textarea { display: block; width: 100%; min-height: 33px; max-height: 180px; resize: none; padding: 4px 5px; border: 0; outline: 0; background: transparent; color: #242824; font-size: 14px; line-height: 1.6; overflow-y: auto; }
.composer textarea::placeholder { color: #a0a6a0; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
.tools { display: flex; align-items: center; gap: 7px; }
.icon-button { width: 31px; height: 31px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #5c655c; }
.icon-button:hover { background: #f0f2ef; }
.attach-button { cursor: pointer; }
#image { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.image-hint { color: #989e97; font-size: 11px; }
.send-button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 10px; background: #274b39; color: white; transition: background .15s, transform .15s; }
.send-button:hover:not(:disabled) { background: #38684e; transform: translateY(-1px); }
.send-button:disabled { background: #d5dad4; color: #fff; cursor: default; }
.send-button svg { width: 18px; height: 18px; stroke-width: 2.1; }
.composer-note { margin: 9px 4px 0; text-align: center; color: #a0a59f; font-size: 10px; line-height: 1.5; }
.note-divider { padding: 0 6px; color: #bec3bd; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 1px 10px; }
.attachment-item { position: relative; width: 74px; height: 74px; }
.attachment-item img { width: 100%; height: 100%; object-fit: cover; border: 1px solid #e0e3df; border-radius: 10px; }
.attachment-item button { position: absolute; right: -6px; top: -6px; width: 21px; height: 21px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; background: #373d37; color: white; font-size: 13px; line-height: 1; }
.drop-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: #f8faf7eF; pointer-events: none; }
.drop-card { width: min(100%, 520px); min-height: 290px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border: 2px dashed #80a48a; border-radius: 24px; background: #ffffffdc; color: #3d5944; }
.drop-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: #e7f0e9; font-size: 30px; line-height: 1; }
.drop-card strong { font-size: 19px; }
.drop-card > span:last-child { color: #8b9b8e; font-size: 12px; }
.auth-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 18px; background: #15221a80; }
.auth-card { position: relative; width: min(100%, 390px); border: 1px solid #e2e7e0; border-radius: 19px; padding: 29px; background: #fff; box-shadow: 0 24px 70px #12211935; }
.auth-close { position: absolute; right: 17px; top: 13px; border: 0; background: transparent; color: #828b82; font-size: 25px; line-height: 1; }
.auth-logo { display: block; width: 43px; height: 43px; border-radius: 11px; }
.auth-card h2 { margin: 19px 0 8px; font-size: 21px; }
.auth-card > p { margin: 0 0 21px; color: #778078; font-size: 12px; line-height: 1.7; }
.auth-card form { display: grid; gap: 8px; }
.auth-card label { margin-top: 4px; color: #505a51; font-size: 12px; font-weight: 600; }
.auth-card input { width: 100%; height: 42px; border: 1px solid #dce2dc; border-radius: 9px; padding: 0 12px; background: #fff; color: #252b25; font-size: 14px; }
.auth-card input:focus { border-color: #78a487; outline: 2px solid #78a48728; }
.auth-error { margin: 4px 0 0; color: #b54235; font-size: 11px; line-height: 1.5; }
.auth-submit { height: 42px; margin-top: 8px; border: 0; border-radius: 9px; background: #274b39; color: white; font-size: 13px; font-weight: 600; }
.auth-submit:hover { background: #35634b; }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-card > a { display: inline-block; margin-top: 17px; color: #697b6b; font-size: 11px; text-decoration: none; }
.auth-card > a:hover { text-decoration: underline; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 115px; transform: translateX(-50%); max-width: min(90vw, 500px); padding: 11px 16px; border-radius: 10px; background: #29352d; box-shadow: 0 6px 24px #14201830; color: white; font-size: 12px; text-align: center; }
.sidebar-scrim { display: none; }
.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; }
@media (max-width: 850px) {
  .sidebar { width: 218px; }
  .brand { font-size: 13px; }
  .messages { padding-inline: 24px; }
}
@media (max-width: 680px) {
  .sidebar { position: fixed; z-index: 11; top: 0; bottom: 0; left: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: 10px 0 30px #17291b16; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim:not([hidden]) { position: fixed; z-index: 10; inset: 0; display: block; background: #141c1670; }
  .mobile-menu { display: inline-grid !important; margin-left: -5px; }
  .topbar { height: 56px; padding: 0 16px; justify-content: flex-start; gap: 12px; }
  .topbar-right { margin-left: auto; }
  .messages { padding: 18px 18px 20px; gap: 22px; }
  .welcome { padding: 18px 0 30px; }
  .welcome h1 { font-size: 27px; }
  .welcome p { font-size: 13px; }
  .prompt-grid { margin-top: 24px; gap: 8px; }
  .prompt-grid button { min-height: 91px; padding: 13px; }
  .prompt-grid strong { font-size: 12px; }
  .prompt-grid .prompt-arrow { right: 12px; top: 10px; }
  .composer-dock { padding: 9px 12px max(9px, env(safe-area-inset-bottom)); }
  .composer { border-radius: 19px; }
  .composer-note { font-size: 9px; }
  .message.user .bubble { max-width: 95%; }
  .user-images img { width: 75px; height: 75px; }
}
@media (max-width: 390px) {
  .prompt-grid { grid-template-columns: 1fr; }
  .prompt-grid button { min-height: 70px; gap: 5px; }
  .composer-note { max-width: 300px; margin-inline: auto; }
}
