@font-face {
  font-family: "Mojangles";
  src: url("./assets/mojangles.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #181818;
  --bar: #262626;
  --panel: #222222;
  --panel-2: #292929;
  --panel-3: #303030;
  --input: #242424;
  --line: #393939;
  --line-soft: #2f2f2f;
  --text: #e5e5e5;
  --muted: #a5a5a5;
  --faint: #777777;
  --accent: #4c8d2b;
  --accent-strong: #5fa735;
  --accent-text: #f4ffe8;
  --danger: #d16a5c;
  --danger-bg: #311d1a;
  --false: #b94132;
  --false-strong: #d65343;
  --false-text: #fff0ed;
  --warn: #d2a84e;
  --warn-bg: #302716;
  --info: #6aa3d8;
  --info-bg: #172332;
  --code: #202020;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.32);
  --font-ui: "Mojangles", "Helvetica Neue", sans-serif;
  --font-code: "Cascadia Mono", "Consolas", monospace;
  --left-rail-width: 64px;
  --left-panel-width: 286px;
  --right-panel-width: 32vw;
  --checks-panel-height: auto;
  --resize-handle-size: 7px;
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a #1f1f1f;
}

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

::-webkit-scrollbar-track {
  background: #1f1f1f;
  border-left: 1px solid #151515;
}

::-webkit-scrollbar-thumb {
  background: #4a4a4a;
  border: 3px solid #1f1f1f;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #626262;
}

::-webkit-scrollbar-thumb:active {
  background: var(--accent);
}

::-webkit-scrollbar-corner {
  background: #1f1f1f;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16.5px;
  line-height: 1.35;
  font-synthesis: none;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
p,
pre {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 700;
}

h2 {
  font-size: 17px;
  font-weight: 700;
}

h3 {
  font-size: 16px;
  font-weight: 700;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(280px, max-content) minmax(220px, 1fr) max-content;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: var(--bar);
  border-bottom: 1px solid #1b1b1b;
  box-shadow: var(--shadow);
  z-index: 20;
}

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

.brand img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  image-rendering: pixelated;
}

.brand h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar,
.preview-actions,
.form-actions,
.entry-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.preview-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.toolbar-hint {
  min-height: 37px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.hint-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}

#toolbar-hint-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.button,
.icon-button,
.tab,
.entry-tab,
.chip-button,
.value-tag,
.entry-save,
.entry-actions button {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  padding: 8px 11px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.button:hover,
.icon-button:hover,
.tab:hover,
.entry-tab:hover,
.chip-button:hover,
.value-tag:hover,
.entry-save:hover,
.entry-actions button:hover {
  border-color: #545454;
  background: #343434;
  color: #ffffff;
}

.button:disabled,
.icon-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.button:disabled:hover,
.icon-button:disabled:hover {
  border-color: var(--line);
  background: var(--panel-2);
  color: var(--text);
}

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

.button-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button-icon,
.inline-icon,
.tab-icon,
.section-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: block;
  stroke-width: 1.8;
}

.icon-button {
  width: 37px;
  height: 37px;
  padding: 8px;
  line-height: 0;
}

.icon-button .button-icon {
  margin: 0;
}

.entry-list-controls .icon-button {
  display: grid;
  place-items: center;
}

.entry-list-controls .icon-button [data-lucide="chevron-left"] {
  transform: translateX(-1px);
}

.entry-list-controls .icon-button [data-lucide="chevron-right"] {
  transform: translateX(1px);
}

.icon-button.is-on {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: var(--accent-text);
}

.workspace {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--left-rail-width) var(--left-panel-width) var(--resize-handle-size) minmax(0, calc(100vw - var(--left-rail-width) - var(--left-panel-width) - (2 * var(--resize-handle-size)) - max(370px, var(--right-panel-width)))) var(--resize-handle-size) minmax(370px, var(--right-panel-width));
  gap: 0;
  overflow: hidden;
}

.left-rail,
.file-explorer,
.builder,
.right-rail {
  min-width: 0;
  min-height: 0;
}

.left-rail {
  position: relative;
  overflow: auto;
  padding: 18px;
  background: var(--bg);
  border-right: 1px solid var(--line-soft);
}

.left-rail.is-compact {
  overflow-x: hidden;
  padding: 12px 10px;
}

.file-explorer {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border-right: 1px solid var(--line-soft);
  background: var(--bg);
}

.builder {
  overflow: hidden;
  background: var(--bg);
}

.builder-panel {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  padding: 20px;
}

.right-rail {
  position: relative;
  display: grid;
  grid-template-rows: var(--checks-panel-height) var(--resize-handle-size) minmax(0, 1fr);
  overflow: hidden;
  border-left: 1px solid var(--line-soft);
  background: var(--bg);
}

.panel-resizer {
  position: relative;
  z-index: 8;
  background: var(--bg);
  touch-action: none;
}

.panel-resizer::before {
  content: "";
  position: absolute;
  background: transparent;
}

.panel-resizer:hover::before,
.panel-resizer:focus-visible::before,
.panel-resizer.is-dragging::before {
  background: #545454;
}

.panel-resizer:focus-visible {
  outline: 1px solid #8a8a8a;
  outline-offset: -1px;
}

.panel-resizer-column {
  cursor: col-resize;
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid #151515;
}

.panel-resizer-column::before {
  top: 0;
  bottom: 0;
  left: 2px;
  width: 1px;
}

.panel-resizer-row {
  cursor: row-resize;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid #151515;
}

.panel-resizer-row::before {
  left: 0;
  right: 0;
  top: 2px;
  height: 1px;
}

body.is-resizing,
body.is-resizing-row {
  user-select: none;
}

body.is-resizing {
  cursor: col-resize;
}

body.is-resizing-row {
  cursor: row-resize;
}

.rail-toggle {
  display: none;
}

.workspace.is-left-hidden {
  grid-template-columns: var(--left-rail-width) 0 0 minmax(0, calc(100vw - var(--left-rail-width) - var(--resize-handle-size) - max(370px, var(--right-panel-width)))) var(--resize-handle-size) minmax(370px, var(--right-panel-width));
}

.workspace.is-right-hidden {
  grid-template-columns: var(--left-rail-width) var(--left-panel-width) var(--resize-handle-size) minmax(0, calc(100vw - var(--left-rail-width) - var(--left-panel-width) - var(--resize-handle-size))) 0 0;
}

.workspace.is-left-hidden.is-right-hidden {
  grid-template-columns: var(--left-rail-width) 0 0 minmax(0, calc(100vw - var(--left-rail-width))) 0 0;
}

.workspace.is-left-hidden .file-explorer,
.workspace.is-left-hidden [data-resize-target="left"],
.workspace.is-right-hidden .right-rail,
.workspace.is-right-hidden [data-resize-target="right"] {
  display: none;
}

.section-tabs {
  display: grid;
  gap: 9px;
}

.left-rail.is-compact .section-tabs {
  justify-items: center;
  gap: 8px;
}

.tab {
  width: 100%;
  min-height: 53px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) max-content;
  align-items: start;
  justify-content: stretch;
  padding: 9px;
  gap: 10px;
  background: transparent;
  border-color: transparent;
  text-align: left;
}

.left-rail.is-compact .tab {
  width: 44px;
  min-height: 44px;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 10px;
  gap: 0;
}

.tab-icon {
  margin-top: 2px;
}

.left-rail.is-compact .tab-icon {
  width: 20px;
  height: 20px;
  margin: 0;
}

.tab.is-active {
  border-color: var(--line);
  background: var(--panel-2);
}

.tab.has-warning {
  border-color: #5e4821;
  background: var(--warn-bg);
}

.tab.has-info {
  border-color: #29455f;
  background: var(--info-bg);
}

.tab.has-error {
  border-color: #60302a;
  background: var(--danger-bg);
}

.tab.has-warning:hover,
.tab.has-warning.is-active {
  border-color: var(--warn);
  background: #392c16;
}

.tab.has-error:hover,
.tab.has-error.is-active {
  border-color: var(--danger);
  background: #3a211e;
}

.tab.has-info:hover,
.tab.has-info.is-active {
  border-color: var(--info);
  background: #1a2a3d;
}

.tab.has-warning .tab-count {
  border-color: #5e4821;
  background: #241d12;
  color: #f0d397;
}

.tab.has-info .tab-count {
  border-color: #29455f;
  background: #142031;
  color: #b8d8f2;
}

.tab.has-error .tab-count {
  border-color: #60302a;
  background: #251916;
  color: #f3cbc7;
}

.tab-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  flex: 1 1 auto;
}

.left-rail.is-compact .tab-copy,
.left-rail.is-compact .tab-count {
  display: none;
}

.tab-count {
  margin-top: 1px;
}

.tab-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-detail,
.field small,
.entry-card small,
.check span,
.path-label {
  color: var(--muted);
  font-size: 13px;
}

.tab-count,
.pill,
.panel-title > span {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  color: #dcdcdc;
  padding: 2px 7px;
  font-size: 13px;
}

.tab-count.is-empty {
  color: var(--faint);
}

.panel-title > span.is-ok {
  border-color: #39731c;
  background: var(--accent);
  color: var(--accent-text);
}

.panel-title > span.has-warning {
  border-color: #5e4821;
  background: var(--warn-bg);
  color: #f0d397;
}

.panel-title > span.has-info {
  border-color: #29455f;
  background: var(--info-bg);
  color: #b8d8f2;
}

.panel-title > span.has-error {
  border-color: #60302a;
  background: var(--danger-bg);
  color: #f3cbc7;
}

.builder-content {
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.builder-header,
.panel-title,
.preview-header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.builder-header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 62px;
  margin: 0 0 20px;
  padding: 9px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: hidden;
}

.builder-header > .button {
  width: max-content;
  max-width: 100%;
  justify-self: end;
  margin-left: 0;
}

.builder-header p {
  max-width: 72ch;
  color: var(--muted);
  font-size: 14px;
}

.panel-title,
.preview-header {
  padding: 9px 11px;
}

.panel-title-snap {
  cursor: pointer;
}

.panel-title-snap:hover {
  background: var(--panel-2);
}

.preview-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 56px;
  padding-block: 9px;
  align-items: center;
}

.panel-title-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title-main > div {
  min-width: 0;
}

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

.panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}

.checks-panel,
.files-panel {
  display: flex;
  flex-direction: column;
}

.checks,
.file-tree {
  flex: 1 1 auto;
  display: block;
  min-height: 0;
  overflow: auto;
  padding: 8px 5px;
}

.checks-panel.is-title-only .checks,
.files-panel.is-title-only .file-tree {
  display: none;
}

.check,
.entry-card,
.empty-state {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel);
}

.check {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 3px 8px;
  padding: 9px;
  color: var(--text);
  text-align: left;
}

button.check {
  cursor: pointer;
}

.check.warning {
  border-color: #5e4821;
  background: var(--warn-bg);
}

.check.info {
  border-color: #29455f;
  background: var(--info-bg);
}

.check.error {
  border-color: #60302a;
  background: var(--danger-bg);
}

.check span {
  grid-column: 2;
}

.check small {
  grid-column: 2;
  color: var(--muted);
}

.tree-row {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  padding: 2px 6px 2px calc(6px + (var(--tree-depth, 0) * 18px));
  text-align: left;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}

.tree-row .inline-icon {
  width: 16px;
  height: 16px;
  margin: 0;
  color: #b8b8b8;
}

.tree-row:hover,
.tree-row.is-active {
  background: var(--panel-2);
}

.tree-row.is-active {
  color: #ffffff;
}

.tree-row.is-entry-active {
  color: var(--accent-text);
}

.tree-row.is-dragging {
  opacity: 0.45;
}

.tree-row.has-error,
.tree-row.has-error .inline-icon {
  color: #e3a19a;
}

.tree-row.has-warning,
.tree-row.has-warning .inline-icon {
  color: #f0d397;
}

.tree-row.is-drop-before::before,
.tree-row.is-drop-after::after {
  content: "";
  position: absolute;
  left: calc(6px + (var(--tree-depth, 0) * 18px));
  right: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-strong);
}

.tree-row.is-drop-before::before {
  top: -1px;
}

.tree-row.is-drop-after::after {
  bottom: -1px;
}

.tree-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--muted);
}

.tree-row-spacer {
  width: 14px;
  flex: 0 0 auto;
}

.tree-label {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preview-header h2 {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 500;
}

.preview.has-error .preview-header {
  border-bottom-color: #60302a;
  background: var(--danger-bg);
}

.preview.has-error .preview-header h2,
.preview.has-error .preview-actions .icon-button {
  color: #f3cbc7;
}

.code-preview {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  --code-preview-padding-y: 14px;
  --code-preview-padding-x: 15px;
  --preview-line-height: 21.7px;
  --preview-gutter-digits: 2;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--code);
}

.code-preview-gutter {
  min-width: calc((var(--preview-gutter-digits) * 1ch) + 26px);
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  padding: var(--code-preview-padding-y) 10px var(--code-preview-padding-y) 12px;
  border-right: 1px solid #2b2b2b;
  background: #1b1b1b;
  color: #6d6d6d;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: var(--preview-line-height);
  user-select: none;
}

.code-preview-lines {
  min-width: 100%;
}

.code-preview-line-number {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: var(--preview-line-height);
  line-height: var(--preview-line-height);
  white-space: nowrap;
}

.code-preview-line-number.is-highlighted {
  color: #f0b2aa;
}

.code-preview-input {
  width: 100%;
  min-height: 0;
  height: auto;
  border: 0;
  border-radius: 0;
  overflow: auto;
  padding: var(--code-preview-padding-y) var(--code-preview-padding-x);
  background: transparent;
  background-attachment: local;
  background-repeat: no-repeat;
  color: #d8d8d8;
  font-family: var(--font-code);
  font-size: 14px;
  line-height: 1.55;
  tab-size: 2;
  resize: none;
  white-space: pre;
}

.code-preview:focus-within {
  outline: 1px solid #686868;
  outline-offset: -1px;
}

.code-preview.is-wrapped .code-preview-input {
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-preview.is-invalid {
  box-shadow: inset 3px 0 0 var(--danger);
  background: #251b1a;
}

.code-preview.is-invalid .code-preview-gutter,
.code-preview.has-line-highlights .code-preview-gutter {
  border-right-color: #50302c;
  background: #201918;
}

.code-preview.has-line-highlights {
  box-shadow: inset 3px 0 0 var(--danger);
}

.code-preview.is-codemirror {
  grid-template-columns: minmax(0, 1fr);
}

.code-preview.is-codemirror .code-preview-gutter,
.code-preview.is-codemirror .code-preview-input {
  display: none;
}

.code-preview-editor {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.code-preview-editor .cm-editor {
  height: 100%;
  background: transparent;
}

.code-preview-editor .cm-focused {
  outline: none;
}

.code-preview-editor .cm-scroller {
  scrollbar-width: thin;
  scrollbar-color: #5a5a5a #1f1f1f;
}

.form-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 15px 11px;
  padding: 0 0 18px;
}

.builder-content > .form-grid,
.entry-form,
.entry-list {
  background: transparent;
}

.overview-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-12,
.field.full,
.toggle-details.full {
  grid-column: 1 / -1;
}

.form-grid.one {
  grid-template-columns: 1fr;
}

.field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.field.is-hidden {
  display: none;
}

.field label,
.toggle label,
.toggle span {
  color: var(--text);
}

.field label {
  min-height: 20px;
  font-size: 16.5px;
  line-height: 1.15;
}

.field small {
  display: none;
  line-height: 1.25;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.field.has-warning input,
.field.has-warning select,
.field.has-warning textarea {
  border-color: var(--warn);
  box-shadow: 0 0 0 1px var(--warn);
}

.field.has-info input,
.field.has-info select,
.field.has-info textarea {
  border-color: var(--info);
  box-shadow: 0 0 0 1px var(--info);
}

.field .field-issue {
  display: block;
  color: #f3cbc7;
  overflow-wrap: anywhere;
}

.field.has-warning .field-issue {
  color: #f0d397;
}

.field.has-info .field-issue {
  color: #b8d8f2;
}

.compat-alert {
  min-height: 42px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-2);
  padding: 10px 12px;
}

.compat-alert.info {
  border-color: #29455f;
  background: var(--info-bg);
  color: #dceeff;
}

.compat-alert .inline-icon {
  margin-top: 2px;
  color: var(--info);
}

.compat-alert div {
  display: grid;
  gap: 3px;
}

.compat-alert span {
  color: #b8d8f2;
  font-size: 13px;
}

.tooltip-label {
  width: fit-content;
  cursor: help;
  text-decoration: underline dotted #666666;
  text-underline-offset: 3px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--input);
  color: var(--text);
  font-size: 16.5px;
  padding: 9px 10px;
  line-height: 1.2;
}

textarea {
  height: auto;
  min-height: 95px;
  resize: vertical;
}

.entry-form textarea {
  min-height: 42px;
  overflow: hidden;
}

select {
  appearance: auto;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
.button:focus-visible {
  outline: 1px solid #8a8a8a;
  outline-offset: 1px;
  border-color: #686868;
}

.entry-tabs {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 0 0 13px;
}

.entry-tab.is-active {
  border-color: #39731c;
  background: var(--accent);
  color: var(--accent-text);
}

.entry-tab.has-warning {
  border-color: #5e4821;
  background: var(--warn-bg);
  color: #f0d397;
}

.entry-tab.has-info {
  border-color: #29455f;
  background: var(--info-bg);
  color: #b8d8f2;
}

.entry-tab.has-error {
  border-color: #60302a;
  background: var(--danger-bg);
  color: #f3cbc7;
}

.entry-tab.has-warning:hover,
.entry-tab.has-warning.is-active {
  border-color: var(--warn);
  background: #392c16;
}

.entry-tab.has-info:hover,
.entry-tab.has-info.is-active {
  border-color: var(--info);
  background: #1a2a3d;
}

.entry-tab.has-error:hover,
.entry-tab.has-error.is-active {
  border-color: var(--danger);
  background: #3a211e;
}

.entry-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

.entry-list {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  overflow: auto;
}

.entry-list-controls {
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel-2);
}

.entry-list-controls:last-child {
  position: sticky;
  top: auto;
  bottom: 0;
}

.entry-list-controls span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-card {
  position: relative;
  padding: 10px;
  cursor: pointer;
}

.entry-card.is-sortable {
  cursor: grab;
}

.entry-card.is-sortable:active {
  cursor: grabbing;
}

.entry-card.is-dragging {
  opacity: 0.6;
}

.entry-card.is-drop-before::before,
.entry-card.is-drop-after::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-strong);
}

.entry-card.is-drop-before::before {
  top: -5px;
}

.entry-card.is-drop-after::after {
  bottom: -5px;
}

.entry-card.is-active {
  border-color: var(--accent-strong);
  box-shadow: inset 3px 0 0 var(--accent-strong);
}

.entry-card:hover {
  border-color: #545454;
  background: var(--panel-2);
}

.entry-card.has-warning {
  border-color: #5e4821;
  background: var(--warn-bg);
  box-shadow: 0 0 0 1px #5e4821;
}

.entry-card.has-info {
  border-color: #29455f;
  background: var(--info-bg);
  box-shadow: 0 0 0 1px #29455f;
}

.entry-card.has-error {
  border-color: #60302a;
  background: var(--danger-bg);
  box-shadow: 0 0 0 1px var(--danger);
}

.entry-card.has-warning:hover,
.entry-card.has-warning.is-active {
  border-color: var(--warn);
  background: #392c16;
}

.entry-card.has-error:hover,
.entry-card.has-error.is-active {
  border-color: var(--danger);
  background: #3a211e;
}

.entry-card.has-info:hover,
.entry-card.has-info.is-active {
  border-color: var(--info);
  background: #1a2a3d;
}

.entry-card.has-warning.is-active {
  box-shadow: inset 3px 0 0 var(--warn), 0 0 0 1px var(--warn);
}

.entry-card.has-info.is-active {
  box-shadow: inset 3px 0 0 var(--info), 0 0 0 1px var(--info);
}

.entry-card.has-error.is-active {
  box-shadow: inset 3px 0 0 var(--danger), 0 0 0 1px var(--danger);
}

.entry-card.has-warning small,
.entry-card.has-warning .inline-icon {
  color: #f0d397;
}

.entry-card.has-error small,
.entry-card.has-error .inline-icon {
  color: #e3a19a;
}

.entry-card.has-info small,
.entry-card.has-info .inline-icon {
  color: #b8d8f2;
}

.entry-card .entry-issue {
  color: #f3cbc7;
  overflow-wrap: anywhere;
}

.entry-card.has-warning .entry-issue {
  color: #f0d397;
}

.entry-card.has-info .entry-issue {
  color: #b8d8f2;
}

.entry-card:focus-visible {
  outline: 1px solid #8a8a8a;
  outline-offset: 1px;
}

.entry-object-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.entry-object-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.entry-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.entry-save {
  width: 35px;
  height: 35px;
  min-height: 35px;
  padding: 7px;
  border-color: #39731c;
  background: var(--accent);
  color: var(--accent-text);
  flex: 0 0 auto;
}

.entry-save:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.entry-delete {
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #60302a;
  border-radius: 4px;
  background: var(--danger-bg);
  color: #ffbbb5;
  flex: 0 0 auto;
}

.entry-delete:hover {
  border-color: var(--danger);
  background: #45231f;
}

.entry-form {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  overflow: auto;
  padding: 13px;
}

.entry-form.has-unsaved-changes {
  border-color: var(--warn);
  box-shadow: inset 3px 0 0 var(--warn);
}

.entry-form .field {
  grid-template-rows: auto auto auto;
}

.toggle-grid {
  display: grid;
  gap: 7px;
}

.toggle-details {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
}

.toggle-details-summary {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--input);
  color: var(--text);
  cursor: pointer;
  list-style: none;
  padding: 8px 10px;
}

.toggle-details-summary::-webkit-details-marker {
  display: none;
}

.toggle-details-summary:hover {
  background: #2c2c2c;
}

.toggle-details-meta {
  color: var(--muted);
  font-size: 14px;
}

.toggle-details-icon {
  color: var(--muted);
}

.toggle-details[open] .toggle-details-icon {
  transform: rotate(90deg);
}

.toggle-details .toggle-grid {
  margin-top: 7px;
}

.toggle {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--input);
  overflow: hidden;
}

.toggle input {
  position: absolute;
  width: 1px;
  min-width: 0;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toggle-name,
.toggle-choice {
  min-height: 37px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
}

.toggle-choice {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
}

.toggle-choice:hover {
  background: #343434;
  color: #ffffff;
}

.toggle .toggle-false {
  color: #ffb7af;
}

.toggle input:not(:checked) ~ .toggle-false {
  background: var(--false);
  color: var(--false-text);
  border-left-color: var(--false-strong);
}

.toggle input:checked ~ .toggle-true {
  background: var(--accent);
  color: var(--accent-text);
}

.toggle.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.toggle.has-warning {
  border-color: var(--warn);
  box-shadow: 0 0 0 1px var(--warn);
}

.toggle.has-info {
  border-color: var(--info);
  box-shadow: 0 0 0 1px var(--info);
}

.value-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.value-tag {
  min-height: 31px;
  padding: 6px 9px;
  color: #d8d8d8;
  font-size: 14px;
}

.value-tag.is-added,
.value-tag.is-added:hover {
  border-color: #2f2f2f;
  background: #202020;
  color: #777777;
  cursor: default;
}

.value-tag.is-added .inline-icon {
  color: #666666;
}

.empty-state {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.minecraft-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  width: max-content;
  max-width: min(460px, calc(100vw - 24px));
  padding: 8px 9px;
  border: 1px solid #555555;
  border-radius: 4px;
  background: #1f1f1f;
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-9999px, -9999px, 0);
  transition: opacity 80ms linear;
}

.minecraft-tooltip.is-visible {
  opacity: 1;
}

.minecraft-tooltip-line {
  display: block;
}

.mc-bold {
  font-weight: 700;
}

.mc-italic {
  font-style: italic;
}

.mc-underlined {
  text-decoration-line: underline;
}

.mc-strikethrough {
  text-decoration-line: line-through;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 360px;
  min-height: 40px;
  display: none;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #252525;
  color: #ffffff;
  box-shadow: var(--shadow);
  z-index: 40;
}

.toast.is-visible {
  display: flex;
}

body.is-file-dragging::after {
  content: "Drop files to import";
  position: fixed;
  inset: 10px;
  z-index: 90;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-strong);
  border-radius: 4px;
  background: rgba(24, 24, 24, 0.72);
  color: var(--accent-text);
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.48);
}

.modal-overlay.is-open {
  display: flex;
}

#settings-dialog {
  z-index: 80;
}

.modal-window {
  width: min(520px, 100%);
  max-height: min(640px, calc(100vh - 36px));
  display: grid;
  gap: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title .section-icon {
  color: var(--warn);
}

.modal-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.modal-issues {
  display: grid;
  gap: 7px;
}

.modal-issue {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel-2);
}

.modal-issue.error {
  border-color: #60302a;
  background: var(--danger-bg);
}

.modal-issue.warning {
  border-color: #5e4821;
  background: var(--warn-bg);
}

.modal-issue.ok {
  border-color: #39731c;
  background: rgba(76, 141, 43, 0.12);
}

.modal-issue.info {
  border-color: #29455f;
  background: var(--info-bg);
}

.modal-issue span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.modal-more {
  color: var(--muted);
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.settings-window {
  width: min(620px, 100%);
}

.template-window {
  width: min(560px, 100%);
}

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

.template-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.template-choice:hover,
.template-choice:focus-visible {
  border-color: var(--accent);
  background: var(--panel-3);
}

.template-choice strong,
.template-choice small {
  display: block;
}

.template-choice small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.settings-keybinds {
  display: grid;
  gap: 8px;
}

.keybind-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel-2);
}

.keybind-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.keybind-row-main span {
  color: var(--muted);
  font-size: 13px;
}

.keybind-button {
  min-width: 122px;
  justify-content: center;
  font-family: var(--font-code);
  font-size: 14px;
}

.keybind-button.is-recording {
  border-color: var(--warn);
  background: var(--warn-bg);
  color: #f0d397;
}

body.is-unsaved-shaking .app-shell {
  animation: unsaved-shake 180ms ease-in-out;
}

@keyframes unsaved-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-4px);
  }

  50% {
    transform: translateX(4px);
  }

  75% {
    transform: translateX(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-unsaved-shaking .app-shell {
    animation: none;
  }
}

.wiki-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  pointer-events: none;
}

.wiki-overlay.is-open {
  display: block;
}

.wiki-window {
  position: absolute;
  min-width: 300px;
  min-height: 310px;
  display: grid;
  grid-template-rows: 48px auto 38px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  pointer-events: auto;
}

.wiki-titlebar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px) 37px;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 11px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bar);
  cursor: move;
  user-select: none;
}

.wiki-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.wiki-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-titlebar select,
.wiki-search-row input {
  height: 36px;
}

.wiki-search-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 37px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.wiki-search-row .inline-icon {
  color: var(--muted);
}

.wiki-search-row .icon-button {
  width: 37px;
  height: 37px;
}

.wiki-tabs {
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 8px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.wiki-tab {
  position: relative;
  min-width: 0;
  max-width: 220px;
  height: 31px;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  border: 1px solid var(--line-soft);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #202020;
  color: var(--muted);
}

.wiki-tab.is-dragging {
  opacity: 0.6;
}

.wiki-tab.is-drop-before::before,
.wiki-tab.is-drop-after::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-strong);
}

.wiki-tab.is-drop-before::before {
  left: -4px;
}

.wiki-tab.is-drop-after::after {
  right: -4px;
}

.wiki-tab.is-active {
  background: var(--panel-2);
  color: var(--text);
}

.wiki-bookmark-tab {
  width: 34px;
  height: 31px;
  min-height: 31px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: #1c1c1c;
  color: #9d83c7;
  padding: 5px;
  flex: 0 0 auto;
}

.wiki-bookmark-tab:hover,
.wiki-bookmark-tab.is-active {
  border-color: #5d4385;
  background: #2d2140;
  color: #eadcff;
}

.wiki-bookmark-tab .button-icon {
  width: 16px;
  height: 16px;
}

.wiki-tab-button,
.wiki-tab-pin,
.wiki-tab-close {
  height: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.wiki-tab-button {
  min-width: 0;
  overflow: hidden;
  padding: 6px 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-tab-pin,
.wiki-tab-close {
  width: 30px;
  padding: 5px;
}

.wiki-tab-pin {
  color: #888888;
}

.wiki-tab.is-pinned {
  color: #d3d3d3;
}

.wiki-tab.is-pinned .wiki-tab-pin,
.wiki-tab-pin.is-on {
  color: #d2a84e;
}

.wiki-tab-button:hover,
.wiki-tab-pin:hover,
.wiki-tab-close:hover {
  background: #343434;
  color: #ffffff;
}

.wiki-tab-pin .button-icon {
  width: 15px;
  height: 15px;
}

.wiki-tab-close .button-icon {
  width: 16px;
  height: 16px;
}

.wiki-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  overflow: hidden;
}

.wiki-results {
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px;
  overflow: auto;
  border-right: 1px solid var(--line-soft);
  background: var(--bg);
}

.wiki-result-label {
  color: var(--muted);
  font-size: 13px;
}

.wiki-result + .wiki-result-label {
  margin-top: 8px;
}

.wiki-result {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.wiki-highlight-result {
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  gap: 6px;
  padding: 0;
}

.wiki-highlight-result-main {
  min-width: 0;
  display: grid;
  gap: 3px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 9px 0 9px 9px;
  text-align: left;
}

.wiki-highlight-delete {
  width: 30px;
  min-height: 30px;
  align-self: stretch;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: #b9857f;
  padding: 7px;
}

.wiki-highlight-delete:hover {
  background: #45231f;
  color: #ffbbb5;
}

.wiki-highlight-delete .button-icon {
  width: 15px;
  height: 15px;
}

.wiki-highlight-result,
.wiki-highlight-card {
  cursor: grab;
}

.wiki-highlight-delete,
.wiki-highlight-delete:active,
.wiki-highlight-result-main,
.wiki-highlight-result-main:active {
  cursor: pointer;
}

.wiki-highlight-result:active,
.wiki-highlight-card:active {
  cursor: grabbing;
}

.wiki-highlight-result.is-dragging,
.wiki-highlight-card.is-dragging {
  opacity: 0.6;
}

.wiki-highlight-result.is-drop-before::before,
.wiki-highlight-result.is-drop-after::after,
.wiki-highlight-card.is-drop-before::before,
.wiki-highlight-card.is-drop-after::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: #8f6fd1;
}

.wiki-highlight-result.is-drop-before::before,
.wiki-highlight-card.is-drop-before::before {
  top: -5px;
}

.wiki-highlight-result.is-drop-after::after,
.wiki-highlight-card.is-drop-after::after {
  bottom: -5px;
}

.wiki-result:hover,
.wiki-result.is-active {
  border-color: #545454;
  background: var(--panel-2);
}

.wiki-result.is-section-match {
  box-shadow: inset 3px 0 0 var(--accent-strong);
}

.wiki-result.is-tag-match {
  box-shadow: inset 3px 0 0 #8fcfff;
}

.wiki-result span,
.wiki-result small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-result small,
.wiki-status {
  color: var(--muted);
  font-size: 13px;
}

.wiki-status {
  padding: 8px 2px;
}

.wiki-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 17px 20px 32px;
  background: var(--panel);
}

.wiki-content h1,
.wiki-content h2,
.wiki-content h3,
.wiki-content h4,
.wiki-content summary {
  scroll-margin-top: 12px;
}

.wiki-content h1,
.wiki-content h2,
.wiki-content h3,
.wiki-content h4 {
  margin: 20px 0 8px;
}

.wiki-content h1:first-child,
.wiki-content h2:first-child,
.wiki-content h3:first-child {
  margin-top: 0;
}

.wiki-content p,
.wiki-content li {
  color: #d8d8d8;
  line-height: 1.5;
}

.wiki-content p {
  margin: 0 0 12px;
}

.wiki-content ul,
.wiki-content ol {
  margin: 0 0 13px;
  padding-left: 22px;
}

.wiki-content details {
  margin: 0 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #202020;
}

.wiki-content summary {
  padding: 9px 11px;
  cursor: pointer;
}

.wiki-content details > *:not(summary) {
  margin-left: 12px;
  margin-right: 12px;
}

.wiki-content details > pre,
.wiki-content details > table {
  width: calc(100% - 24px);
}

.wiki-content pre {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--code);
  color: #d8d8d8;
  overflow: auto;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.45;
}

.wiki-content code {
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--code);
  padding: 1px 4px;
  font-family: var(--font-code);
  font-size: 0.9em;
}

.wiki-content pre code {
  border: 0;
  padding: 0;
  background: transparent;
}

.wiki-content a {
  color: #a6d28f;
}

.wiki-content table {
  width: 100%;
  margin: 0 0 14px;
  border-collapse: collapse;
  font-size: 14px;
}

.wiki-content th,
.wiki-content td {
  border: 1px solid var(--line-soft);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}

.wiki-content th {
  background: var(--panel-2);
}

.wiki-content mark,
.wiki-result mark {
  border-radius: 3px;
  background: #5e4821;
  color: #fff1bf;
  padding: 0 2px;
}

.wiki-content mark.wiki-key-mark,
.wiki-result mark.wiki-key-mark {
  background: #16384a;
  color: #bceaff;
}

.wiki-highlight-list {
  display: grid;
  gap: 12px;
}

.wiki-highlight-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: #202020;
}

.wiki-highlight-card-source {
  color: var(--muted);
  font-family: var(--font-code);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wiki-highlight-card-body {
  min-width: 0;
  color: #d8d8d8;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.wiki-highlight-card-body ul,
.wiki-highlight-card-body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.wiki-highlight-card-body li {
  padding-left: 2px;
}

.wiki-highlight-card-body > *:last-child {
  margin-bottom: 0;
}

.wiki-hit-section {
  padding: 6px 8px;
  border-left: 3px solid var(--accent-strong);
  background: #24301e;
}

.wiki-content summary.wiki-hit-section {
  padding: 9px 11px;
}

.wiki-resize {
  position: absolute;
  z-index: 2;
}

.wiki-resize-right {
  top: 48px;
  right: 0;
  bottom: 12px;
  width: 3px;
  cursor: col-resize;
}

.wiki-resize-bottom {
  right: 12px;
  bottom: 0;
  left: 0;
  height: 8px;
  cursor: row-resize;
}

.wiki-resize-corner {
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  cursor: nwse-resize;
}

.wiki-resize-corner::before {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 7px;
  height: 7px;
  border-right: 1px solid #686868;
  border-bottom: 1px solid #686868;
}

body.is-wiki-moving {
  user-select: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .workspace {
    --left-panel-width: 242px;
    --right-panel-width: 32vw;
    grid-template-columns: var(--left-rail-width) var(--left-panel-width) var(--resize-handle-size) minmax(0, calc(100vw - var(--left-rail-width) - var(--left-panel-width) - (2 * var(--resize-handle-size)) - max(320px, var(--right-panel-width)))) var(--resize-handle-size) minmax(320px, var(--right-panel-width));
  }

  .entry-layout {
    grid-template-columns: 1fr;
  }
}

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

  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto;
    overflow: visible;
  }

  .app-header {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .toolbar {
    width: 100%;
  }

  .keybind-row {
    grid-template-columns: 1fr;
  }

  .keybind-button {
    width: 100%;
  }

  .toolbar-hint {
    width: 100%;
    justify-content: flex-start;
  }

  .workspace,
  .workspace.is-left-hidden,
  .workspace.is-right-hidden {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .panel-resizer {
    display: none;
  }

  .left-rail,
  .file-explorer,
  .right-rail {
    display: block;
    border: 0;
  }

  .left-rail {
    padding: 10px;
    border-bottom: 1px solid var(--line-soft);
  }

  .left-rail.is-compact {
    padding: 10px;
  }

  .file-explorer {
    display: grid;
    grid-template-rows: minmax(220px, auto);
    border-bottom: 1px solid var(--line-soft);
  }

  .section-tabs {
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  }

  .left-rail.is-compact .section-tabs {
    justify-items: center;
  }

  .left-rail.is-compact .tab {
    width: 44px;
    min-height: 44px;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 10px;
    gap: 0;
  }

  .left-rail.is-compact .tab-icon {
    width: 20px;
    height: 20px;
    margin: 0;
  }

  .left-rail.is-compact .tab-copy,
  .left-rail.is-compact .tab-count {
    display: none;
  }

  .builder-panel {
    height: auto;
    overflow: visible;
    padding: 12px;
  }

  .builder-header {
    margin: 0 0 18px;
    padding: 8px 12px;
  }

  .right-rail {
    display: grid;
    grid-template-rows: auto auto 520px;
    border-top: 1px solid var(--line-soft);
  }

  .wiki-titlebar {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 160px) 37px;
  }

  .wiki-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(100px, 0.38fr) minmax(0, 1fr);
  }

  .wiki-results {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .form-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .span-5,
  .span-6,
  .span-7,
  .span-12 {
    grid-column: 1;
  }
}

@media (max-width: 560px) {
  .brand h1 {
    font-size: 20px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button {
    width: 100%;
  }

  .section-tabs {
    grid-template-columns: 1fr;
  }

  .tab-detail {
    display: none;
  }
}
