:root { --blue:#1d6251; --bg:#f6f7f5; --ink:#202a26; --muted:#758078; --line:#dfe5df; }
body { height:100dvh; display:flex; flex-direction:column; }
button.primary:hover:not(:disabled) { background:#174e40; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); border:0; }
.app-header { min-height:86px; padding:18px 26px; display:flex; align-items:center; justify-content:space-between; gap:20px; background:#fff; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:11px; color:var(--ink); text-decoration:none; font-size:20px; font-weight:700; }
.brand-mark { background:var(--blue); color:#fff; border-radius:11px; width:40px; height:40px; display:grid; place-items:center; font-size:21px; }
.brand small { display:block; color:var(--muted); font-size:11px; font-weight:400; margin-top:1px; }
.app-header nav { display:flex; gap:5px; }.nav-button { border:0; background:transparent; color:var(--muted); padding:9px 15px; }
.nav-button.active { background:#ecf3ee; color:var(--blue); }.status-dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:#b99751; margin-left:3px; }.status-dot.ready { background:#4f8c63; }
.app-workspace { flex:1; min-height:0; display:grid; grid-template-columns:230px minmax(340px,1.25fr) minmax(300px,1fr); }
.project-rail { padding:24px 16px; background:#fafbf9; border-right:1px solid var(--line); overflow:auto; }
.rail-heading,.document-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.rail-heading h2,.document-header h2 { font-size:14px; margin:0; }.quiet { padding:5px 8px; border-color:transparent; background:transparent; color:var(--muted); font-size:12px; }
#project-create { display:flex; flex-wrap:wrap; gap:6px; margin:18px 0 14px; }#project-create input { min-width:0; padding:8px; font-size:12px; }#project-create button { flex:none; padding:8px 11px; font-size:12px; }
.project-item { display:block; width:100%; padding:12px 11px; margin:6px 0; text-align:left; border:1px solid transparent; background:transparent; overflow-wrap:anywhere; }.project-item[aria-current="true"] { background:#eaf1eb; border-color:#d3e0d5; color:var(--blue); }.project-item strong { display:block; font-size:13px; }.project-item small { font-size:11px; color:var(--muted); }.rail-note { font-size:11px; color:var(--muted); margin:26px 5px 0; line-height:1.8; }
.conversation { display:flex; flex-direction:column; min-height:0; min-width:0; background:#fff; }.conversation-header { padding:22px 26px 16px; display:flex; justify-content:space-between; align-items:center; gap:14px; border-bottom:1px solid var(--line); }.conversation-header h1 { font-size:18px; margin:2px 0 0; }.eyebrow { font-size:10px; letter-spacing:.08em; color:var(--muted); }
.conversation > .notice { margin:14px 22px 0; }.chat-log { flex:1; overflow:auto; padding:24px 26px; min-height:140px; }.welcome { padding:28px 0; max-width:420px; margin:auto; }.welcome h2 { font-size:24px; line-height:1.5; font-weight:600; }.welcome p { color:var(--muted); line-height:1.9; }.welcome .step { border-left:2px solid #bdd1c0; padding:8px 0 8px 15px; margin-top:16px; }
.message { margin:0 0 26px; overflow-wrap:anywhere; }.message-header { margin-bottom:8px; font-size:11px; color:var(--muted); }.message.user .message-body { background:#f0f4ef; border-radius:10px; padding:13px 16px; white-space:pre-wrap; }.message.assistant .message-body { font-size:14px; line-height:1.8; }.message-body > :last-child { margin-bottom:0; }.message.streaming .message-body { white-space:pre-wrap; }.message.streaming .message-header::after { content:' · 正在整理'; color:var(--blue); }
.turn-feedback { padding:0 24px; font-size:12px; }.turn-feedback .status { margin:6px 0; }.turn-feedback button { font-size:12px; padding:6px 10px; margin:4px 0 10px; }
.composer { margin:0 20px 18px; }
.document-panel { display:flex; flex-direction:column; min-width:0; min-height:0; border-left:1px solid var(--line); background:#fbfcfa; }.document-header { padding:24px 22px 18px; }.document-tabs { display:flex; gap:4px; padding:0 18px; border-bottom:1px solid var(--line); }.document-tabs button { flex:1; padding:10px 4px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; font-size:12px; color:var(--muted); }.document-tabs button[aria-selected="true"] { color:var(--blue); border-color:var(--blue); }.document-tabs span { font-size:10px; }.document-status { margin:14px 22px 0; font-size:11px; }.document-body { overflow:auto; flex:1; padding:22px; font-size:13px; line-height:1.8; }.document-body h1 { font-size:20px; }.document-body h2 { font-size:17px; }.document-body h3 { font-size:14px; }.document-body .empty-document { padding-top:30px; color:var(--muted); }.evidence-card { padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid var(--line); }.evidence-card h3 { margin-bottom:6px; }
.settings-backdrop { position:fixed; inset:0; display:grid; place-items:center; background:#18302255; z-index:20; padding:20px; }.settings-card { width:min(560px,100%); max-height:90dvh; overflow:auto; margin:0; box-shadow:0 15px 60px #192e2533; }.settings-card dl { margin:20px 0; display:grid; grid-template-columns:85px 1fr; gap:12px; }.settings-card dt { color:var(--muted); }.settings-card dd { margin:0; overflow-wrap:anywhere; }.settings-card code { background:#eaf0e9; padding:1px 4px; border-radius:4px; }
.owner-login { min-height:100dvh; display:grid; place-items:center; padding:24px; background:var(--bg); }.owner-login .card { width:min(420px,100%); margin:0; }.owner-login p { color:var(--muted); font-size:13px; }.owner-login button { width:100%; margin-top:18px; }
@media(max-width:1150px) { .app-workspace { grid-template-columns:190px minmax(300px,1.2fr) minmax(270px,1fr); }.project-rail { padding:20px 12px; }.chat-log { padding:22px 20px; }.conversation-header { padding:20px; }.document-tabs { padding:0 8px; } }
@media(max-width:900px) { body { height:auto; min-height:100dvh; }.app-workspace { grid-template-columns:190px minmax(0,1fr); }.document-panel { grid-column:1 / -1; border-left:0; border-top:1px solid var(--line); min-height:340px; }.conversation { min-height:650px; max-height:85dvh; }.project-rail { max-height:85dvh; }.document-body { overflow:visible; } }
@media(max-width:600px) { .app-header { padding:14px 16px; gap:14px; flex-wrap:wrap; }.brand { font-size:18px; }.brand small { font-size:10px; }.app-header nav { width:100%; }.nav-button { flex:1; font-size:13px; }.app-workspace { display:flex; flex-direction:column; }.project-rail { padding:14px 16px; border-right:0; border-bottom:1px solid var(--line); max-height:none; }#project-create { margin:10px 0; }#project-list { display:flex; overflow:auto; gap:6px; }.project-item { min-width:160px; max-width:240px; margin:0; }.rail-note { display:none; }.conversation { min-height:640px; max-height:85dvh; }.conversation-header { padding:18px; }.chat-log { padding:20px 18px; }.composer { margin:0 12px 14px; }.document-panel { min-height:380px; }.settings-backdrop { padding:12px; }.settings-card { padding:20px; } }

#project-template { flex-basis:100%; width:100%; min-width:0; padding:8px; font-size:12px; }
#project-name { flex:1; }

.app-header { min-height:76px; padding:16px 24px; gap:16px; flex-wrap:wrap; }
.app-header nav { margin-left:auto; }
.app-header > a:not(.brand) { color:var(--muted); text-decoration:none; font-size:12px; white-space:nowrap; }
.app-header > a:not(.brand):hover { color:var(--blue); }
.app-header > .language-toggle { font-size:12px; min-height:36px; padding:6px 12px; }
.nav-button { white-space:nowrap; font-size:13px; }
.conversation-header h1 { line-height:1.5; font-weight:600; }
.document-body { max-width:76ch; }
@media (max-width:600px) {
  .app-header { gap:12px 16px; padding:16px; }
  .app-header .brand { flex:1; font-size:18px; }
  .app-header > .language-toggle { order:1; }
  .app-header > a:not(.brand) { order:2; }
  .app-header nav { order:3; width:100%; margin:0; overflow-x:auto; gap:4px; padding-bottom:2px; }
  .app-header .nav-button { flex:1; min-width:max-content; padding:8px 10px; font-size:12px; }
  .conversation-header { padding:18px 16px; gap:12px; }
  .conversation-header h1 { font-size:17px; }
  .conversation-header > button { flex:none; white-space:nowrap; font-size:12px; }
  .welcome { padding:12px 0; }
  .welcome h2 { font-size:22px; }
}

.owner-access-button { border-color:#dbe5de; background:#f4f7f4; color:var(--blue); white-space:nowrap; font-size:12px; }
.owner-link-fallback { margin:12px 0; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.owner-link-fallback label { font-size:12px; margin:0 0 6px; }
.owner-link-fallback input { font-size:12px; }
.owner-link-fallback p { margin:6px 0; font-size:11px; color:var(--muted); }
.owner-recovery { border-top:1px solid var(--line); padding-top:16px; margin-top:20px; }
.owner-recovery summary { font-size:12px; color:var(--muted); font-weight:400; }
.owner-login .owner-recovery button { margin-top:12px; }
@media(max-width:600px) { .app-header .owner-access-button { order:2; } }
