:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #1f2329;
  --muted: #667085;
  --line: #e6eaf2;
  --brand: #3370ff;
  --brand-deep: #245bdb;
  --accent: #8fb1ff;
  --success: #2d7a41;
  --warning: #b15d1c;
  --danger: #c5342f;
  --shadow-lg: 0 18px 42px rgba(31, 35, 41, 0.08);
  --shadow-md: 0 10px 24px rgba(31, 35, 41, 0.06);
  --shadow-sm: 0 4px 12px rgba(31, 35, 41, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  min-height: 100vh;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

.brand-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 0;
  max-width: none;
  padding: 10px 18px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #e5e6eb;
  background: #ffffff;
  box-shadow: none;
}

.brand-main {
  min-width: 0;
}

.eyebrow,
.section-kicker,
.empty-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: #8a919f;
}

.eyebrow::before,
.section-kicker::before,
.empty-badge::before {
  content: "";
  width: 12px;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
}

.brand-bar h1,
.hero-card h2,
.empty-state h3 {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.brand-bar h1 {
  margin-top: 2px;
  font-size: 18px;
  line-height: 1.3;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: #8a919f;
  font-size: 12px;
  line-height: 1.5;
  max-width: 680px;
  display: none;
}

.brand-main .eyebrow {
  display: none;
}

.brand-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status-badge,
.ghost-btn,
.primary-btn {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 14px;
  border: 1px solid transparent;
  transition: transform 140ms ease, opacity 140ms ease, border-color 140ms ease;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  background: #f8faff;
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
  border-radius: 999px;
}

.brand-actions .status-badge {
  display: none;
}

.status-badge.info {
  color: var(--brand);
  background: rgba(51, 112, 255, 0.08);
}

.status-badge.success {
  color: var(--success);
  background: rgba(45, 122, 65, 0.1);
}

.status-badge.warn {
  color: var(--warning);
  background: rgba(177, 93, 28, 0.1);
}

.status-badge.danger {
  color: var(--danger);
  background: rgba(154, 41, 53, 0.1);
}

.ghost-btn,
.primary-btn {
  border-radius: 16px;
}

.ghost-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.primary-btn {
  border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 10px 20px rgba(51, 112, 255, 0.18);
}

.page-layout {
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) minmax(320px, 400px);
  gap: 0;
  align-items: stretch;
  padding: 0;
  min-height: calc(100vh - 52px);
  height: calc(100vh - 52px);
  background: #ffffff;
}

.doc-rail,
.doc-frame,
.chat-frame {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: none;
}

.doc-rail {
  padding: 12px 8px 16px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: #f7f8fa;
  position: sticky;
  top: 0;
  min-height: calc(100vh - 52px);
  height: calc(100vh - 52px);
  border: 0;
  border-right: 1px solid #e5e6eb;
  border-radius: 0;
  overflow: hidden;
}

.rail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rail-title {
  margin-top: 0;
  font-size: 13px;
  font-weight: 600;
  color: #4e5969;
}

.doc-rail .section-kicker,
.doc-head .section-kicker {
  display: none;
}

.doc-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid #dfe2e8;
  background: #ffffff;
  display: none;
}

.doc-status.warn {
  color: var(--warning);
  background: rgba(177, 93, 28, 0.1);
}

.doc-status.danger {
  color: var(--danger);
  background: rgba(154, 41, 53, 0.1);
}

.doc-toc {
  display: grid;
  gap: 2px;
  max-height: none;
  height: calc(100vh - 120px);
  overflow: auto;
  padding: 4px 6px 4px 2px;
}

.doc-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 4px;
}

.toc-group {
  display: grid;
  gap: 2px;
}

.toc-group + .toc-group {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #f0f1f5;
}

.toc-group-head {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.toc-toggle,
.toc-toggle-placeholder {
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  color: #98a2b3;
  padding: 0;
  line-height: 1;
  font-size: 12px;
}

.toc-toggle {
  cursor: pointer;
  transition: transform 140ms ease;
}

.toc-toggle.is-collapsed {
  transform: rotate(-90deg);
}

.toc-link {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  text-align: left;
  background: transparent;
  color: #4e5969;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.toc-link:hover {
  background: #eef3ff;
  color: #1d4ed8;
}

.toc-link.is-active {
  background: #e8f0ff;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: inset 2px 0 0 #3370ff;
}

.toc-l2 {
  font-weight: 600;
  font-size: 13px;
  color: #1d2129;
}

.toc-children {
  margin-left: 18px;
  display: grid;
  gap: 1px;
  border-left: 2px solid #e5e7eb;
}

.toc-children.is-collapsed {
  display: none;
}

.toc-l3 {
  color: #6b7280;
  font-size: 12px;
  padding-left: 10px;
  border-radius: 0 6px 6px 0;
}

.toc-l3:hover {
  background: #f5f7fa;
}

.toc-l3.is-active {
  color: #1d4ed8;
  background: #eef3ff;
  box-shadow: none;
  font-weight: 600;
}

.doc-stage {
  min-width: 0;
  background: #ffffff;
  border-right: 1px solid #eceef3;
  padding: 0 56px;
  height: calc(100vh - 52px);
  overflow-y: auto;
}

.doc-frame {
  min-height: auto;
  padding: 32px 0 64px;
  display: grid;
  gap: 18px;
  min-width: 0;
  width: min(100%, 960px);
  margin: 0 auto;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  max-width: 960px;
}

.doc-breadcrumb {
  font-size: 13px;
  color: #8a919f;
  display: block;
  margin-bottom: 6px;
  line-height: 1.5;
}

.doc-head h2 {
  margin: 8px 0 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 2.8vw, 40px);
  font-weight: 700;
  line-height: 1.22;
}

.doc-meta {
  margin-top: 8px;
  color: #8a919f;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.doc-summary {
  margin: 14px 0 0;
  color: #475467;
  line-height: 1.75;
  font-size: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 860px;
  display: none;
}

.doc-summary.is-hidden {
  display: none;
}

.doc-content {
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 15px;
  color: var(--ink);
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  min-height: 360px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-content.is-html {
  white-space: normal;
}

.doc-content.is-html-frame {
  padding: 0;
  overflow: hidden;
  white-space: normal;
}

.doc-content.is-pdf {
  padding: 18px;
  background: #f8faff;
  border: 1px solid var(--line);
  border-radius: 14px;
  white-space: normal;
}

.pdf-viewer {
  display: grid;
  gap: 18px;
}

.pdf-page {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.pdf-page-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.pdf-page-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.doc-html-frame {
  width: 100%;
  border: 0;
  display: block;
  height: clamp(420px, 75vh, 980px);
  background: #fff;
}

.doc-content.is-html h1,
.doc-content.is-html h2,
.doc-content.is-html h3,
.doc-content.is-html h4 {
  margin: 34px 0 14px;
  line-height: 1.26;
  color: #1f2329;
}

.doc-content.is-html h1 {
  font-size: clamp(24px, 2.6vw, 34px);
}

.doc-content.is-html h2 {
  font-size: clamp(20px, 2vw, 28px);
}

.doc-content.is-html h3 {
  font-size: clamp(17px, 1.6vw, 22px);
}

.doc-content.is-html p {
  margin: 0 0 16px;
}

.doc-content.is-html img,
.doc-content.is-html video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.doc-content.is-html video {
  background: #000;
}

.doc-content.is-html .doc-video-label {
  margin-bottom: 8px;
  font-weight: 600;
}

.doc-content.is-html .doc-video-link {
  color: var(--brand);
  display: inline-flex;
  margin-top: 8px;
}

.doc-content.is-html .doc-video-status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.doc-content.is-html .doc-video-status.success {
  color: var(--success);
}

.doc-content.is-html .doc-video-status.danger {
  color: var(--danger);
}

.doc-content.is-html .doc-video-status.info {
  color: var(--brand);
}

.doc-content.is-html .pdf-page {
  margin-bottom: 16px;
}

.doc-content.is-html ul,
.doc-content.is-html ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.doc-content.is-html pre {
  white-space: pre-wrap;
  background: #f8faff;
  border-radius: 12px;
  padding: 14px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
}

.doc-content.is-html table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.doc-content.is-html th,
.doc-content.is-html td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

.doc-content.is-html a {
  color: var(--brand);
  word-break: break-word;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.suggestion-list,
.info-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.suggestion-btn,
.feedback-btn {
  width: 100%;
  border: 1px solid rgba(15, 109, 103, 0.1);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  background: rgba(15, 109, 103, 0.04);
  color: var(--ink);
  line-height: 1.55;
}

.suggestion-btn:hover,
.feedback-btn:hover {
  transform: translateY(-1px);
}

.info-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(24, 43, 45, 0.06);
}

.info-item strong {
  display: block;
  margin-bottom: 8px;
}

.info-item span {
  display: block;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.chat-stage {
  min-width: 0;
  position: sticky;
  top: 8px;
  align-self: start;
  padding: 8px 12px 12px 16px;
  background: #f5f6f8;
}

.chat-frame {
  min-height: calc(100vh - 108px);
  height: calc(100vh - 140px);
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(247, 248, 248, 0.96), rgba(242, 244, 244, 0.96)),
    rgba(244, 246, 246, 0.96);
  border-color: rgba(24, 43, 45, 0.08);
  box-shadow: var(--shadow-sm);
}

.chat-head {
  padding: 8px 8px 18px;
}

.status-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.message-list {
  min-height: 260px;
  overflow: auto;
  overflow-x: hidden;
  display: grid;
  gap: 18px;
  padding: 4px 6px 10px;
}

.empty-state {
  min-height: 380px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 20px;
}

.empty-state h3 {
  margin-top: 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
}

.empty-state p {
  margin: 12px 0 0;
  max-width: 620px;
  color: var(--muted);
  line-height: 1.72;
}

.empty-state .suggestion-list {
  width: min(680px, 100%);
  margin-top: 24px;
}

.empty-state.is-hidden {
  display: none;
}

.message {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.message.assistant {
  justify-items: stretch;
}

.message.user {
  justify-items: end;
}

.message.system {
  justify-items: center;
}

.message-card {
  max-width: min(860px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(24, 43, 45, 0.06);
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(24, 34, 34, 0.04);
  min-width: 0;
}

.message.user .message-card {
  background: linear-gradient(135deg, rgba(15, 109, 103, 0.1), rgba(15, 109, 103, 0.04));
  border-color: rgba(15, 109, 103, 0.12);
}

.message.system .message-card {
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  text-align: center;
}

.message.system .message-card.warn {
  color: var(--warning);
  background: rgba(177, 93, 28, 0.08);
}

.message.system .message-card.danger {
  color: var(--danger);
  background: rgba(154, 41, 53, 0.08);
}

.message-role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.message-role::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: 0.42;
}

.message-body {
  line-height: 1.78;
  font-size: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-body p,
.message-body ol,
.message-body ul,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6,
.message-body .message-media-block {
  margin: 0 0 14px;
}

.message-body > :last-child {
  margin-bottom: 0;
}

.message-body strong {
  color: var(--ink);
  font-weight: 700;
}

.message-body code {
  display: inline-block;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(24, 43, 45, 0.08);
  font-size: 0.94em;
}

.message-heading {
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 600;
  line-height: 1.45;
}

.message-heading.level-3,
.message-heading.level-4 {
  font-size: 18px;
}

.message-heading.level-5,
.message-heading.level-6 {
  font-size: 16px;
}

.message-list {
  padding-left: 1.5em;
}

.message-list li + li {
  margin-top: 10px;
}

.message-list li::marker {
  color: var(--brand);
  font-weight: 700;
}

.message-link {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.message-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.message-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(24, 43, 45, 0.08);
  background: rgba(255, 255, 255, 0.8);
  object-fit: cover;
  cursor: zoom-in;
}

.message-inline-image {
  display: block;
  width: 100%;
  max-height: 420px;
  margin: 12px 0;
  border-radius: 14px;
  border: 1px solid rgba(24, 43, 45, 0.08);
  background: rgba(255, 255, 255, 0.8);
  object-fit: contain;
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms ease, visibility 160ms ease;
  z-index: 9999;
}

.image-lightbox.is-visible {
  opacity: 1;
  visibility: visible;
}

.image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 22, 0.72);
  backdrop-filter: blur(2px);
}

.image-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 86vh;
  padding: 14px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 1px solid rgba(24, 43, 45, 0.12);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox__img {
  max-width: 86vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(24, 43, 45, 0.12);
  background: #fff;
}

.image-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(24, 43, 45, 0.15);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.image-lightbox__close:hover {
  color: var(--ink);
}

body.lightbox-open {
  overflow: hidden;
}

.message-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.confidence-chip,
.hint-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(24, 43, 45, 0.08);
}

.hint-chip.warn {
  color: var(--warning);
  background: rgba(177, 93, 28, 0.1);
}

.citations {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

.citation {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 109, 103, 0.1);
  background: rgba(15, 109, 103, 0.04);
  min-width: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.citation:hover {
  border-color: rgba(15, 109, 103, 0.24);
  background: rgba(15, 109, 103, 0.08);
}

.citation.is-active {
  border-color: rgba(15, 109, 103, 0.34);
  box-shadow: inset 0 0 0 1px rgba(15, 109, 103, 0.18);
}

.citation small,
.citation span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.citation strong {
  display: block;
  margin-bottom: 8px;
}

.citation small,
.citation span {
  display: block;
  color: var(--muted);
  line-height: 1.58;
  font-size: 13px;
}

.pdf-page.is-focused {
  box-shadow: 0 0 0 2px rgba(15, 109, 103, 0.16);
  border-radius: 16px;
}

.feedback-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(24, 43, 45, 0.08);
}

.feedback-copy {
  color: var(--muted);
  font-size: 13px;
}

.feedback-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-btn {
  width: auto;
  padding: 10px 14px;
  border-radius: 999px;
}

.feedback-btn[data-label="helpful"] {
  background: rgba(45, 122, 65, 0.1);
  color: var(--success);
}

.feedback-btn[data-label="unhelpful"] {
  background: rgba(177, 93, 28, 0.1);
  color: var(--warning);
}

.feedback-btn[data-label="incorrect"] {
  background: rgba(154, 41, 53, 0.1);
  color: var(--danger);
}

.feedback-btn.is-active {
  box-shadow: inset 0 0 0 1px currentColor;
}

.feedback-note summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

.feedback-note textarea {
  margin-top: 10px;
  width: 100%;
  min-height: 86px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

.composer {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(24, 43, 45, 0.08);
}

.composer textarea {
  width: 100%;
  min-height: 110px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 18px 20px;
  outline: none;
  resize: vertical;
  line-height: 1.7;
}

.composer textarea:focus {
  border-color: rgba(15, 109, 103, 0.42);
  box-shadow: 0 0 0 4px rgba(15, 109, 103, 0.08);
}

.composer-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.composer-hint {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1320px) {
  .page-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  }

  .chat-stage {
    grid-column: 1 / -1;
    position: static;
    top: auto;
    padding: 12px 0 0;
    background: transparent;
  }

  .doc-frame,
  .chat-frame {
    min-height: auto;
    height: auto;
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: 0;
    height: auto;
    overflow: visible;
  }

  .brand-bar,
  .composer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-bar {
    padding: 10px 12px;
  }

  .page-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    height: auto;
  }

  .doc-stage {
    border-right: 0;
    padding: 0 16px;
    height: auto;
    overflow: visible;
  }

  .doc-frame {
    margin: 0;
  }

  .doc-frame {
    max-width: 100%;
  }

  .doc-toc {
    max-height: none;
  }

  .doc-rail,
  .chat-stage {
    position: static;
    top: auto;
  }

  .doc-rail {
    border-right: 0;
    border-bottom: 1px solid #e5e6eb;
    min-height: auto;
    height: auto;
  }

  .chat-stage {
    padding: 12px 12px 16px;
    background: transparent;
  }

  .chat-frame {
    padding: 14px;
    border-radius: 18px;
  }

  .doc-rail,
  .doc-frame {
    border-radius: 0;
  }

  .doc-frame {
    padding: 22px 0;
  }

  .message-card {
    max-width: 100%;
  }
}
