:root { color-scheme: light; --paper: #f7f7f5; --ink: #202420; --muted: #858981; --line: #e5e6df; --accent: #6b775c; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; -webkit-font-smoothing: antialiased; }
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar { width: 268px; flex: 0 0 268px; background: #eeefe9; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 30px 20px 22px; }
.brand { display: flex; align-items: center; gap: 12px; width: fit-content; margin: 0 12px 36px; }
.brand img { width: 55px; height: 32px; object-fit: contain; }
.brand > span { font-size: 27px; font-weight: 650; letter-spacing: -2px; }
.brand-dot { color: var(--accent); }
.new-chat { display: flex; align-items: center; gap: 11px; width: 100%; padding: 12px 16px; border: 1px solid #d9dcd0; border-radius: 12px; background: #f9faf6; text-align: left; font-size: 14px; font-weight: 550; transition: background .2s; }
.new-chat:hover { background: #fff; }
.new-chat > span { font-size: 21px; line-height: 1; }
kbd { margin-left: auto; font: 11px/1.5 inherit; font-size: 11px; color: #a1a597; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
.history-heading { display: flex; justify-content: space-between; margin: 32px 12px 12px; color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.history { flex: 1; overflow: auto; min-height: 0; }
.history-empty { color: #989c91; font-size: 12px; padding: 4px 12px; }
.history-item { display: flex; align-items: center; border-radius: 9px; margin: 3px 0; }
.history-item.active { background: #e0e4d7; }
.history-item:hover { background: #e5e8df; }
.history-open { background: none; border: 0; padding: 11px 12px; flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.history-delete { border: 0; background: none; color: #8b9181; padding: 9px; margin-right: 4px; opacity: 0; font-size: 17px; }
.history-item:hover .history-delete, .history-item:focus-within .history-delete { opacity: 1; }
.sidebar-bottom { display: flex; gap: 11px; align-items: center; border-top: 1px solid #dbddd3; padding: 20px 8px 18px; font-size: 12px; color: #606756; }
.sidebar-bottom small { display: block; color: #969b8c; font-size: 10px; margin-top: 2px; }
.local-mark { font-size: 24px; color: #859174; }
.back-home { font-size: 12px; color: #7a8172; margin-left: 8px; }
.workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.chat-header { min-height: 84px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.header-left { display: flex; align-items: center; gap: 14px; }
.header-title { font-size: 14px; font-weight: 600; }
.connection { display: flex; align-items: center; gap: 7px; color: #93988c; font-size: 11px; }
.connection > span:first-child { width: 5px; height: 5px; background: #b2b5ac; border-radius: 50%; }
.connection > span:first-child.ready { background: #80946b; box-shadow: 0 0 0 3px #e9ede3; }
.connection > span:first-child.error { background: #bc826c; }
.chat-scroll { overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: #d9ddd1 transparent; }
.welcome { max-width: 810px; margin: 0 auto; padding: clamp(35px, 8vh, 100px) 38px 42px; }
.assistant-symbol { color: var(--accent); font-size: 66px; line-height: 1; width: fit-content; margin-bottom: 29px; }
.eyebrow { color: #909786; font-size: 9px; letter-spacing: 2.2px; margin: 0 0 18px; }
h1 { margin: 0; font-size: clamp(36px, 4.3vw, 57px); font-weight: 530; line-height: 1.35; letter-spacing: -2px; }
h1 span { color: var(--accent); }
.welcome-copy { color: #95998f; font-size: 13px; line-height: 1.9; margin: 20px 0 36px; }
.suggestions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.suggestions button { position: relative; text-align: left; border: 1px solid #e3e5dc; border-radius: 12px; background: #f4f5ef; padding: 18px 16px; transition: background .2s, transform .2s; }
.suggestions button:hover { background: #ecefe3; transform: translateY(-3px); }
.suggestion-icon { display: block; color: #839070; font-size: 22px; height: 39px; }
.code-icon { font-size: 16px; line-height: 31px; }
.suggestions strong { display: block; font-size: 12px; font-weight: 550; margin-bottom: 5px; }
.suggestions button > span:last-of-type { font-size: 10px; color: #9a9e92; }
.suggestions b { position: absolute; top: 18px; right: 16px; font-size: 14px; color: #b0b6a5; font-weight: 400; }
.composer-area { padding: 15px 38px 20px; width: 100%; max-width: 886px; margin: 0 auto; }
.composer { border: 1px solid #dedfd7; border-radius: 18px; background: #fff; padding: 17px 18px 12px; box-shadow: 0 5px 25px #30382004; transition: border-color .2s; }
.composer:focus-within { border-color: #a8b297; }
textarea { display: block; width: 100%; resize: none; border: 0; outline: none !important; background: transparent; color: var(--ink); max-height: 180px; min-height: 30px; font-size: 14px; line-height: 1.7; padding: 0; }
textarea::placeholder { color: #a1a599; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; min-height: 34px; }
.composer-bottom > span { color: #b1b5ab; font-size: 10px; }
.send-button { border: 0; width: 33px; height: 33px; border-radius: 10px; background: #68765a; color: white; font-size: 22px; line-height: 1; }
.send-button:disabled { background: #e9ece4; color: #b4bcaa; }
.stop-button { border: 1px solid #dde1d5; background: #f1f4eb; font-size: 12px; padding: 7px 11px; border-radius: 8px; color: #68765a; }
.stop-button span { margin-right: 4px; font-size: 10px; }
.composer-footnote { margin: 12px 0 0; text-align: center; color: #b0b3a9; font-size: 10px; }
.composer-footnote span { padding: 0 7px; }
.recording-notice { margin: 0 0 10px; color: #68735e; font-size: 11px; line-height: 1.7; }
.notice { color: #9b624c; font-size: 12px; margin: 0 4px 10px; }
.quota-panel { margin: 0 4px 13px; color: #78836b; font-size: 11px; }
.quota-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 15px; flex-wrap: wrap; }
.quota-heading strong { font-size: 17px; font-weight: 550; font-variant-numeric: tabular-nums; color: #58664a; }
#quota-state, .quota-detail { font-size: 10px; color: #969e8c; }
.quota-detail { margin-top: 4px; }
.quota-panel progress { appearance: none; width: 100%; display: block; height: 3px; margin-top: 8px; border: 0; border-radius: 3px; overflow: hidden; background: #e5e9df; }
.quota-panel progress::-webkit-progress-bar { background: #e5e9df; }
.quota-panel progress::-webkit-progress-value { background: #8d9e7b; transition: width .2s; }
.quota-panel progress::-moz-progress-bar { background: #8d9e7b; }
.quota-panel.exhausted strong { color: #a66e57; }
.access-setting { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #7e8873; font-size: 11px; margin: 0 4px 12px; }
.access-setting input { flex: 1; min-width: 160px; border: 1px solid #dedfd7; border-radius: 7px; padding: 6px 9px; background: #fff; color: var(--ink); }
.access-setting span { color: #a1a599; font-size: 10px; }
.messages { max-width: 810px; margin: 0 auto; padding: 30px 38px 24px; }
.message { margin: 0 0 30px; }
.message.user { display: flex; justify-content: flex-end; }
.message.user .message-content { background: #e9ede1; border-radius: 16px 16px 4px 16px; padding: 12px 18px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.assistant-heading { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 550; color: #69765c; margin-bottom: 12px; }
.assistant-heading span { font-size: 24px; line-height: 1; }
.message.assistant .message-content { padding-left: 32px; font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.message-content p { margin: 0 0 12px; white-space: pre-wrap; }
.message-content h2, .message-content h3, .message-content h4 { font-size: 17px; line-height: 1.6; margin: 22px 0 10px; }
.message-content ul, .message-content ol { padding-left: 23px; margin: 8px 0 16px; }
.message-content :not(pre) > code { background: #e9ece3; padding: 2px 5px; border-radius: 4px; font: 12px/1.5 Consolas, monospace; }
.code-block { background: #ecefe7; border: 1px solid #dfe4d7; border-radius: 10px; overflow: hidden; margin: 14px 0; }
.code-heading { display: flex; align-items: center; justify-content: space-between; padding: 6px 13px; color: #7e8873; font-size: 10px; border-bottom: 1px solid #dfe4d7; }
.code-heading button { background: none; border: 0; color: #77846a; font-size: 11px; padding: 2px 5px; }
pre { padding: 15px; margin: 0; white-space: pre; overflow-x: auto; line-height: 1.7; }
pre code { font: 12px/1.7 Consolas, "Courier New", monospace; }
.message-actions { margin: 9px 0 0 32px; display: flex; gap: 12px; color: #8e9684; font-size: 11px; }
.message-actions button { border: 0; background: none; padding: 2px 0; color: inherit; font-size: inherit; }
.message-actions .message-error { color: #a66e57; }
.typing { color: #9aa38e; animation: pulse 1.2s ease-in-out infinite; letter-spacing: 3px; }
.icon-button { border: 0; background: none; font-size: 20px; padding: 0 6px; }
.menu-button { 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; }
@keyframes pulse { 50% { opacity: .35; } }
@media (min-width: 1500px) { .welcome { padding-top: 10vh; } }
@media (max-width: 1050px) { .sidebar { width: 230px; flex-basis: 230px; padding-inline: 16px; } .welcome, .messages { padding-inline: 28px; } .composer-area { padding-inline: 28px; } .chat-header { padding-inline: 28px; } .suggestions { gap: 8px; } .suggestions button { padding: 15px 12px; } .suggestions button > span:last-of-type { font-size: 9px; } }
@media (max-width: 760px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 268px; visibility: hidden; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { visibility: visible; transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; background: #18201055; border: 0; }
  .menu-button { display: block; }
  .chat-header { min-height: 68px; padding-inline: 18px; }
  .header-left { gap: 10px; }
  .connection { font-size: 10px; } .connection > span:first-child { display: none; }
  .welcome { padding: 35px 24px 28px; } .assistant-symbol { font-size: 53px; margin-bottom: 22px; }
  h1 { font-size: 40px; } .welcome-copy { margin: 17px 0 26px; }
  .suggestions { grid-template-columns: 1fr; gap: 8px; }
  .suggestions button { padding: 12px 16px 12px 46px; }
  .suggestion-icon { position: absolute; top: 13px; left: 16px; font-size: 19px; }
  .code-icon { font-size: 12px; line-height: 27px; }
  .suggestions strong { margin-bottom: 1px; } .suggestions button > span:last-of-type { font-size: 10px; }
  .composer-area { padding: 10px 16px max(14px, env(safe-area-inset-bottom)); }
  .composer { padding: 14px 15px 10px; border-radius: 15px; } textarea { font-size: 16px; }
  .composer-footnote { font-size: 9px; margin-top: 9px; } .desktop-hint { display: none; }
  .messages { padding: 20px 20px; } .message.assistant .message-content { padding-left: 0; }
  .message-actions { margin-left: 0; } .history-delete { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
