Files
2026-07-06 20:43:21 +08:00

725 lines
11 KiB
CSS

:root {
color-scheme: light;
--bg: #f4f6f8;
--panel: #ffffff;
--panel-soft: #f8fafc;
--ink: #222426;
--muted: #68707a;
--line: #d8dee6;
--line-soft: #e7edf3;
--accent: #1d6f5f;
--accent-strong: #164d43;
--accent-soft: #e3f0ec;
--warn: #a85f00;
--bad: #a43b31;
--source: #73777f;
--mark: #fff0a6;
--shadow: 0 18px 42px rgba(25, 34, 45, 0.18);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
font-size: 15px;
line-height: 1.65;
}
button,
input,
select,
textarea {
font: inherit;
}
.topbar {
height: 78px;
padding: 10px 18px;
display: grid;
grid-template-columns: minmax(260px, 1fr) auto minmax(320px, 1.15fr);
align-items: center;
gap: 14px;
background: #ffffff;
border-bottom: 1px solid var(--line);
}
.brandBlock {
min-width: 0;
}
h1 {
margin: 0;
font-size: 19px;
font-weight: 700;
}
#sessionMeta {
margin: 2px 0 0;
color: var(--muted);
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.modeTabs {
display: inline-grid;
grid-template-columns: 1fr 1fr;
border: 1px solid var(--line);
border-radius: 8px;
overflow: hidden;
background: #f8fafc;
}
.modeButton {
border: 0;
border-radius: 0;
background: transparent;
min-width: 86px;
}
.modeButton.active {
background: var(--accent);
color: #ffffff;
}
.toolbar {
display: flex;
gap: 8px;
flex-wrap: wrap;
justify-content: flex-end;
}
button {
border: 1px solid var(--line);
background: #ffffff;
color: var(--ink);
min-height: 34px;
padding: 5px 11px;
border-radius: 6px;
cursor: pointer;
}
button:hover {
border-color: var(--accent);
}
button.primary,
#saveBtn,
#quickSaveBtn,
#exportBtn {
background: var(--accent);
border-color: var(--accent);
color: #ffffff;
}
button.primary:hover,
#saveBtn:hover,
#quickSaveBtn:hover,
#exportBtn:hover {
background: var(--accent-strong);
}
.layout {
height: calc(100vh - 78px);
display: grid;
grid-template-columns: 340px minmax(0, 1fr);
min-width: 0;
}
.sidebar {
border-right: 1px solid var(--line);
background: #f9fbfd;
min-height: 0;
display: flex;
flex-direction: column;
}
.searchbox {
padding: 12px;
border-bottom: 1px solid var(--line);
}
.searchbox input {
width: 100%;
min-height: 36px;
border: 1px solid var(--line);
border-radius: 6px;
padding: 6px 10px;
background: #ffffff;
}
.stats {
padding: 8px 12px;
color: var(--muted);
font-size: 12px;
border-bottom: 1px solid var(--line);
}
.toc {
max-height: 42%;
overflow: auto;
border-bottom: 1px solid var(--line);
padding: 8px 0;
}
.tocChapter {
margin: 0 8px 6px;
}
.tocChapterButton,
.tocPartButton {
width: 100%;
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px;
align-items: center;
text-align: left;
border: 0;
border-radius: 6px;
background: transparent;
padding: 7px 8px;
}
.tocChapterButton {
font-weight: 700;
}
.tocPartButton {
padding-left: 18px;
color: var(--muted);
}
.tocChapterButton:hover,
.tocPartButton:hover {
background: #eef3f6;
}
.tocChapterButton.active,
.tocPartButton.active {
background: var(--accent-soft);
color: var(--accent-strong);
}
.tocTitle {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tocCount {
color: var(--muted);
font-weight: 400;
font-size: 12px;
white-space: nowrap;
}
.rowList {
overflow: auto;
min-height: 0;
flex: 1;
}
.rowItem {
width: 100%;
display: block;
text-align: left;
border: 0;
border-bottom: 1px solid #e6e0d6;
border-radius: 0;
background: transparent;
padding: 10px 12px;
}
.rowItem:hover {
background: #eef3f6;
}
.rowItem.active {
background: var(--accent-soft);
border-left: 4px solid var(--accent);
padding-left: 8px;
}
.rowItem.touched .rowBadge {
background: #e9f5ee;
color: var(--accent-strong);
}
.rowItem.marked .rowBadge {
background: #fff0d5;
color: var(--warn);
}
.rowMeta {
display: flex;
align-items: center;
gap: 8px;
color: var(--muted);
font-size: 12px;
margin-bottom: 4px;
}
.rowBadge {
display: inline-flex;
align-items: center;
min-height: 20px;
padding: 0 6px;
border-radius: 999px;
background: #e8edf2;
}
.rowPreview {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.readerPane,
.editorPane {
min-width: 0;
min-height: 0;
overflow: auto;
}
.readerPane {
padding: 0;
background: #f4f6f8;
}
.readerHeader {
position: sticky;
top: 0;
z-index: 5;
display: flex;
justify-content: space-between;
gap: 16px;
align-items: center;
padding: 16px 28px;
background: rgba(255, 255, 255, 0.96);
border-bottom: 1px solid var(--line);
}
.chapterKicker {
color: var(--muted);
font-size: 12px;
margin-bottom: 2px;
}
#readerTitle {
margin: 0;
font-size: 20px;
line-height: 1.35;
}
.readerTools {
display: flex;
gap: 8px;
flex-shrink: 0;
}
.readingFlow {
max-width: 920px;
margin: 0 auto;
padding: 24px 38px 90px;
background: #ffffff;
min-height: calc(100vh - 156px);
border-left: 1px solid #e7edf3;
border-right: 1px solid #e7edf3;
}
.readBlock {
position: relative;
padding: 10px 0 14px;
border-bottom: 1px solid #e7edf3;
}
.partDivider {
margin: 26px 0 14px;
padding: 12px 0 8px;
border-bottom: 2px solid var(--line);
color: var(--accent-strong);
font-size: 17px;
}
.readBlock:hover {
background: linear-gradient(90deg, rgba(29, 111, 95, 0.06), transparent 38%);
}
.readBlock.active {
box-shadow: inset 4px 0 0 var(--accent);
padding-left: 12px;
}
.readBlock.marked {
box-shadow: inset 4px 0 0 var(--warn);
padding-left: 12px;
}
.readSource {
color: var(--source);
font-size: 13px;
line-height: 1.75;
margin-bottom: 5px;
}
.readCn {
color: var(--ink);
font-size: 17px;
line-height: 1.9;
letter-spacing: 0;
}
.readCn mark,
.readCn .review-mark,
.cnEditor mark,
.cnEditor .review-mark {
background: var(--mark);
color: inherit;
}
.readMeta {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
margin-top: 6px;
color: var(--muted);
font-size: 12px;
opacity: 0;
transition: opacity 0.15s ease;
}
.readBlock:hover .readMeta,
.readBlock.active .readMeta,
.readBlock.touched .readMeta,
.readBlock.marked .readMeta {
opacity: 1;
}
.readStatus {
color: var(--warn);
}
.miniButton {
min-height: 26px;
padding: 2px 8px;
font-size: 12px;
border-radius: 5px;
}
.editorPane {
padding: 18px;
}
.emptyState {
height: 100%;
min-height: 240px;
display: grid;
place-items: center;
color: var(--muted);
}
.editorCard {
max-width: 1040px;
margin: 0 auto;
}
.rowHeader {
display: flex;
justify-content: space-between;
gap: 18px;
align-items: flex-start;
margin-bottom: 14px;
}
.rowId {
font-weight: 700;
font-size: 18px;
}
.rowPath {
color: var(--muted);
font-size: 12px;
word-break: break-all;
}
.markToggle {
white-space: nowrap;
display: flex;
align-items: center;
gap: 8px;
color: var(--warn);
font-weight: 600;
}
.pair,
.reviewFields,
.notes,
.actions {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
padding: 14px;
margin-bottom: 12px;
}
.pair h2,
.sectionTitle h2 {
margin: 0 0 8px;
font-size: 15px;
}
.sourceText,
.quickSource {
color: var(--source);
white-space: pre-wrap;
background: #f8fafc;
border: 1px solid #e3e9f0;
border-radius: 6px;
padding: 12px;
}
.sectionTitle {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
margin-bottom: 8px;
}
.inlineTools {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
}
.cnEditor {
min-height: 160px;
background: #ffffff;
border: 1px solid var(--line);
border-radius: 6px;
padding: 12px;
outline: none;
white-space: pre-wrap;
}
.cnEditor:focus {
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(29, 111, 95, 0.12);
}
.reviewFields {
display: grid;
grid-template-columns: 1fr 1fr 2fr;
gap: 12px;
}
label {
display: flex;
flex-direction: column;
gap: 5px;
font-weight: 600;
}
label input,
label select,
label textarea {
font-weight: 400;
}
input,
select,
textarea {
border: 1px solid var(--line);
border-radius: 6px;
background: #ffffff;
padding: 7px 9px;
color: var(--ink);
}
textarea {
resize: vertical;
}
.notes {
display: grid;
grid-template-columns: 1fr;
gap: 12px;
}
.actions {
display: flex;
justify-content: center;
gap: 10px;
}
.quickEditor {
position: fixed;
top: 92px;
right: 18px;
bottom: 18px;
width: min(520px, calc(100vw - 36px));
z-index: 20;
display: flex;
flex-direction: column;
gap: 10px;
overflow: auto;
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
box-shadow: var(--shadow);
padding: 14px;
}
.quickHeader {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
border-bottom: 1px solid var(--line-soft);
padding-bottom: 10px;
}
.quickSourceWrap {
border: 1px solid #e3e9f0;
border-radius: 6px;
background: #f8fafc;
}
.quickSourceWrap summary {
cursor: pointer;
padding: 8px 12px;
color: var(--source);
font-weight: 700;
border-bottom: 1px solid #e3e9f0;
}
.quickSource {
max-height: none;
overflow: visible;
font-size: 13px;
border: 0;
border-radius: 0;
background: transparent;
}
.quickField {
display: flex;
flex-direction: column;
gap: 5px;
}
.quickCnEditor {
min-height: 150px;
max-height: 260px;
overflow: auto;
}
.quickControls {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 8px;
align-items: center;
}
.quickActions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 2px;
}
.toast {
position: fixed;
right: 16px;
bottom: 16px;
max-width: min(560px, calc(100vw - 32px));
padding: 12px 14px;
background: #1f2933;
color: #ffffff;
border-radius: 8px;
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
z-index: 30;
white-space: pre-wrap;
}
[hidden] {
display: none !important;
}
@media (min-width: 1180px) {
body.quickOpen .readingFlow {
margin-left: max(40px, calc((100% - 1320px) / 2));
margin-right: 560px;
max-width: 840px;
}
}
@media (max-width: 1040px) {
.topbar {
height: auto;
grid-template-columns: 1fr;
align-items: stretch;
}
#sessionMeta {
white-space: normal;
}
.toolbar {
justify-content: flex-start;
}
.layout {
height: auto;
min-height: calc(100vh - 78px);
grid-template-columns: 1fr;
}
.sidebar {
max-height: 48vh;
border-right: 0;
border-bottom: 1px solid var(--line);
}
.toc {
max-height: 24vh;
}
.readerPane,
.editorPane {
min-height: 70vh;
}
.readingFlow {
border: 0;
padding: 18px 18px 80px;
}
.readerHeader {
padding: 12px 16px;
}
.reviewFields,
.quickControls {
grid-template-columns: 1fr;
}
.quickEditor {
top: auto;
left: 10px;
right: 10px;
bottom: 10px;
width: auto;
max-height: 72vh;
}
}