:root {
  color-scheme: light;
  --ink: #1e2c42;
  --muted: #63718a;
  --paper: #f7f8fa;
  --nav: #162a4c;
  --blue: #294fc1;
  --blue-soft: #eaf0ff;
  --line: #d9dfe8;
  --serif: "STSong", "Songti SC", "Noto Serif CJK SC", SimSun, Georgia, serif;
  --sans: "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --site-footer-height: calc(44px + env(safe-area-inset-bottom, 0px));
}
*,*::before,*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.62 var(--sans); color: var(--ink); background: var(--paper); }
button,input,textarea,select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .62; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #7998ee; outline-offset: 3px; }
button,a,input,textarea,select { -webkit-tap-highlight-color: transparent; }
button { border: 0; background: none; }
input,textarea,select { width: 100%; border: 1px solid #bdc8d7; border-radius: 5px; background: #fff; padding: 11px 13px; color: var(--ink); }
input::placeholder,textarea::placeholder { color: #758198; }
input:focus,textarea:focus,select:focus { outline: 2px solid #9db1eb; outline-offset: 0; border-color: var(--blue); }
textarea { min-height: 97px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 14px; margin: 18px 0 6px; }
h1,h2,h3,p { margin: 0; }
.btn,.icon-btn,.text-btn,.tab,.nav-item,.user-btn,.tile,.list-title,.back,.file-link { display: inline-flex; align-items:center; gap: 8px; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.btn { justify-content: center; font-size: 14px; font-weight: 600; border: 1px solid #c9d1df; background: #fff; color: #374760; border-radius: 5px; padding: 8px 15px; line-height: 1.55; min-height: 39px; text-decoration: none; }
.btn:hover,.icon-btn:hover { background:#edf2fa; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn.primary:hover { background: #21419f; }
.btn.light { border-color: #c6d4f9; background: #edf2ff; color: #284894; }
.icon-btn { justify-content: center; padding:0; width:34px; height:34px; border-radius: 5px; }
.text-btn,.back { color:var(--blue); font-weight:600; font-size:14px; padding: 5px 0; text-decoration:none; }
.text-btn:hover,.back:hover,.list-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.field-hint,.footnote { font-size: 13px; color:var(--muted); margin-top:6px; }
.error,.connection { color:#91362b; font-size:14px; padding:9px 12px; background:#fff1eb; border-left:3px solid #c76044; margin:14px 0; }
.entry { min-height:100vh; min-height:100dvh; display:grid; grid-template-columns: minmax(350px, .97fr) minmax(420px, 1.03fr); }
.cover { background:var(--nav); color:white; display:flex; flex-direction:column; padding:clamp(28px,4vw,66px); position:relative; overflow:hidden; }
.brand { display:flex; gap:12px; align-items:center; font:600 23px/1.3 var(--serif); letter-spacing:1px; }
.brand img { width:34px; height:34px; }
.cover-center { flex:1; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding:45px 0 30px; }
.cover-center h1 { font:500 clamp(36px,4.1vw,64px)/1.48 var(--serif); letter-spacing:.03em; }
.cover-surface { display:block; width:min(560px,108%); margin:16px 0 0 -4%; }
.cover-foot { display:flex; gap:12px; align-items:center; font-size:13px; color:#ccd9f2;}
.rule { display:inline-block; width:28px; height:1px; background:currentColor; }
.entry-panel { display:grid; align-items:center; justify-items:center; padding:42px 32px; background:#fafbfc; }
.join-form { width:min(100%,370px); }
.join-sign { color:var(--blue); font:italic 43px/1 Georgia,serif; margin-bottom:15px; }
.join-form h2 { font:600 36px/1.4 var(--serif); }
.intro { color:var(--muted); margin:11px 0 30px; }
.join-button { width:100%; justify-content:space-between; margin-top:25px; min-height:46px; }
.workspace { display:flex; min-height:100vh; }
.sidebar { position:sticky; top:0; height:100vh; height:100dvh; width:242px; flex:none; display:flex; flex-direction:column; background:var(--nav); color:#f5f8ff; padding:27px 17px 0; z-index:4; }
.sidebar .brand { padding:0 10px; font-size:22px; }
.nav-head { display:flex; align-items:center; justify-content:space-between; color:#b9c9e2; margin:48px 4px 8px 12px; font-size:13px; }
.nav-head .icon-btn:hover,.user-btn:hover { background:#263e64; }
.project-nav { overflow-y:auto; }
.nav-item { width:100%; text-align:left; padding:11px 12px; border-radius:5px; color:#d3def2; line-height:1.45; margin:2px 0; }
.nav-item span,.user-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-item.selected { background:#30496f; color:white; box-shadow:inset 3px 0 #b4cdff; }
.nav-item:hover { background:#2b4266; }
.side-bottom { margin-top:auto; border-top:1px solid #3b4f6d; padding:15px 0; }
.user-btn { width:100%; color:#fff; padding:6px; text-align:left; border-radius:5px; }
.user-btn .end { margin-left:auto; }
.avatar { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; flex:none; border-radius:50%; background:#e1e9fb; color:#344e85; font:600 14px var(--sans); }
.sidebar .avatar { background:#b8ceee; color:#172f55; }
.desk { flex:1; min-width:0; }
.topbar { height:67px; border-bottom:1px solid var(--line); background:white; display:flex; align-items:center; gap:12px; padding:0 clamp(20px,3.6vw,64px); }
.crumb { display:flex; align-items:center; gap:11px; font-size:13px; min-width:0; }
.crumb span { flex:none; color:var(--muted); }
.crumb strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-weight:500; }
.crumb .slash { color:#a5b0c0; }
.invite-btn { margin-left:auto; white-space:nowrap; }
.menu-btn { display:none; }
#content { max-width:1390px; margin:auto; padding:30px clamp(20px,3.6vw,64px) 60px; }
.connection { margin:12px 24px 0; }
.project-head { display:flex; position:relative; align-items:stretch; min-height:175px; background:#e9effb; border:1px solid #d7e1f2; border-radius:9px; overflow:hidden; }
.project-copy { padding:29px 32px; flex:1; min-width:0; position:relative; }
.project-head h1,.thread-title { font:600 clamp(26px,2.4vw,38px)/1.42 var(--serif); overflow-wrap:anywhere; }
.project-description { color:#52617a; line-height:1.7; margin:8px 0 15px; white-space:pre-wrap; max-height:8.2em; overflow:auto; overflow-wrap:anywhere; }
.project-meta,.meta { display:flex; align-items:center; flex-wrap:wrap; gap:6px 14px; color:#596780; font-size:12px; }
.project-meta span,.meta span,.list-tail,.context-link { display:inline-flex; align-items:center; gap:5px; }
.project-meta .icon,.meta .icon { width:15px; height:15px; }
.project-art { flex:0 0 26%; background:#233d69 url('/surface.svg') center / 119% auto no-repeat; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:15px; margin:27px 0 16px; flex-wrap:wrap; }
.tabs { display:flex; border-bottom:1px solid var(--line); gap:20px; }
.tab { color:#68758b; border-bottom:3px solid transparent; padding:8px 0 9px; font-weight:600; white-space:nowrap; }
.tab.active { color:#243f85; border-bottom-color:var(--blue); }
.count { font:500 12px var(--sans); padding:3px 6px; border-radius:4px; background:#e5e9f0; color:#56657a; }
.tab.active .count { background:#dce6ff; color:#24438b; }
.list-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(205px,26%); gap:22px; align-items:start; }
.list-panel,.rail-panel,.thread-paper,.reply-paper { min-width:0; background:white; border:1px solid var(--line); border-radius:7px; }
.list-tools,.rail-head,.reply-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.list-tools,.rail-head { border-bottom:1px solid #e6eaf1; padding:14px 20px; }
.list-tools h2,.rail-head h2,.reply-head h2 { font-size:16px; font-weight:650; white-space:nowrap; }
.search-box { display:flex; align-items:center; gap:6px; color:#677791; }
.search-box input { width:142px; padding:4px 2px; border:0; border-bottom:1px solid #e1e6ef; border-radius:0; font-size:13px; }
.search-box .icon { width:15px; }
.list-row { display:flex; align-items:flex-start; border-bottom:1px solid #e6eaf1; gap:13px; padding:18px 20px; }
.list-row:last-child { border:0; }
.row-icon { display:grid; flex:none; place-items:center; width:36px; height:38px; background:#edf2fd; color:#44629a; border:1px solid #dce5f4; border-radius:6px; }
.file-icon { color:#29695c; background:#edf5f1; border-color:#d8e9df; }
.row-copy { min-width:0; flex:1; }
.list-title { padding:0; text-align:left; line-height:1.55; font-weight:600; overflow-wrap:anywhere; }
.row-excerpt { color:var(--muted); font-size:13px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; margin:3px 0 7px; }
.rail-content { padding:3px 16px 12px; }
.rail-head { padding:14px 16px; }
.tile { width:100%; padding:12px 0; text-align:left; align-items:flex-start; gap:10px; border-bottom:1px solid #e6eaf1; }
.tile:last-child { border:0; }
.tile .icon { color:#53725e; margin-top:3px; }
.tile div { min-width:0; }
.tile b { display:block; font-weight:550; font-size:14px; overflow-wrap:anywhere; }
.tile small { display:block; color:var(--muted); font-size:12px; }
.empty { padding:26px 20px; color:#67748a; font-size:14px; }
.rail-content .empty { padding:16px 0; }
.thread-layout { max-width:900px; margin:0 auto; }
.back { margin:0 0 13px; }
.thread-paper,.reply-paper { padding:clamp(18px,3vw,36px); margin-bottom:18px; }
.thread-paper .meta { margin:12px 0 21px; }
.context-link { text-align:left; margin-bottom:10px; }
.rich { overflow-wrap:anywhere; line-height:1.9; max-width:100%; }
.rich p { white-space:pre-wrap; margin:.5em 0; }
.rich h3,.rich h4 { margin:.8em 0 .35em; font-family:var(--serif); }
.rich pre { overflow:auto; padding:13px; line-height:1.55; background:#f2f4f8; border-radius:4px; }
.rich code { background:#f2f4f8; border-radius:3px; padding:1px 3px; }
.rich .math-line { display:block; overflow-x:auto; padding:6px 0; }
.rich math { font:1.05em "Cambria Math",math; }
.rich .math-line math { margin:0 auto; min-width:max-content; }
.thread-actions { margin-top:20px; }
.reply-head { padding-bottom:12px; border-bottom:1px solid var(--line); }
.reply { padding:19px 0; border-bottom:1px solid #e2e6ef; }
.reply-author { display:flex; gap:8px; align-items:center; margin-bottom:8px; font-size:14px; }
.reply-author time { color:var(--muted); font-size:12px; }
.reply-author .avatar { width:27px; height:27px; font-size:12px; }
.reply-ai .avatar { background:#e8e1fc; color:#6347a1; }
.compose { margin-top:18px; }
.compose label { margin:0 0 7px; }
.compose-foot,.modal-foot { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:12px; }
.compose-foot small { margin-right:auto; color:var(--muted); }
dialog { width:min(520px,calc(100% - 24px)); max-height:88vh; max-height:88dvh; border:1px solid #c9d3e0; border-radius:10px; color:var(--ink); padding:0; box-shadow:0 24px 85px #0d22443a; }
dialog::backdrop { background:#101f39a8; }
dialog.read-dialog { width:min(750px,calc(100% - 24px)); }
.modal-inner { padding:24px; }
.modal-header { display:flex; align-items:center; gap:14px; justify-content:space-between; margin-bottom:10px; }
.modal-header h2 { font:600 24px/1.5 var(--serif); overflow-wrap:anywhere; }
.modal-header .icon-btn { flex:none; }
.modal-foot { border-top:1px solid var(--line); padding-top:16px; margin-top:23px; flex-wrap:wrap; }
.modal-lead { color:#526078; font-size:14px; }
.read-body { padding:12px 0; }
.related { border-top:1px solid var(--line); margin-top:14px; padding-top:14px; }
.related h3 { font-size:15px; }
.related button { display:block; margin:8px 0; text-align:left; }
.copy-field { display:flex; gap:7px; }
.copy-field .btn { flex:none; }
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:8; background:#20365a; color:white; border-radius:5px; padding:9px 20px; box-shadow:0 5px 20px #11234125; font-size:14px; }
@media (min-width:1650px) { .sidebar { width:280px; } }
@media (max-width:1100px) { .sidebar { width:210px; } .list-grid { grid-template-columns:minmax(0,1fr) 205px; gap:14px; } .project-copy { padding:24px; } }
@media (max-width:930px) { .list-grid { grid-template-columns:1fr; } .rail-panel { display:none; } .sidebar { width:200px; } }
@media (max-width:710px) {
  .entry { display:block; } .cover { padding:20px 24px; } .cover-center { padding:17px 0 5px; } .cover-center h1 { font-size:26px; } .cover-center h1 br { display:none; } .cover-surface { position:absolute; width:155px; right:-18px; bottom:7px; opacity:.23; pointer-events:none; } .cover-foot,.join-sign { display:none; } .entry-panel { padding:34px 24px; } .join-form h2 { font-size:29px; } .intro { margin-bottom:20px; }
  .sidebar { position:fixed; top:0; left:0; width:min(270px,81vw); transform:translateX(-101%); } .sidebar.open { transform:none; } .shade { display:block; position:fixed; inset:0; background:#15263a70; z-index:3; } .menu-btn { display:inline-flex; flex:none; } .topbar { height:57px; padding:0 12px; gap:8px; } .crumb { gap:6px; } .invite-btn { min-height:33px; padding:5px 9px; } #content { padding:17px 14px 42px; } .project-head { min-height:135px; } .project-copy { padding:17px; } .project-art { flex-basis:19%; background-size:220% auto; } .project-description { font-size:13px; margin:7px 0 11px; } .project-meta { gap:8px; }
  .section-head { margin:17px 0 12px; gap:8px; } .tabs { gap:12px; } .tab { gap:4px; } .section-head .btn { padding:6px 10px; } .list-row,.list-tools { padding:13px; gap:9px; } .search-box input { width:110px; } .row-icon { width:29px; height:31px; } .modal-inner { padding:18px; } .compose-foot { flex-wrap:wrap; }
}
@media (max-width:375px) { .crumb>span { display:none; } .project-art { display:none; } }
.project-actions { display:flex;gap:9px;flex-wrap:wrap; }
.notification-btn { margin-left:auto;position:relative;flex:none; }
.invite-btn { margin-left:0; }
.unread-count { background:#3154b6;color:white;border-radius:20px;min-width:20px;padding:1px 5px;font-size:11px;line-height:18px; }
.summary-badge { color:#5d5194; }
.note-summary { margin:20px 0;padding:18px;background:#f3f2fb;border:1px solid #dddff0;border-radius:7px; }
.summary-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:8px; }
.summary-heading h3 { display:flex;gap:7px;align-items:center;font-size:16px;color:#4a427b; }
.summary-actions { display:flex;align-items:center;gap:12px; }
.summary-error { color:#91473b;font-size:14px;margin-top:8px; }
.note-original { font-size:16px;margin-top:20px; }
.chat-panel { background:white;border:1px solid var(--line);border-radius:7px;overflow:hidden; }
.chat-head { display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:15px 22px;border-bottom:1px solid var(--line); }
.chat-head h2 { font-size:17px; }
.chat-head p { color:var(--muted);font-size:13px; }
.chat-messages { min-height:170px;max-height:430px;overflow-y:auto;padding:7px 22px;scrollbar-gutter:stable; }
.chat-message { padding:17px 0;border-bottom:1px solid #e4e9f1;scroll-margin:18px; }
.chat-message:last-child { border:0; }
.chat-message .rich { margin-left:35px; }
.own-message .avatar { background:#dce8d9;color:#496146; }
.chat-compose { padding:17px 22px 21px;border-top:1px solid var(--line);margin:0;background:#fafbfe; }
.chat-compose textarea { min-height:78px; }
.mention-tools { display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px; }
.mention-tools .text-btn { font-size:13px; }
.mention-selected { color:var(--muted); }
.mention-options { border:1px solid #becce1;border-radius:5px;background:white;padding:5px;max-height:190px;overflow:auto;margin:3px 0 8px; }
.mention-options button { width:100%;display:flex;justify-content:space-between;padding:6px 10px;border-radius:3px;text-align:left; }
.mention-options button[aria-selected=true],.mention-options button:hover { background:#e9effb; }
.mention-options small { color:var(--muted); }
.mention-options .field-hint { padding:8px; }
.notifications { margin-top:18px; }
.notification-row { display:block;width:100%;text-align:left;border-top:1px solid var(--line);padding:15px 12px; }
.notification-row:hover { background:#f5f7fc; }
.notification-row.unread { background:#eef3ff;border-left:3px solid var(--blue); }
.notification-row>span { display:block;font-size:14px;overflow-wrap:anywhere; }
.notification-row .notification-info { display:flex;align-items:center;flex-wrap:wrap;gap:8px;justify-content:space-between;margin-bottom:6px; }
.notification-info time,.notification-row small { font-size:12px;color:var(--muted); }
.notification-row small { display:block;margin-top:6px; }
.jump-highlight { background:#fff4cd;outline:2px solid #e0c477; }
@media(max-width:710px) {
  .notification-label { display:none; }.notification-btn { min-height:33px;padding:5px 8px;gap:4px; }.topbar { gap:6px; }.crumb>span { display:none; }
  .section-head { align-items:flex-start; }.tabs { width:100%;justify-content:flex-start;gap:20px; }.project-actions { margin-top:4px; }.tab { font-size:14px; }
  .chat-head { padding:13px 16px; }.chat-messages { padding:5px 14px;max-height:390px; }.chat-compose { padding:14px; }.chat-head p { font-size:12px; }.reply-author { flex-wrap:wrap; }
  .note-summary { padding:14px; }.summary-actions { gap:9px; }.summary-actions .btn { padding:6px 9px; }
}

.entry { min-height:calc(100vh - var(--site-footer-height));min-height:calc(100dvh - var(--site-footer-height)); }
.workspace,.sidebar { height:calc(100vh - var(--site-footer-height));height:calc(100dvh - var(--site-footer-height)); }
.workspace { min-height:0; }
.desk { height:100%;overflow-y:auto; }
.site-footer { display:flex;align-items:center;justify-content:center;height:var(--site-footer-height);padding:8px 16px calc(8px + env(safe-area-inset-bottom, 0px));border-top:1px solid var(--line);background:#fff;font-size:13px;line-height:20px;text-align:center; }
.site-footer a { color:var(--muted);text-decoration:none;overflow-wrap:anywhere; }
.site-footer a:hover { color:var(--blue);text-decoration:underline;text-underline-offset:3px; }

