* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; background: #f3efe6; color: #25231f; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* ========== 登录页 ========== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f3efe6; }
.auth-card { background: #faf8f3; border: 1px solid #d8d0c1; border-radius: 20px; padding: 48px 40px; width: 400px; box-shadow: 0 20px 60px rgba(39,59,49,.13); }
.auth-logo { width: 56px; height: 56px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 14px; background: #2f4b3b; color: #fff; font-size: 22px; }
.auth-card h1 { text-align: center; font-size: 24px; letter-spacing: 0.16em; margin-bottom: 4px; }
.subtitle { text-align: center; color: #766f63; font-size: 13px; margin-bottom: 28px; }
.tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 2px solid #e2dbcf; }
.tab { flex: 1; padding: 10px; background: none; border: none; font-size: 15px; color: #8a8276; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s; }
.tab.active { color: #273b31; border-bottom-color: #273b31; font-weight: 600; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input { padding: 12px 14px; border: 1px solid #d8d0c1; border-radius: 10px; font-size: 15px; outline: none; background: #fff; transition: border-color .2s; }
.auth-form input:focus { border-color: #2f4b3b; }
.btn-primary-full { padding: 13px; background: #bd6847; color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
.btn-primary-full:hover { background: #a95739; }
.error-msg { color: #a14636; font-size: 13px; margin-top: 12px; text-align: center; }

/* ========== 主框架 ========== */
.topbar { border-bottom: 1px solid #d8d0c1; background: rgba(248,245,238,.95); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 100; }
.topbar-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #2f4b3b; color: #fff; font-size: 18px; }
.brand-title { font-size: 18px; font-weight: 600; letter-spacing: 0.16em; }
.brand-sub { font-size: 11px; color: #766f63; }
.user-info { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.user-text { text-align: right; }
.user-text small { display: block; color: #766f63; font-size: 11px; }

.layout { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 230px 1fr; gap: 28px; padding: 28px 24px; }

/* ========== 侧边栏 ========== */
.sidebar { border-radius: 16px; background: #273b31; padding: 16px; color: #e9eee9; box-shadow: 0 20px 60px rgba(39,59,49,.13); height: fit-content; position: sticky; top: 80px; }
.sidebar-label { padding: 8px 12px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: #aebdb4; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a { display: block; padding: 12px; border-radius: 12px; font-size: 14px; color: #e9eee9; text-decoration: none; transition: background .15s; }
.sidebar-nav a:hover { background: rgba(255,255,255,.06); }
.sidebar-nav a.nav-active { background: #f3efe6; color: #273b31; font-weight: 600; }
.sidebar-hint { margin-top: 24px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); padding: 16px; }
.hint-title { font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.hint-text { font-size: 12px; line-height: 1.6; color: #b9c7bf; }

/* ========== 主内容 ========== */
.page-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; }
.page-eyebrow { font-size: 13px; font-weight: 500; color: #65776d; }
.page-title { font-size: 30px; font-weight: 600; margin-top: 4px; letter-spacing: -0.02em; }
.page-desc { margin-top: 10px; max-width: 640px; font-size: 14px; line-height: 1.6; color: #766f63; }

.device-code-area { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.device-code-display { display: flex; align-items: center; gap: 10px; border-radius: 10px; border: 1px solid #d7bea9; background: #fff8ef; padding: 8px 14px; }
.code-hint { font-size: 12px; color: #786b5d; }
.code-value { font-size: 20px; letter-spacing: 0.22em; font-weight: 700; }
.code-error { font-size: 12px; color: #a14636; }

/* ========== 统计卡片 ========== */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.metric-card { border-radius: 16px; border: 1px solid #d8d0c1; background: #faf8f3; padding: 20px; }
.metric-label { font-size: 13px; color: #776f63; }
.metric-value { font-size: 32px; font-weight: 600; margin-top: 8px; }
.metric-note { font-size: 12px; color: #8a8276; margin-top: 4px; }

/* ========== 卡片通用 ========== */
.card { border-radius: 16px; border: 1px solid #d8d0c1; background: #faf8f3; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 24px; overflow: hidden; }
.section-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid #ddd5c8; }
.section-header h2 { font-size: 17px; font-weight: 600; }
.section-desc { font-size: 12px; color: #7d7569; margin-top: 4px; }
.status-badge { border-radius: 8px; border: 1px solid #bdb3a3; background: #fff; padding: 6px 14px; font-size: 13px; font-weight: 500; }

/* ========== 按钮 ========== */
.btn-accent, .btn-outline { border-radius: 10px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s, opacity .15s; display: inline-flex; align-items: center; gap: 6px; }
.btn-accent { background: #bd6847; color: #fff; border: none; }
.btn-accent:hover { background: #a95739; }
.btn-accent:disabled, .btn-outline:disabled { opacity: .48; cursor: not-allowed; }
.btn-outline { background: #fff; color: #3b3934; border: 1px solid #bdb3a3; }
.btn-outline:hover { background: #eee8dc; }

/* ========== 导入工作台 ========== */
.import-card { padding: 22px; }
.import-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.import-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: #9a5c42; }
.import-title { font-size: 20px; font-weight: 600; margin-top: 6px; }
.import-desc { margin-top: 8px; font-size: 13px; line-height: 1.6; color: #766f63; max-width: 560px; }
.import-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.import-preview { margin-top: 20px; border-radius: 12px; background: #f0ece3; padding: 16px; }
.preview-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.preview-card { background: #fff; border-radius: 8px; padding: 12px 14px; }
.preview-card strong { font-size: 14px; display: block; margin-bottom: 4px; }
.preview-card p { font-size: 12px; color: #766f63; }
.import-status { margin-top: 14px; padding: 10px 14px; border-radius: 8px; font-size: 13px; }
.import-status.success { background: #e8f8ed; color: #248a3d; }
.import-status.error { background: #fff2f2; color: #d70015; }
.import-status.info { background: #f0f0ff; color: #667eea; }

/* 拖拽区域 */
.drop-zone { border: 2px dashed #bdb3a3; border-radius: 12px; padding: 28px; text-align: center; margin-bottom: 16px; transition: border-color .2s, background .2s; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragover { border-color: #bd6847; background: #fff8ef; }
.drop-icon { font-size: 28px; margin-bottom: 8px; }
.drop-text { font-size: 14px; font-weight: 500; color: #3b3934; }
.drop-hint { font-size: 12px; color: #8a8276; margin-top: 4px; }

/* 进度条 */
.progress-bar { height: 6px; background: #e2dbcf; border-radius: 3px; overflow: hidden; margin-top: 14px; }
.progress-fill { height: 100%; background: #2f7d4f; width: 0%; transition: width .3s; border-radius: 3px; }

/* ========== 小说列表 ========== */
.novel-list { divide-y: 1px solid #e2dbcf; }
.novel-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 20px 22px; border-bottom: 1px solid #e2dbcf; transition: background .15s; }
.novel-row:hover { background: rgba(255,255,255,.5); }
.novel-row:last-child { border-bottom: none; }
.novel-info { display: flex; gap: 14px; min-width: 0; }
.novel-cover { width: 48px; height: 64px; flex-shrink: 0; display: grid; place-items: center; border-radius: 6px; background: #d8c6a6; color: #55452e; font-size: 20px; font-weight: 600; }
.novel-info h3 { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.novel-meta { font-size: 13px; color: #776f63; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.novel-meta span { background: #f0ece3; padding: 2px 8px; border-radius: 4px; }
.revision-badge { background: #e4eee7 !important; color: #42604e !important; }
.novel-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.novel-empty { padding: 48px 22px; text-align: center; font-size: 14px; color: #7d7569; }

/* ========== 两列布局 ========== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two-col .card { margin-bottom: 0; }
.two-col .card h2 { padding: 18px 22px; border-bottom: 1px solid #ddd5c8; font-size: 17px; font-weight: 600; }

/* ========== 设备列表 ========== */
.device-list { padding: 16px 22px; display: flex; flex-direction: column; gap: 12px; }
.device-item { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; border-radius: 12px; background: #f0ece3; padding: 12px; font-size: 14px; }
.device-item h4 { font-size: 14px; }
.device-kind { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; background: #e4eee7; color: #42604e; margin-left: 6px; }
.device-item p { font-size: 12px; color: #6b776f; margin-top: 2px; }
.device-empty, .sync-empty { padding: 24px; text-align: center; font-size: 14px; color: #7d7569; }

/* ========== 同步记录 ========== */
.sync-list { padding: 16px 22px; display: flex; flex-direction: column; gap: 8px; }
.sync-item { display: flex; justify-content: space-between; font-size: 13px; padding: 8px 0; }
.sync-direction { font-weight: 500; }
.sync-direction.upload { color: #2f7d4f; }
.sync-direction.download { color: #2563eb; }

/* ========== 章节弹窗 ========== */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 200; padding: 16px; }
.chapter-modal { max-height: 82vh; width: 100%; max-width: 768px; border-radius: 16px; background: #faf8f3; box-shadow: 0 25px 80px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.chapter-modal .modal-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid #ddd5c8; padding: 18px 22px; }
.chapter-modal .modal-header h2 { font-size: 17px; font-weight: 600; }
.modal-desc { font-size: 12px; color: #766f63; margin-top: 4px; }
.chapter-modal .modal-body { max-height: 66vh; overflow-y: auto; padding: 20px 22px; }
.chapter-ol { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.chapter-li { border-radius: 12px; border: 1px solid #ded6c9; background: #fff; padding: 16px; }
.chapter-li-head { display: flex; justify-content: space-between; gap: 12px; }
.chapter-li-head strong { font-size: 14px; }
.chapter-li-head span { font-size: 12px; color: #7d7569; white-space: nowrap; }
.chapter-li-preview { margin-top: 8px; font-size: 13px; line-height: 1.7; color: #6f685e; }
.chapter-loading { padding: 40px; text-align: center; font-size: 14px; color: #766f63; }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .metrics { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
}

/* ========== 写作台 ========== */
.writer-page { position: fixed; inset: 0; z-index: 150; background: #faf8f3; display: flex; flex-direction: column; }
.writer-topbar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid #d8d0c1; background: #fff; flex-shrink: 0; }
.writer-title-area { flex: 1; display: flex; gap: 10px; align-items: center; }
.writer-novel-title { font-size: 18px; font-weight: 600; border: none; outline: none; background: transparent; padding: 6px 10px; border-radius: 8px; min-width: 0; flex: 1; max-width: 400px; }
.writer-novel-title:focus { background: #f3efe6; }
.writer-novel-author { font-size: 13px; color: #766f63; border: none; outline: none; background: transparent; padding: 6px 10px; border-radius: 8px; width: 140px; }
.writer-novel-author:focus { background: #f3efe6; }
.writer-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.save-status { font-size: 12px; color: #766f63; }
.save-status.saved { color: #2f7d4f; }
.save-status.saving { color: #b8860b; }

.writer-body { flex: 1; display: grid; grid-template-columns: 200px 240px 1fr; overflow: hidden; }
.writer-novels-panel, .writer-chapters-panel { border-right: 1px solid #e2dbcf; display: flex; flex-direction: column; overflow: hidden; }
.panel-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #e2dbcf; flex-shrink: 0; }
.panel-header h3 { font-size: 14px; font-weight: 600; }
.btn-sm { padding: 4px 10px !important; font-size: 12px !important; border-radius: 6px !important; }
.btn-danger { color: #a14636 !important; border-color: #d4a8a0 !important; }
.btn-danger:hover { background: #fff2f2 !important; }
.word-count { font-size: 12px; color: #766f63; }

.writer-novel-list, .writer-chapter-list { flex: 1; overflow-y: auto; padding: 8px; }
.writer-novel-item { padding: 10px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; transition: background .15s; }
.writer-novel-item:hover { background: #f0ece3; }
.writer-novel-item.active { background: #e4eee7; font-weight: 600; }
.writer-novel-item .wn-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.writer-novel-item .wn-meta { font-size: 11px; color: #8a8276; margin-top: 2px; }

.writer-chapter-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; transition: background .15s; }
.writer-chapter-item:hover { background: #f0ece3; }
.writer-chapter-item.active { background: #e4eee7; font-weight: 600; }
.chapter-seq { font-size: 11px; color: #8a8276; width: 24px; text-align: right; flex-shrink: 0; }
.chapter-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.chapter-words { font-size: 11px; color: #8a8276; flex-shrink: 0; }

.writer-editor-panel { display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.editor-header { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid #e2dbcf; flex-shrink: 0; }
.chapter-title-input { flex: 1; font-size: 17px; font-weight: 600; border: none; outline: none; background: transparent; padding: 6px 0; }
.editor-tools { display: flex; gap: 6px; }
.writer-textarea { flex: 1; border: none; outline: none; resize: none; padding: 24px 32px; font-size: 16px; line-height: 1.9; font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; color: #25231f; background: #fff; }
.editor-footer { display: flex; justify-content: space-between; padding: 8px 20px; border-top: 1px solid #e2dbcf; font-size: 12px; color: #8a8276; flex-shrink: 0; }

@media (max-width: 900px) {
  .writer-body { grid-template-columns: 1fr; }
  .writer-novels-panel, .writer-chapters-panel { display: none; }
}

/* ========== 文档库 ========== */
.document-list { padding: 8px 22px 16px; }
.doc-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; cursor: pointer; margin-bottom: 4px; transition: background .15s; }
.doc-item:hover { background: #f0ece3; }
.doc-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: #e4eee7; color: #42604e; font-size: 14px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-info h4 { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-info p { font-size: 12px; color: #8a8276; margin-top: 2px; }
.doc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.doc-empty { padding: 32px; text-align: center; font-size: 14px; color: #8a8276; }

/* 文档弹窗 */
.doc-modal { max-height: 85vh; width: 100%; max-width: 800px; border-radius: 16px; background: #faf8f3; box-shadow: 0 25px 80px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.doc-modal .modal-header { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid #ddd5c8; padding: 14px 20px; }
.doc-title-input { flex: 1; font-size: 17px; font-weight: 600; border: none; outline: none; background: transparent; padding: 6px 10px; border-radius: 8px; }
.doc-title-input:focus { background: #f3efe6; }
.doc-textarea { flex: 1; border: none; outline: none; resize: none; padding: 20px; font-size: 15px; line-height: 1.8; font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; background: #fff; min-height: 400px; }
.doc-modal .modal-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; border-top: 1px solid #ddd5c8; font-size: 12px; color: #8a8276; }

/* ========== 写作台升级 ========== */
.editor-main {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}
.editor-main.split .writer-textarea { width: 50%; border-right: 1px solid #e0d8cc; }
.editor-main.split .writer-preview { display: block !important; width: 50%; }
.editor-main.preview-only .writer-textarea { display: none; }
.editor-main.preview-only .writer-preview { display: block !important; width: 100%; }

.writer-preview {
  overflow-y: auto;
  padding: 20px 28px;
  font-size: 15px;
  line-height: 1.9;
  color: #2c2620;
  background: #faf8f4;
}
.writer-preview h1 { font-size: 1.6em; margin: 0.8em 0 0.4em; border-bottom: 2px solid #d4c9b8; padding-bottom: 0.3em; }
.writer-preview h2 { font-size: 1.35em; margin: 0.7em 0 0.35em; }
.writer-preview h3 { font-size: 1.15em; margin: 0.6em 0 0.3em; }
.writer-preview p { margin: 0.5em 0; text-indent: 2em; }
.writer-preview blockquote { border-left: 3px solid #c9b99a; margin: 0.6em 0; padding: 0.3em 1em; color: #6b5d4d; background: #f3efe8; }
.writer-preview code { background: #f0ebe2; padding: 2px 6px; border-radius: 3px; font-size: 0.9em; }
.writer-preview pre { background: #2c2620; color: #e8e0d4; padding: 14px 18px; border-radius: 6px; overflow-x: auto; }
.writer-preview pre code { background: none; padding: 0; color: inherit; }
.writer-preview ul, .writer-preview ol { padding-left: 2em; margin: 0.4em 0; }
.writer-preview li { margin: 0.2em 0; }
.writer-preview hr { border: none; border-top: 1px solid #d4c9b8; margin: 1em 0; }
.writer-preview strong { color: #1a1612; }
.writer-preview em { color: #4a3f35; }

.mode-toggle {
  display: inline-flex;
  border: 1px solid #d4c9b8;
  border-radius: 6px;
  overflow: hidden;
  margin-right: 6px;
}
.mode-btn {
  border: none;
  background: transparent;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #8a7d6b;
  border-right: 1px solid #d4c9b8;
}
.mode-btn:last-child { border-right: none; }
.mode-btn.active { background: #6b5d4d; color: #fff; }
.mode-btn:hover:not(.active) { background: #f0ebe2; }

.session-words {
  font-size: 11px;
  color: #a89b88;
  margin-left: 12px;
}

/* 章节拖拽 */
.writer-chapter-item.dragging { opacity: 0.4; }
.writer-chapter-item.drag-over { border-top: 2px solid #6b5d4d; }
.writer-chapter-item[draggable="true"] { cursor: grab; }
.writer-chapter-item[draggable="true"]:active { cursor: grabbing; }

/* 大纲面板 */
.writer-notes-panel {
  width: 300px;
  min-width: 300px;
  border-left: 1px solid #e0d8cc;
  background: #faf8f4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notes-tabs {
  display: flex;
  border-bottom: 1px solid #e0d8cc;
  background: #f3efe8;
}
.notes-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 12px;
  cursor: pointer;
  color: #8a7d6b;
  border-bottom: 2px solid transparent;
}
.notes-tab.active { color: #6b5d4d; border-bottom-color: #6b5d4d; font-weight: 600; }
.notes-textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
  font-family: inherit;
  background: transparent;
  color: #2c2620;
}

/* 写作台body支持notes面板 */
.writer-body { display: flex; flex: 1; overflow: hidden; }
.writer-body.notes-open .writer-editor-panel { }
/* ========== 在线阅读器 ========== */
.reader-page { display: flex; flex-direction: column; height: 100vh; background: #faf8f4; }
.reader-topbar {
  display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: #fff; border-bottom: 1px solid #e0d8cc; flex-shrink: 0;
}
.reader-title { flex: 1; font-size: 16px; font-weight: 600; color: #2c2620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-actions { display: flex; gap: 8px; }
.reader-body { flex: 1; display: flex; overflow: hidden; }
.reader-toc {
  width: 260px; min-width: 260px; border-right: 1px solid #e0d8cc; background: #fff;
  display: flex; flex-direction: column; overflow: hidden;
}
.reader-toc.collapsed { display: none; }
.reader-chapter-list { flex: 1; overflow-y: auto; }
.reader-chapter-item {
  padding: 10px 16px; cursor: pointer; font-size: 14px; color: #4a3f35;
  border-bottom: 1px solid #f0ebe2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reader-chapter-item:hover { background: #f5f0e8; }
.reader-chapter-item.active { background: #6b5d4d; color: #fff; }
.reader-content-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.reader-settings {
  display: flex; gap: 20px; padding: 10px 20px; background: #fff; border-bottom: 1px solid #e0d8cc;
  font-size: 13px; align-items: center; flex-shrink: 0;
}
.reader-settings label { display: flex; align-items: center; gap: 8px; color: #6b5d4d; }
.reader-settings.hidden { display: none; }
.reader-text {
  flex: 1; overflow-y: auto; padding: 30px 40px; font-size: 18px; line-height: 2.0;
  color: #2c2620; max-width: 800px; margin: 0 auto; width: 100%;
}
.reader-text.dark { background: #2c2620; color: #d4c9b8; }
.reader-placeholder { text-align: center; color: #a89b88; padding: 60px 0; }
.reader-text h1 { font-size: 1.5em; text-align: center; margin: 0 0 1em; }
.reader-text p { margin: 0.5em 0; text-indent: 2em; }
.reader-nav {
  display: flex; justify-content: space-between; align-items: center; padding: 12px 40px;
  border-top: 1px solid #e0d8cc; background: #fff; flex-shrink: 0;
}
#reader-progress { font-size: 13px; color: #8a7d6b; }

/* 阅读器移动端适配 */
@media (max-width: 768px) {
  .reader-toc { position: fixed; left: 0; top: 0; bottom: 0; z-index: 100; width: 80%; box-shadow: 2px 0 10px rgba(0,0,0,0.1); }
  .reader-text { padding: 20px 18px; font-size: 17px; }
  .reader-nav { padding: 10px 16px; }
  .reader-topbar { padding: 8px 12px; gap: 8px; }
  .reader-title { font-size: 14px; }
}