:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: #28312e; background: #fff; font-size: 14px; --accent: #267768; --muted: #78847e; --line: #e6ece8; --soft: #f7f9f8; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }
button { border: 0; background: transparent; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.8; }
h1 { font-size: 25px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
h2 { font-size: 17px; font-weight: 600; }
[hidden] { display: none !important; }
.app { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 0 16px; background: #f7f9f8; border-right: 1px solid var(--line); }
.brand { height: 83px; display: flex; align-items: center; gap: 10px; padding: 0 8px; color: #28312e; font-size: 23px; font-weight: 650; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; color: #fff; background: #293e32; font-size: 19px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { color: #727d77; padding: 11px 13px; border-radius: 6px; font-size: 13px; }
.sidebar nav a.active { color: #235d49; background: #e7efeb; font-weight: 550; }
.sidebar nav a:hover { background: #edf1ef; text-decoration: none; }
.sidebar-note { margin-top: 32px; padding: 0 12px; font-size: 11px; line-height: 1.9; color: #98a19c; }
.sidebar footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding: 20px 3px; border-top: 1px solid var(--line); font-size: 11px; }
.sidebar footer span { flex: 1; overflow-wrap: anywhere; min-width: 0; }
.sidebar footer button { padding: 6px; color: var(--accent); }
.main { min-width: 0; }
.topbar { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); font-size: 12px; }
#view { outline: none; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.page { padding: 34px 40px 60px; max-width: 1320px; margin: auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.page-heading p { margin-top: 9px; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 8px 12px; border: 1px solid #dce4df; border-radius: 5px; background: #fff; font-size: 12px; color: #40574a; text-align: center; }
.button:hover { background: #f0f5f2; text-decoration: none; }
.button.primary { background: #2d4738; color: white; border-color: #2d4738; }
.button.primary:hover { background: #3d5b49; }
.button.danger { color: #a23c46; border-color: #dfbfc2; }
.badge { display: inline-flex; align-items: center; padding: 4px 7px; background: #f0f4f1; color: #708075; border-radius: 4px; font-size: 10px; white-space: nowrap; }
.listing { margin: 16px 0; }
.list-row { display: flex; align-items: center; flex-wrap: wrap; gap: 15px; padding: 23px 8px; border-bottom: 1px solid var(--line); }
.list-row > div:first-of-type { flex: 1; min-width: 120px; }
.list-row p { margin-top: 6px; font-size: 12px; overflow-wrap: anywhere; }
.row-title { font-size: 15px; font-weight: 550; color: #33483a; }
.project-mark { height: 39px; width: 39px; display: grid; place-items: center; font-size: 23px; background: #edf3ef; border: 1px solid #e1ebe4; border-radius: 6px; color: #64816e; }
.project-page > .page-heading { padding: 29px 33px 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 26px; padding: 0 33px; border-bottom: 1px solid var(--line); }
.tabs a { position: relative; padding: 12px 0 15px; font-size: 12px; color: #849087; }
.tabs a.active { color: #2a694f; border-bottom: 2px solid #52816a; }
.tab-content { padding: 20px 33px 40px; }
.reading-status { padding: 14px 33px; border-bottom: 1px solid var(--line); }
.reader-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: stretch; }
.reader-layout .reader-grid { height: max(520px, calc(100dvh - 254px)); }
.reader-layout .reader, .reader-layout .discussion { overflow-y: auto; }
.mobile-reader-tabs { display: none; }
.reader { padding: 12px 33px 45px; min-width: 0; }
.selection-hint { font-size: 11px; padding: 10px 0 4px; }
.history { min-width: 0; }
.turn-divider { display: flex; gap: 14px; align-items: center; margin: 22px 0; font-size: 10px; color: #a2ada6; }
.turn-divider::before, .turn-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.research-item { position: relative; margin-bottom: 16px; padding: 18px 16px; border: 1px solid transparent; border-radius: 6px; scroll-margin-top: 20px; }
.research-item.selected { border-color: #bfd6c7; background: #fcfefc; }
.research-item:focus { outline: 2px solid #a6c7b4; }
.item-label { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 12px; margin-bottom: 14px; }
.research-text { font-size: 13px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.research-text::selection { background: #d8e7af; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.item-actions .button { font-size: 10px; padding: 5px 8px; min-height: 28px; border-color: #e4eae6; }
.item-extras details { margin-top: 12px; }
details { border: 1px solid var(--line); border-radius: 5px; margin: 12px 0; padding: 11px 13px; font-size: 12px; min-width: 0; }
summary { color: #67796c; line-height: 1.6; }
details[open] > summary { margin-bottom: 12px; }
.output-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 560px; overflow: auto; padding: 13px; background: #f4f7f5; font: 11px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.table-scroll { overflow: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 11px; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; max-width: 320px; overflow-wrap: anywhere; }
th { background: #f5f8f6; font-weight: 550; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.discussion { min-width: 0; border-left: 1px solid var(--line); background: #fbfcfb; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 21px 18px 15px; }
.panel-heading h2 { font-size: 13px; }
.selected-position { padding: 10px 18px; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.selected-position > span { display: block; max-height: 145px; overflow: auto; border-left: 2px solid #adc38f; padding: 8px; background: #f2f6ec; color: #778165; white-space: pre-wrap; }
.selected-position .button { margin-top: 8px; font-size: 10px; }
.filters { display: flex; gap: 5px; padding: 7px 18px 13px; }
.filters .button { font-size: 10px; padding: 5px 7px; min-height: 27px; }
.comment { padding: 18px; border-top: 1px solid var(--line); }
.comment.reply { margin-left: 17px; border-left: 2px solid #e3ebe5; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11px; }
.comment-meta time { color: #98a39a; font-size: 10px; }
.comment-body { margin-top: 11px; font-size: 12px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote { margin: 12px 0 6px; padding: 8px 10px; border-left: 2px solid #b7c894; background: #f1f5eb; color: #778266; font-size: 11px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.reference { display: block; padding: 10px; margin-top: 9px; border: 1px solid #e0e8e2; border-radius: 5px; background: white; font-size: 11px; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.comment-actions .button { font-size: 10px; padding: 3px 5px; border: 0; min-height: 25px; background: transparent; }
.comment-actions .choice { font-size: 10px; padding: 0; }
.compose { border-top: 1px solid var(--line); padding: 17px; }
.compose textarea { width: 100%; min-height: 91px; resize: vertical; border: 1px solid #d8e2db; border-radius: 5px; padding: 10px; font-size: 12px; line-height: 1.8; margin-bottom: 10px; background: white; }
.compose .actions { justify-content: space-between; }
.compose .small { margin-top: 10px; }
.btw-action { padding: 10px 17px 17px; }
.btw-action .button { width: 100%; }
.attachment-selection { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.attachment-selection .button { font-size: 10px; }
.section-heading { margin: 35px 0 15px; }
.empty { padding: 48px 20px; text-align: center; }
.empty h2 { font-size: 16px; font-weight: 500; color: #718176; margin-bottom: 12px; }
.empty p { color: #96a198; font-size: 12px; }
.discussion .empty { padding: 32px 18px; }
.discussion .empty h2 { font-size: 13px; }
.notice { padding: 12px 15px; margin: 13px 0; background: #faf8f0; color: #8e7b46; border-left: 2px solid #d6bd7e; font-size: 12px; line-height: 1.8; }
.error { padding: 15px; margin: 14px 0; background: #fff6f5; border: 1px solid #f0d6d2; border-radius: 5px; color: #a74944; font-size: 12px; overflow-wrap: anywhere; }
.error strong { font-weight: 500; line-height: 1.8; }
.error small { display: block; font-size: 10px; margin: 8px 0; }
.error .button { margin-top: 8px; }
.loading { padding: 42px; color: #8d9b91; font-size: 13px; }
.material-page .reading-status { padding-left: 0; }
.material-page .history { max-width: 940px; margin: 0 auto; }
.login-page { max-width: 720px; padding-top: 100px; }
.login-page > .button { margin: 20px 10px 0 0; }
dialog { border: 1px solid #e0e7e2; border-radius: 8px; padding: 0; width: 590px; max-width: calc(100vw - 28px); max-height: calc(100dvh - 32px); color: #28312e; box-shadow: 0 15px 70px #18312325; }
dialog::backdrop { background: #192d2340; backdrop-filter: blur(2px); }
.dialog-header { padding: 21px 25px; border-bottom: 1px solid var(--line); }
.dialog-content { padding: 23px 25px; overflow-y: auto; max-height: calc(100dvh - 195px); }
.dialog-content > p { font-size: 12px; margin-bottom: 17px; }
.dialog-content > .button, .dialog-content form > .button { margin: 10px 7px 0 0; }
.dialog-footer { display: flex; justify-content: flex-end; padding: 14px 25px; border-top: 1px solid var(--line); }
.field { display: block; margin-bottom: 18px; font-size: 12px; color: #67796c; }
.field input, .field textarea { display: block; margin-top: 9px; width: 100%; border: 1px solid #d8e2db; border-radius: 5px; background: white; padding: 10px; font-size: 12px; }
.field textarea { resize: vertical; }
.choice { display: flex; gap: 9px; align-items: center; padding: 12px 0; font-size: 12px; line-height: 1.7; }
.choice input { accent-color: #387956; width: 15px; height: 15px; flex-shrink: 0; }
.session-choice { border-bottom: 1px solid var(--line); }
.session-choice small { display: block; }
.seed-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.seed-item strong { display: block; font-size: 11px; margin-bottom: 8px; }
.seed-item .research-text { font-size: 12px; }
.fixed-context { margin-bottom: 20px; }
#notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 30px); padding: 11px 18px; border: 1px solid #d9e3dc; border-radius: 7px; background: #fff; box-shadow: 0 8px 30px #213b2525; font-size: 12px; z-index: 100; }
@media (max-width: 1080px) {
  .app { grid-template-columns: 185px minmax(0, 1fr); }
  .reader-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .reader { padding: 12px 16px 35px; }
  .page { padding: 28px 25px 45px; }
  .project-page > .page-heading { padding: 25px 25px 0; }
  .research-item { padding: 15px 8px; }
  .page-heading { flex-wrap: wrap; }
}
@media (max-width: 820px) {
  .app { display: block; }
  .sidebar { position: static; height: auto; padding: 0 17px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { height: 55px; font-size: 21px; }
  .sidebar nav { display: flex; gap: 4px; padding-bottom: 12px; flex-wrap: wrap; }
  .sidebar nav a { font-size: 12px; padding: 8px 11px; }
  .sidebar footer { position: absolute; top: 12px; right: 18px; border: 0; padding: 0; max-width: 42%; }
  .sidebar-note { display: none; }
  .topbar { height: 44px; padding: 0 22px; font-size: 11px; }
  .reader-grid { grid-template-columns: minmax(0, 1fr); }
  .reader-layout .reader-grid { height: auto; }
  .reader-layout .reader, .reader-layout .discussion { max-height: calc(100dvh - 90px); overflow-y: auto; }
  .reader-layout .discussion, .reader-layout.show-comments .reader { display: none; }
  .reader-layout.show-comments .discussion { display: block; }
  .mobile-reader-tabs { display: flex; gap: 10px; padding: 10px 22px; border-bottom: 1px solid var(--line); }
  .mobile-reader-tabs .button[aria-pressed="true"] { background: #e9f2ed; border-color: #c5d9cc; }
  .discussion { border-left: 0; border-top: 1px solid var(--line); }
  .discussion .comments { max-height: 650px; overflow: auto; }
  .tabs { gap: 22px; padding: 0 22px; }
  .project-page > .page-heading { padding: 25px 22px 0; }
  .reader { padding: 12px 18px 28px; }
  .reading-status { padding: 12px 22px; }
  .page { padding: 27px 22px 40px; }
  .tab-content { padding: 18px 22px 35px; }
  .page-heading { gap: 15px; }
  h1 { font-size: 23px; }
  .list-row { gap: 10px; padding: 19px 1px; }
  .dialog-content { padding: 20px; }
  .dialog-header, .dialog-footer { padding: 17px 20px; }
}

.cloud-tool-output { --foreground:#293b31; --background:#fafbf8; --secondary:#586954; --line:#e1e6de; --hover:#edf2e7; --selected:#e3ebde; --button:#3c6650; --button-text:#fff; --code:#f3f6ef; --accent:#3c6650; --mono:ui-monospace,monospace; min-width:0; }
.cloud-tool-output .molecule-stage { min-height:360px; }
.cloud-tool-output .result-code { white-space:pre-wrap; overflow-wrap:anywhere; }
.research-image { display:block; max-width:100%; max-height:620px; object-fit:contain; margin:12px 0; }
.cloud-attachment { min-width:0; }
