:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --ink: #1d2433;
  --muted: #627085;
  --line: #d6dbe4;
  --panel: #ffffff;
  --accent: #1f7a6b;
  --accent-2: #be5a38;
  --code: #15202b;
  --pdf-preview-height: 1fr;
  --tools-tabs-height: auto;
  --pdf-translate-width: 50%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

button, select, input {
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 0 10px;
}

button {
  cursor: pointer;
  position: relative;
  transition: transform 80ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

button:active,
button.btn-pressed {
  transform: translateY(1px) scale(0.98);
  box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.18);
}

button.btn-working {
  border-color: var(--accent);
  color: var(--accent);
  background: #eef7f4;
  box-shadow: 0 0 0 3px rgba(31, 122, 107, 0.14);
}

button.btn-working::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: button-spin 700ms linear infinite;
}

button.btn-done {
  border-color: #2f9e44;
  color: #1b7f35;
  background: #eefaf1;
  box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.14);
}

button.btn-done::after {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 900;
}

button.btn-error {
  border-color: #d9480f;
  color: #b03a08;
  background: #fff4ed;
  box-shadow: 0 0 0 3px rgba(217, 72, 15, 0.14);
}

@keyframes button-spin {
  to { transform: rotate(360deg); }
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button.active {
  background: #eef7f4;
  border-color: var(--accent);
  color: var(--accent);
}

.account-entry-btn {
  font-weight: 800;
  border-color: var(--accent);
  color: var(--accent);
  background: #eef7f4;
}

.account-entry-btn::before {
  content: "👤 ";
}

body.auth-locked .workspace-toolbar,
body.auth-locked .shell,
body.auth-locked .topbar nav button:not(#accountBtn),
body.auth-locked .topbar nav input {
  display: none !important;
}

body.auth-locked {
  min-height: 100vh;
  background: #f3f6fb;
}

body.auth-locked .topbar {
  justify-content: space-between;
}

body.auth-locked #accountModal,
body.auth-locked #accountModal[hidden] {
  display: flex;
}

body.auth-locked .account-card {
  max-width: min(920px, calc(100vw - 28px));
}

.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.workspace-toolbar {
  display: grid;
  grid-template-rows: auto auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand {
  font-size: 20px;
  font-weight: 750;
  color: var(--accent);
}

.topbar nav {
  display: flex;
  gap: 8px;
}

.topbar #newProjectBtn,
.topbar #newProjectFolderBtn,
.topbar #deleteProjectBtn,
.topbar #archiveProjectBtn,
.topbar #restoreProjectBtn,
.topbar #purgeProjectBtn {
  display: none;
}

.status {
  margin-left: auto;
  color: var(--muted);
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.language-switch select {
  width: 92px;
  height: 30px;
  padding: 0 8px;
}

.language-switch + .status {
  margin-left: 0;
}

.shell {
  display: grid;
  grid-template-columns: var(--left-width, 20%) 6px minmax(0, 1fr) 6px var(--right-width, 34%);
  height: calc(100vh - 106px);
  overflow: hidden;
}

.shell.project-manager-mode {
  grid-template-columns: 180px minmax(0, 1fr);
}

.shell.project-manager-mode #leftSplitter,
.shell.project-manager-mode #rightSplitter,
.shell.project-manager-mode .tools {
  display: none;
}

.shell.project-manager-mode .project-filter,
.shell.project-manager-mode #projects {
  display: none;
}

.sidebar, .tools, .editor-pane {
  min-width: 0;
  min-height: 0;
}

.splitter {
  cursor: col-resize;
  background: #e5e9ef;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  touch-action: none;
  z-index: 5;
  position: relative;
  overflow: visible;
  transition: background-color 120ms ease;
}

.splitter::before {
  content: "";
  position: absolute;
  inset: 0 -5px;
}

.splitter:hover,
.splitter.dragging {
  background: var(--accent);
}

body.resizing {
  cursor: col-resize;
  user-select: none;
}

body.resizing iframe,
body.resizing textarea {
  pointer-events: none;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #f5f7fb;
  overflow: auto;
  padding: 12px;
}

.tools {
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  color: #2d3748;
  margin: 8px 0 10px;
}

.list {
  display: grid;
  gap: 2px;
}

.project-create {
  margin-bottom: 10px;
}

.project-create-btn {
  width: 100%;
  height: 32px;
  border-radius: 16px;
  color: #fff;
  background: #465b86;
  border-color: #465b86;
  font-weight: 700;
}

.project-create-btn:hover {
  background: #3e5278;
  border-color: #3e5278;
}

.project-tabs {
  display: grid;
  gap: 3px;
  margin-bottom: 8px;
}

.project-tabs button.active {
  background: #d4dae4;
  border-color: #d4dae4;
  color: #172033;
  font-weight: 700;
}

.project-tabs button {
  width: 100%;
  height: 30px;
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  background: transparent;
  color: #172033;
}

.project-secondary {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e3e8ef;
}

.project-secondary button {
  width: 100%;
  height: 28px;
  text-align: left;
  border-color: transparent;
  background: transparent;
  color: #4b5563;
  font-size: 12px;
}

.project-secondary button.active {
  color: #172033;
  background: #d4dae4;
  border-color: #d4dae4;
  font-weight: 700;
}

.project-menu {
  display: flex;
  gap: 4px;
  margin: 10px 0 8px;
}

.project-menu button {
  width: 100%;
  height: 28px;
  border-color: transparent;
  background: transparent;
  color: #465b86;
  text-align: left;
  font-size: 12px;
}

.project-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 4px;
  margin: 0 0 10px;
}

.project-filter input,
.project-filter select {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid #d9e2ec;
  border-radius: 4px;
  background: #fff;
  color: #172033;
  font-size: 11px;
  padding: 0 7px;
}

.project-current-title {
  height: 28px;
  display: flex;
  align-items: center;
  color: #172033;
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
}

.project-folder {
  position: relative;
  margin: 1px 0;
  min-height: 44px;
  padding: 8px 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.project-back {
  height: 30px;
  margin: 0 0 8px;
  border-color: transparent;
  background: transparent;
  color: #465b86;
  text-align: left;
  font-weight: 700;
}

.project-row-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a95a3;
  font-size: 10px;
  font-weight: 500;
}

.project-folder::before,
.project-item::before,
.file-node::before {
  content: "";
  position: absolute;
  left: calc(9px + (var(--depth, 0) - 1) * 16px);
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: rgba(15, 118, 110, calc(var(--tree-line, 0) * 0.22));
  pointer-events: none;
}

.project-folder::after,
.project-item::after,
.file-node::after {
  content: "";
  position: absolute;
  left: calc(9px + (var(--depth, 0) - 1) * 16px);
  top: 50%;
  width: 11px;
  height: 1px;
  background: rgba(15, 118, 110, calc(var(--tree-line, 0) * 0.28));
  pointer-events: none;
}

.project-folder.active {
  color: var(--accent);
  background: #eef5f3;
  border-color: #c9dfda;
  border-left-color: var(--accent);
}

.project-folder.dragging {
  opacity: 0.55;
}

.project-folder.drop-target,
.project-tabs button.drop-target {
  background: #e7f0ff;
  border-color: #8fb4ef;
  outline: 2px solid rgba(70, 91, 134, 0.25);
}

.project-item {
  position: relative;
  text-align: left;
  background: #fff;
  border-color: #e4e9f0;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.project-tree-arrow {
  width: 10px;
  color: #64748b;
  font-size: 10px;
  line-height: 1;
  flex: 0 0 auto;
}

.project-tree-mark {
  position: relative;
  width: 13px;
  height: 10px;
  border-radius: 2px;
  background: #d9ebe8;
  border: 1px solid #8aa7a2;
  flex: 0 0 auto;
}

.project-tree-mark::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -4px;
  width: 6px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: #d9ebe8;
  border: 1px solid #8aa7a2;
  border-bottom: 0;
}

.project-item-dot {
  width: 12px;
  height: 14px;
  border: 1px solid #a8b5c2;
  border-radius: 2px;
  background: #fff;
  flex: 0 0 auto;
}

.project-row-more {
  margin-left: auto;
  color: #9aa5b1;
  font-size: 13px;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.project-row-more:hover {
  color: #172033;
  background: #eef5f3;
  border-color: #c9dfda;
}

.project-tree-body {
  display: grid;
  min-width: 0;
  gap: 1px;
  flex: 1 1 auto;
}

.project-tree-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-tree-path {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a95a3;
  font-size: 10px;
  font-weight: 500;
}

.empty-note {
  color: var(--muted);
  font-size: 12px;
  padding: 8px;
}

.hidden {
  display: none !important;
}

.item {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 8px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item.project-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px;
  min-width: 0;
  margin: 3px 0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.project-files-tree {
  display: grid;
  gap: 1px;
  margin: 0 0 7px 18px;
  padding: 3px 0 5px 8px;
  border-left: 1px solid #d9e2ec;
}

.item:hover, .item.active {
  background: #eef5f3;
  border-color: #c9dfda;
}

.file-node {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  height: 30px;
  padding: 0 8px 0 calc(10px + var(--depth, 0) * 16px);
  text-align: left;
  background: transparent;
}

.file-node::before {
  left: calc(9px + (var(--depth, 0) - 1) * 16px);
}

.file-node::after {
  left: calc(9px + (var(--depth, 0) - 1) * 16px);
}

.file-node.dir {
  font-weight: 650;
  color: var(--ink);
  background: #fbfcfd;
}

.file-node.file {
  color: #2d3748;
}

.file-icon {
  color: var(--muted);
  text-align: center;
}

.file-node.dir .file-icon {
  color: var(--accent);
}

.file-node.file .file-icon {
  color: #64748b;
}

.file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-menu {
  position: fixed;
  z-index: 1000;
  display: grid;
  gap: 3px;
  width: 154px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.context-menu[hidden] {
  display: none;
}

.context-menu button {
  height: 30px;
  border-color: transparent;
  background: transparent;
  text-align: left;
  border-radius: 5px;
}

.project-context-menu {
  width: 168px;
}

.context-menu button:hover {
  background: #eef5f3;
  border-color: #c9dfda;
}

.context-menu button.danger {
  color: #a33b2b;
}

.context-menu button.danger:hover {
  background: #fff0ed;
  border-color: #efc4bc;
}

.modal[hidden] {
  display: none;
}

body.auth-locked #accountModal[hidden] {
  display: flex;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.modal-card {
  width: min(1040px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 18px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
}

.account-status-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #cfe2d8;
  border-radius: 6px;
  background: #f1faf6;
  margin-bottom: 14px;
}

.account-status-box span {
  color: var(--muted);
}

.account-message {
  margin: -4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #c7d2e2;
  border-radius: 6px;
  background: #f8fbff;
  color: #26364d;
  font-weight: 700;
}

.account-message-success {
  border-color: #b6dfc5;
  background: #f2fff6;
  color: #176834;
}

.account-message-error {
  border-color: #efc4bc;
  background: #fff5f3;
  color: #9a341f;
}

.account-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 14px;
}

.account-section {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #fbfcfe;
}

.account-section h3 {
  margin: 0 0 4px;
}

.account-actions,
.manual-pay {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-forms {
  display: grid;
  gap: 12px;
}

.auth-forms[hidden],
.password-change-box[hidden] {
  display: none !important;
}

.auth-form-block {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.auth-form-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.password-change-box {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

#registerBtn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 800;
}

.plan-list,
.order-list {
  display: grid;
  gap: 8px;
}

.plan-card,
.order-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.plan-price {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.payment-info {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px dashed #b8c7d9;
  border-radius: 6px;
  background: #f8fbff;
}

.payment-info span {
  white-space: pre-wrap;
}

.payment-page {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d8e5f2;
  border-radius: 6px;
  background: #f8fbff;
}

.payment-page-head {
  display: grid;
  gap: 3px;
}

.payment-page-head span {
  color: var(--muted);
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-method {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d7dee9;
  border-radius: 6px;
  background: #fff;
}

.payment-method-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.payment-method-head span {
  color: var(--accent);
  font-weight: 800;
}

.payment-qr {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed #b8c7d9;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}

.payment-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-qr-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 10px;
  color: var(--muted);
  text-align: center;
  background: #f4f7fb;
}

.payment-meta {
  display: grid;
  gap: 3px;
}

.payment-meta b {
  user-select: all;
}

.pdf-side-tabs,
#pdfThumbs,
#pdfSideSplitter {
  display: none !important;
}

#preview.side-on #pdfViewerShell,
#pdfViewerShell {
  grid-template-columns: minmax(4px, 1fr) 7px var(--pdf-translate-width, 50%) !important;
}

#preview.translation-off #pdfViewerShell {
  grid-template-columns: minmax(4px, 1fr) !important;
}

#preview.translation-off #pdfTranslateSplitter,
#preview.translation-off .pdf-doc-chinese {
  display: none !important;
}

.order-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e9eef6;
  color: #42526e;
  font-size: 12px;
  font-weight: 700;
}

.order-paid {
  border-color: #b6dfc5;
  background: #f6fff9;
}

.order-paid .order-badge {
  background: #d9f5e2;
  color: #146c2e;
}

.order-pending .order-badge {
  background: #fff1bf;
  color: #7c5b00;
}

.order-cancelled,
.order-expired {
  opacity: 0.72;
}

.plan-card small,
.order-row small,
.account-section small {
  color: var(--muted);
}

.folder-picker-dialog {
  width: min(520px, calc(100vw - 28px));
  border: 1px solid #d6dbe4;
  border-radius: 8px;
  padding: 0;
  color: #172033;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
}

.folder-picker-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.folder-picker-dialog form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.folder-picker-dialog h2 {
  margin: 0;
  font-size: 17px;
}

.folder-picker-project {
  margin: 0;
  color: #627085;
  font-size: 12px;
}

.folder-picker-list {
  max-height: 300px;
  overflow: auto;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid #e1e7ef;
  border-radius: 6px;
  background: #f8fafc;
}

.folder-picker-row {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #172033;
  text-align: left;
}

.folder-picker-row:hover,
.folder-picker-row.active {
  background: #eef5f3;
  border-color: #c9dfda;
}

.folder-picker-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-picker-row small {
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a95a3;
  font-size: 10px;
}

.folder-picker-input {
  display: grid;
  gap: 5px;
  color: #627085;
  font-size: 12px;
}

.folder-picker-input input {
  width: 100%;
}

.folder-picker-dialog menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
}

.editor-pane {
  display: grid;
  grid-template-rows: auto 1fr auto auto auto auto;
  background: var(--panel);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.editor-pane.manager-mode {
  display: block;
  overflow: auto;
  background: #f5f6f8;
}

.editor-pane.manager-mode > :not(.project-manager) {
  display: none !important;
}

.project-manager {
  min-height: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 22px 24px 40px;
}

.manager-notice {
  border: 1px solid #dce3ee;
  border-radius: 4px;
  background: #f8fbff;
  color: #465b86;
  font-size: 12px;
  padding: 8px 12px;
  margin-bottom: 22px;
}

.manager-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.manager-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #172033;
}

.manager-back {
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #465b86;
  font-weight: 700;
}

.manager-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 82px;
  gap: 6px;
  width: min(420px, 48vw);
}

.manager-actions input,
.manager-actions select {
  height: 30px;
  border-radius: 4px;
  font-size: 12px;
}

.manager-rows {
  display: grid;
  gap: 10px;
}

.manager-row {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #dde3ec;
  border-radius: 4px;
  background: #fff;
  color: #172033;
  text-align: left;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.manager-row:hover,
.manager-row.active {
  border-color: #c8d2df;
  background: #fbfcfe;
}

.manager-row.drop-target {
  border-color: var(--accent);
  background: #eef7f4;
}

.manager-row-icon {
  color: #465b86;
  font-size: 15px;
}

.manager-row-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.manager-row-title,
.manager-row-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-row-title {
  font-size: 13px;
  font-weight: 650;
}

.manager-row-meta {
  color: #8a95a3;
  font-size: 11px;
}

.manager-row-menu {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #9aa5b1;
}

.manager-row-menu:hover {
  background: #eef5f3;
  color: #172033;
}

.manager-empty {
  padding: 28px;
  border: 1px dashed #cfd7e3;
  border-radius: 4px;
  text-align: center;
  color: #8a95a3;
  background: #fff;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #fff;
  overflow: visible;
  z-index: 15;
}

.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input {
  flex: 0 0 auto;
}

.latex-toolbar,
.word-toolbar {
  display: flex;
  gap: 6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: #f7f9fb;
}

.latex-toolbar {
  overflow-x: auto;
}

.word-toolbar {
  flex-wrap: wrap;
  overflow: visible;
  align-content: flex-start;
  max-height: 116px;
  overflow-y: auto;
}

.latex-toolbar button,
.word-toolbar button {
  min-width: 36px;
  white-space: nowrap;
}

.word-toolbar .word-insert-select {
  width: 168px;
  height: 32px;
  min-width: 148px;
  padding: 0 8px;
  border-radius: 5px;
  background: #fff;
  white-space: nowrap;
}

#mainFile {
  width: 140px;
  max-width: 42vw;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  padding: 5px 8px;
}

.tab {
  height: 28px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #edf0f4;
  white-space: nowrap;
}

.tab.active {
  background: var(--code);
  color: white;
}

.editor-wrap {
  display: grid;
  grid-template-columns: minmax(4px, var(--word-editor-width, 45%)) 7px minmax(4px, 1fr);
  min-height: 0;
  background: var(--line);
}

.editor-inner-splitter {
  cursor: col-resize;
  background: #d6dde7;
  border-left: 1px solid #b5bfcb;
  border-right: 1px solid #b5bfcb;
  touch-action: none;
  position: relative;
  z-index: 4;
}

.editor-inner-splitter::before {
  content: "";
  position: absolute;
  inset: 0 -5px;
}

.editor-inner-splitter:hover,
.editor-inner-splitter.dragging {
  background: var(--accent);
}

.word-editor-pane,
.latex-editor-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  background: #fff;
}

.word-editor-head,
.latex-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12px;
}

.word-editor-head strong,
.latex-editor-head strong {
  color: var(--ink);
  font-size: 13px;
}

.word-editor {
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 32px;
  outline: none;
  background: #ffffff;
  color: #16212f;
  font: 15px/1.75 "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  white-space: pre-wrap;
}

.word-editor:empty::before {
  content: "在这里输入原稿，内容会同步保存为 LaTeX 源码。";
  color: #98a2b3;
}

.word-editor h1,
.word-editor h2,
.word-editor h3 {
  margin: 18px 0 10px;
  color: #101828;
  line-height: 1.35;
}

.word-editor h1 {
  font-size: 22px;
  text-align: center;
}

.word-editor h2 {
  font-size: 18px;
}

.word-editor h3 {
  font-size: 16px;
}

.word-editor p {
  margin: 0 0 12px;
}

.word-editor ul,
.word-editor ol {
  margin: 0 0 12px 24px;
  padding: 0;
}

.word-editor blockquote {
  margin: 10px 0 12px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: #f6faf8;
}

.word-editor table {
  width: 100%;
  margin: 10px 0 14px;
  border-collapse: collapse;
}

.word-editor figure {
  margin: 12px 0 16px;
  text-align: center;
}

.word-editor figure img {
  max-width: 92%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid #d0d7de;
  background: #fff;
}

.word-editor figcaption {
  margin-top: 6px;
  color: #475467;
  font-size: 12px;
}

.word-file-preview,
.word-formula-card {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}

.word-formula-card {
  display: grid;
  gap: 6px;
}

.word-formula-card code {
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
  color: #0f172a;
}

.word-editor td,
.word-editor th {
  min-width: 48px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
}

.word-editor hr {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid #94a3b8;
}

.latex-editor-body {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 0;
  background: #fff;
}

#lineNumbers {
  margin: 0;
  padding: 16px 8px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #f7f9fb;
  color: #8a95a3;
  text-align: right;
  user-select: none;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

#editor {
  width: 100%;
  height: 100%;
  min-height: 0;
  resize: none;
  border: 0;
  outline: none;
  padding: 16px;
  background: #ffffff;
  color: #15202b;
  font: 14px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

@media (max-width: 900px) {
  .editor-wrap {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 0.45fr) minmax(240px, 0.55fr);
  }

  .editor-inner-splitter {
    display: none;
  }
}

.editor-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #fbfcfd;
  font-size: 12px;
}

.text-hints {
  position: fixed;
  display: grid;
  gap: 6px;
  width: min(420px, calc(100vw - 24px));
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(19, 31, 44, 0.16);
  z-index: 20;
}

.text-hints[hidden] {
  display: none;
}

.text-hints button {
  display: grid;
  gap: 2px;
  height: auto;
  min-height: 46px;
  text-align: left;
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.text-hints button.active,
.text-hints button:hover {
  border-color: var(--accent);
  background: #eef7f4;
}

.automation-status {
  padding: 5px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #f7f9fb;
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

.text-hints strong,
.text-template strong {
  font-weight: 750;
}

.text-hints span,
.text-template span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

#searchResults {
  grid-column: 1 / -1;
  max-height: 90px;
  overflow: auto;
  color: var(--muted);
}

.tools {
  display: grid;
  grid-template-rows: auto minmax(4px, 1fr);
  border-left: 1px solid var(--line);
  background: #fff;
}

.tool-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.tool-tabs button,
.tool-tabs select {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.tool-tabs select {
  min-width: 92px;
  background: #f8fafc;
}

.tools-panel-splitter {
  display: none;
  cursor: row-resize;
  background: #e5e9ef;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  touch-action: none;
}

.tools-panel-splitter:hover,
.tools-panel-splitter.dragging {
  background: var(--accent);
}

.tool-tabs button.active {
  color: #fff;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.tool-tabs select.active {
  color: #fff;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.panel {
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.panel.active {
  display: block;
}

#preview.active {
  display: grid;
  grid-template-rows: 39px 7px minmax(4px, var(--pdf-preview-height, 1fr));
  padding: 0;
}

.pdf-inner-splitter {
  cursor: row-resize;
  background: #e5e9ef;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  touch-action: none;
}

.pdf-inner-splitter:hover,
.pdf-inner-splitter.dragging {
  background: var(--accent);
}

#pdfViewerShell {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(4px, 1fr) 7px var(--pdf-translate-width, 50%);
  background: #e6e9ee;
}

#preview.side-on #pdfViewerShell {
  grid-template-columns: var(--pdf-side-width, 140px) 7px minmax(4px, 1fr) 7px var(--pdf-translate-width, 50%);
}

#pdfThumbs {
  display: none;
  min-width: 0;
  overflow: auto;
  padding: 8px;
  background: #26313d;
  border-right: 1px solid #111827;
}

#preview.side-on #pdfThumbs {
  display: block;
}

.pdf-side-splitter {
  display: none;
  cursor: col-resize;
  background: #d6dde7;
  border-left: 1px solid #111827;
  border-right: 1px solid #b5bfcb;
  touch-action: none;
  position: relative;
  z-index: 5;
  overflow: visible;
  transition: background-color 120ms ease;
}

.pdf-side-splitter::before {
  content: "";
  position: absolute;
  inset: 0 -5px;
}

#preview.side-on .pdf-side-splitter {
  display: block;
}

.pdf-side-splitter:hover,
.pdf-side-splitter.dragging {
  background: var(--accent);
}

.pdf-translate-splitter {
  cursor: col-resize;
  background: #d6dde7;
  border-left: 1px solid #b5bfcb;
  border-right: 1px solid #b5bfcb;
  touch-action: none;
  position: relative;
  z-index: 5;
  overflow: visible;
  transition: background-color 120ms ease;
}

.pdf-translate-splitter::before {
  content: "";
  position: absolute;
  inset: 0 -5px;
}

.pdf-translate-splitter:hover,
.pdf-translate-splitter.dragging {
  background: var(--accent);
}

.pdf-doc-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr);
  background: #f7f8fa;
  overflow: hidden;
}

.pdf-doc-title {
  display: flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-bottom: 1px solid #d8dee8;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 750;
}

.pdf-thumb {
  width: 100%;
  height: max-content !important;
  min-height: max-content;
  padding: 6px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #e8eef7;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  white-space: normal;
  appearance: none;
  overflow: visible;
}

.pdf-thumb:hover,
.pdf-thumb.active {
  background: #344355;
  border-color: #6aa7ff;
}

.pdf-thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: white;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.pdf-thumb span,
.pdf-thumb-message {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  text-align: center;
  color: #d7e3f0;
}

.pdf-outline-row {
  display: block;
  width: 100%;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #e8eef7;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.35;
}

.pdf-outline-row:hover {
  background: #344355;
  border-color: #6aa7ff;
}

.pdf-outline-row.level-chapter { font-weight: 700; }
.pdf-outline-row.level-section { padding-left: 14px; }
.pdf-outline-row.level-subsection { padding-left: 24px; font-size: 11px; }
.pdf-outline-row.level-subsubsection { padding-left: 32px; font-size: 11px; color: #c8d6e8; }

#pdfFrame,
#pdfChineseFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #e6e9ee;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  color: #e8f0ff;
  background: #10151d;
  padding: 12px;
  border-radius: 6px;
}

#symbolsGrid, #snippetList, #outlineList, #reviewList, #commonTextList, #bibList, #assetList, #diagnosticList {
  display: grid;
  gap: 8px;
}

#templateList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.paper-assistant-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.paper-assistant-actions button {
  height: auto;
  min-height: 38px;
  white-space: normal;
}

#paperAssistantOutput {
  min-height: 360px;
  max-height: none;
  overflow: auto;
  color: #e8f0ff;
  background: #10151d;
}

.symbol, .snippet, .outline-row, .review, .text-template, .template-item, .bib-item, .asset-item, .diagnostic-item, .log-hit {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.text-template, .template-item, .bib-item, .asset-item {
  height: auto;
  min-height: 54px;
  text-align: left;
}

.template-item,
.bib-item {
  display: grid;
  gap: 4px;
}

.asset-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: center;
}

.asset-item.focused,
.item.asset-file.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(34, 115, 195, 0.14);
}

.asset-item img {
  width: 72px;
  height: 54px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #f7f9fb;
}

.asset-item .asset-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.asset-item .asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-item span,
.bib-item span {
  color: var(--muted);
  white-space: normal;
}

.template-item small,
.bib-item small {
  color: var(--accent);
}

#hintFilter {
  width: 100%;
  margin-bottom: 10px;
}

.template-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 112px;
  gap: 8px;
  margin-bottom: 10px;
}

.template-toolbar input,
.template-toolbar select {
  width: 100%;
}

.template-item {
  display: grid;
  grid-template-rows: 148px auto auto auto;
  gap: 6px;
  align-content: start;
  min-height: 246px;
  text-align: left;
  cursor: pointer;
}

.template-item:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(30, 64, 112, 0.12);
}

.template-preview {
  display: grid;
  place-items: center;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
}

.template-paper {
  width: 84px;
  height: 126px;
  background: #fff;
  border: 1px solid #d8dde6;
  box-shadow: 0 3px 10px rgba(36, 48, 70, 0.14);
  padding: 16px 10px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.template-paper span {
  display: block;
  height: 5px;
  background: #d9e1ec;
  border-radius: 2px;
}

.template-paper span:first-child {
  width: 72%;
  height: 8px;
  margin: 0 auto 8px;
  background: #263b5e;
}

.template-paper span:nth-child(2) { width: 88%; }
.template-paper span:nth-child(3) { width: 100%; }
.template-paper span:nth-child(4) { width: 76%; }

.template-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
}

.template-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.template-picker-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(860px, calc(100vw - 36px));
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 64px rgba(15, 23, 42, 0.24);
}

.template-picker-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.template-picker-head h2 {
  margin: 0;
  font-size: 18px;
}

.template-picker-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.template-picker-close {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.template-picker-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.template-picker-search {
  width: 100%;
}

.template-picker-count {
  color: var(--muted);
  white-space: nowrap;
}

.template-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 18px;
}

.template-picker-item {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 12px;
  text-align: left;
  white-space: normal;
  border: 1px solid #dce3ed;
  border-radius: 7px;
  background: #fff;
}

.template-picker-item:hover,
.template-picker-item:focus {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(15, 85, 74, 0.12);
}

.template-picker-item strong {
  font-size: 14px;
}

.template-picker-item span {
  color: #475569;
  line-height: 1.45;
}

.template-picker-item small {
  color: var(--accent);
}

.template-picker-empty {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.panel-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.pdf-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  scrollbar-width: thin;
  height: 39px;
  max-height: 39px;
  align-self: start;
}

.pdf-side-tabs,
.pdf-tool-buttons {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
}

.pdf-side-tabs {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  background: #f6f8fb;
}

.pdf-actions button {
  flex: 0 0 auto;
  height: 24px;
  min-width: 0;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 22px;
  white-space: nowrap;
}

.pdf-side-tabs button {
  border-color: transparent;
  background: transparent;
}

.pdf-side-tabs button.active,
.pdf-tool-buttons button:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

#historyList {
  width: 100%;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 10px;
}

#historyPreview {
  max-height: 260px;
  overflow: auto;
}

.log-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.log-hit {
  height: auto;
  min-height: 34px;
  text-align: left;
  color: #8a2f1b;
  background: #fff7f4;
  border-color: #f0c8bd;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.stat-box {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.stat-box strong {
  display: block;
  font-size: 20px;
  color: var(--accent);
}

.shortcut-list {
  display: grid;
  gap: 8px;
}

.shortcut-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.diagnostic-item {
  display: grid;
  gap: 4px;
  height: auto;
  text-align: left;
}

.diagnostic-item.error {
  border-color: #e3a194;
  background: #fff7f4;
}

.diagnostic-item.warn {
  border-color: #e7c06a;
  background: #fffaf0;
}

.diagnostic-item.info {
  border-color: #b9cfeb;
  background: #f6faff;
}

.diagnostic-item small {
  color: var(--muted);
}

.symbol {
  display: inline-flex;
  width: 72px;
  height: 44px;
  margin: 4px;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, Consolas, monospace;
}

#formulaInput, #reviewNote {
  width: 100%;
  margin-bottom: 8px;
}

.settings-grid {
  display: grid;
  gap: 12px;
}

.settings-grid label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
}

.settings-grid select,
.settings-grid input[type="number"] {
  width: 100%;
}

.settings-grid .check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-template-columns: none;
  height: 34px;
  color: var(--ink);
}

.settings-grid input[type="checkbox"] {
  width: 18px;
  height: 18px;
  order: 2;
}

#reviewNote {
  min-height: 90px;
  resize: vertical;
}

label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

dialog input {
  width: min(420px, 70vw);
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
}

@media (max-width: 1100px) {
  .account-grid {
    grid-template-columns: 1fr;
  }

  .shell {
    grid-template-columns: var(--left-width, 18%) 6px minmax(0, 1fr) 6px var(--right-width, 32%);
    grid-template-rows: none;
  }
  .tools {
    grid-column: auto;
    border-left: 1px solid var(--line);
    border-top: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    padding: 8px;
  }
  .topbar nav {
    flex-wrap: wrap;
  }
  .shell {
    grid-template-columns: var(--left-width, 18%) 6px minmax(0, 1fr) 6px var(--right-width, 32%);
    height: calc(100vh - 150px);
  }
  .editor-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .splitter {
    display: block;
    width: 6px;
    height: auto;
    cursor: col-resize;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-top: 0;
    border-bottom: 0;
  }
  #editor {
    min-height: 420px;
  }
}
