:root {
  --bg: #eef2f6;
  --shell: #ffffff;
  --panel: #f8fafc;
  --panel-strong: #ffffff;
  --editor: #ffffff;
  --preview: #e8edf3;
  --border: #d7dee8;
  --border-soft: #e8edf4;
  --text: #172033;
  --muted: #667085;
  --muted-2: #8a94a6;
  --accent: #2563eb;
  --green: #1f8f4d;
  --green-hover: #18773f;
  --error: #dc2626;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

body.dark {
  --bg: #07111f;
  --shell: #0b1524;
  --panel: #0c1726;
  --panel-strong: #101d30;
  --editor: #091321;
  --preview: #08111e;
  --border: #213149;
  --border-soft: #18263b;
  --text: #e6edf7;
  --muted: #9aa8bc;
  --muted-2: #6f7f95;
  --accent: #73a7ff;
  --green: #278b4f;
  --green-hover: #31a35e;
  --error: #f87171;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body.dark .workspace,
body.dark .file-explorer,
body.dark .editor-pane,
body.dark .preview-pane,
body.dark .editor-surface,
body.dark .tab-textarea,
body.dark .pane-heading,
body.dark .explorer-header,
body.dark .pdf-container {
  background-color: var(--panel);
}

body.dark .editor-surface,
body.dark .tab-textarea {
  background-color: var(--editor);
}

body.dark .pdf-container {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    var(--preview);
  background-size: 20px 20px;
}

body.dark .placeholder {
  color: #8b98ad;
}

body.dark select,
body.dark option,
body.dark .doc-select select {
  background: #101d30;
  color: #e6edf7;
}

body.dark option {
  border: 0;
}

* {
  scrollbar-color: var(--muted-2) transparent;
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--muted-2);
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-width: 0;
  background: var(--shell);
}

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--shell);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.brand-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
}

.app-version {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.app-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.top-link,
.top-button,
.download-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, opacity 0.16s;
}

.top-link,
.top-button,
.download-button {
  padding: 0 11px;
  font-size: 13px;
}

.icon-button {
  width: 34px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.settings-button.active::after {
  width: 6px;
  height: 6px;
  margin-left: 3px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.icon-button.small {
  width: 28px;
  min-height: 28px;
  font-size: 17px;
}

.top-link:hover,
.top-button:hover,
.download-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--panel);
}

.download-button {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-size: 30px;
  font-weight: 700;
}

.download-button:hover:not(:disabled) {
  background: var(--green-hover);
  border-color: var(--green-hover);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.menu-wrap {
  position: relative;
  display: inline-flex;
}

.add-menu-button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.add-menu-button:hover:not(:disabled) {
  border-color: var(--green-hover);
  background: var(--green-hover);
  color: #fff;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 40;
  display: none;
  min-width: 178px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu button {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}

.dropdown-menu button:hover:not(:disabled) {
  background: rgba(115, 167, 255, 0.13);
}

.convert-menu {
  right: 0;
  left: auto;
}

.doc-select {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 0 7px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.doc-select:hover {
  background: var(--panel-strong);
}

.doc-select select {
  max-width: 170px;
  min-height: 30px;
  padding: 0 22px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  appearance: auto;
}

.doc-select select:disabled {
  color: var(--muted);
}

/* Codex change: Biblica note start */
.template-note {
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}
/* Codex change: Biblica note end */

.convert-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.convert-button:hover:not(:disabled) {
  border-color: var(--green-hover);
  background: var(--green-hover);
}

.convert-wrap {
  flex: 0 0 auto;
  flex-direction: column;
  color: var(--green);
}

.convert-split {
  display: inline-flex;
  align-items: center;
}

.convert-default-button {
  border-radius: 6px 0 0 6px;
}

.convert-menu-button {
  width: 34px;
  padding: 0;
  border-left-color: rgba(255, 255, 255, 0.32);
  border-radius: 0 6px 6px 0;
}

.conversion-loading {
  width: 100%;
  height: 4px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.12);
}

.conversion-loading-bar {
  width: 35%;
  height: 100%;
  background: currentColor;
  animation: conversion-loading-slide 1.1s ease-in-out infinite;
}

.conversion-loading.error {
  color: var(--error);
}

.conversion-loading.error .conversion-loading-bar {
  width: 100%;
  animation: none;
}

@keyframes conversion-loading-slide {
  from {
    transform: translateX(-120%);
  }

  to {
    transform: translateX(320%);
  }
}

.status {
  flex: 1;
  min-width: 220px;
  max-width: none;
  margin-left: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status.success {
  color: #35c876;
}

.status.error {
  color: var(--error);
  overflow: visible;
  font-size: 20px;
  text-overflow: unset;
  white-space: normal;
  line-height: 1.4;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(320px, 1fr) minmax(340px, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--border);
}

.file-explorer,
.editor-pane,
.preview-pane {
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.preview-pane {
  border-right: 0;
}

.file-explorer {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.explorer-header,
.pane-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-strong);
}

.explorer-header {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.explorer-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.explorer-actions .dropdown-menu {
  right: 0;
  left: auto;
}

.preview-heading {
  justify-content: space-between;
}

.explorer-search {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel);
}

.explorer-search input {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: 0;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 13px;
}

.explorer-search input::placeholder {
  color: var(--muted-2);
}

.explorer-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(115, 167, 255, 0.16);
}

.explorer-scroll {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: hidden;
}

.pane-heading h2 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.active-file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explorer-section {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  padding: 10px 8px 4px;
  overflow: hidden;
}

.explorer-section + .explorer-section {
  border-top: 1px solid var(--border-soft);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 6px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.select-all-tabs {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  text-transform: none;
}

.select-all-tabs input,
.file-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--green);
}

.file-list {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 2px;
  overflow-x: hidden;
  overflow-y: auto;
}

.file-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 4px;
  border-radius: 5px;
  color: var(--muted);
}

.file-row:hover,
.file-row.active {
  background: rgba(115, 167, 255, 0.12);
  color: var(--text);
}

.file-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

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

.file-icon {
  width: 16px;
  color: var(--accent);
  text-align: center;
}

.remove-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 18px;
}

.remove-file:hover {
  background: rgba(248, 113, 113, 0.16);
  color: var(--error);
}

.empty-note {
  margin: 4px 6px 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.search-empty {
  margin: 10px 14px;
}

.editor-pane,
.preview-pane {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editor-surface {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--editor);
}

.tab-textarea {
  width: 100%;
  height: 100%;
  flex: 1;
  padding: 18px 20px;
  border: 0;
  outline: 0;
  resize: none;
  background: var(--editor);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.58;
}

.tab-textarea::placeholder {
  color: var(--muted-2);
}

.image-editor-preview {
  width: 100%;
  height: 100%;
  flex: 1;
  padding: 16px;
  overflow: auto;
  color: var(--text);
}

.image-editor-preview-name {
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-editor-preview img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  margin: 0 auto;
  object-fit: contain;
}

.pdf-container {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: var(--preview);
}

.pdf-container:fullscreen,
.pdf-container:-webkit-full-screen {
  padding: 20px;
  background: var(--preview);
}

.placeholder {
  margin: 0;
  color: #5c6677;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.58;
  text-align: left;
}
embed[type="application/pdf"],
.pdf-container iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.18);
}

.sidebar-expand {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 20;
  display: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
}

.pane-resizer {
  position: relative;
  width: 6px;
  min-width: 6px;
  cursor: col-resize;
  background: transparent;
}

.pane-resizer::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.15s;
}

.pane-resizer:hover::after,
.pane-resizer.active::after {
  background: var(--accent);
}


.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(320px, 1fr) 6px minmax(340px, 1fr);
}
.workspace.sidebar-collapsed {
  grid-template-columns: minmax(320px, 1fr) 6px minmax(340px, 1fr);
}


.workspace.sidebar-collapsed .file-explorer {
  display: none;
}

.workspace.sidebar-collapsed .sidebar-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workspace.sidebar-collapsed .editor-pane {
  padding-left: 44px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.64);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  max-height: calc(100vh - 190px);
  padding: 16px;
  overflow: auto;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.modal-body h3 {
  margin: 18px 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
}

.modal-body ul {
  margin: 0;
  padding-left: 20px;
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-links a {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
}

.modal-links a:hover {
  background: var(--panel);
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.import-modal {
  width: min(560px, 100%);
}

.settings-modal {
  width: min(480px, 100%);
}

.app-message-dialog {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.app-message-dialog[hidden] {
  display: none;
}

.app-message-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.68);
}

.app-message-dialog__panel {
  position: relative;
  width: min(460px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--text);
}

.app-message-dialog__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.app-message-dialog__close:hover {
  background: var(--panel);
  color: var(--text);
}

.app-message-dialog__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(115, 167, 255, 0.14);
  color: var(--accent);
  font-weight: 800;
}

.app-message-dialog.success .app-message-dialog__icon {
  background: rgba(53, 200, 118, 0.16);
  color: #35c876;
}

.app-message-dialog.error .app-message-dialog__icon {
  background: rgba(248, 113, 113, 0.16);
  color: var(--error);
}

.app-message-dialog.warning .app-message-dialog__icon {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

.app-message-dialog__panel h2 {
  margin: 0 34px 8px 0;
  font-size: 18px;
  line-height: 1.25;
}

.app-message-dialog__body {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.app-message-dialog__toggle {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.app-message-dialog__details {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-message-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.app-message-dialog__actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.app-message-dialog__actions .primary {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.app-message-dialog__actions .destructive {
  border-color: var(--error);
  background: var(--error);
  color: #fff;
}

.settings-section + .settings-section {
  margin-top: 16px;
}

.settings-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.settings-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}

.typography-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.settings-number-option {
  justify-content: flex-start;
  gap: 4px;
}

.settings-select-option {
  align-items: flex-start;
  flex-direction: column;
  gap: 6px;
}

.settings-select-option select {
  width: min(260px, 100%);
  height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}

.settings-number-option input[type="number"] {
  width: 86px;
  height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}

.settings-help {
  margin: 4px 0 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.project-drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  min-height: 170px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.project-drop-zone strong {
  color: var(--text);
  font-size: 15px;
}

.project-drop-zone span {
  max-width: 360px;
  font-size: 13px;
}

.project-drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(115, 167, 255, 0.12);
}

.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, 0.72);
  pointer-events: none;
}

.drag-overlay[hidden] {
  display: none;
}

.drag-overlay div {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 980px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: auto;
  }

  .app-bar {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .workspace-toolbar {
    width: 100%;
    overflow-x: auto;
  }

  .status {
    margin-left: 8px;
  }

  .workspace {
    grid-template-columns: minmax(230px, 34vw) minmax(360px, 1fr) minmax(360px, 1fr);
    min-height: 720px;
    overflow-x: auto;
  }

  .workspace.sidebar-collapsed {
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  }
}

@media (max-width: 720px) {
  .workspace {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
  }

  .file-explorer {
    min-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .explorer-scroll {
    max-height: 170px;
  }

  .editor-pane,
  .preview-pane {
    min-height: 420px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workspace.sidebar-collapsed .editor-pane {
    padding-left: 40px;
  }

  .sidebar-expand {
    left: 10px;
  }

  .workspace.sidebar-collapsed .sidebar-expand {
    display: inline-flex;
  }

  .doc-select select {
    max-width: 130px;
  }
}

#addTabBtn.add-menu-button,
button#addTabBtn.add-menu-button {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

#addTabBtn.add-menu-button:hover:not(:disabled),
button#addTabBtn.add-menu-button:hover:not(:disabled) {
  border-color: var(--green-hover);
  background: var(--green-hover);
  color: #fff;
}

#downloadBtn.download-button {
  font-size: 15px;
  font-weight: 700;
}

#status.status.error {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
}
