#text-editor[hidden] {
  display: none;
}
#text-editor {
  min-width: 0;
  margin-bottom: 24px;
}
.text-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.text-editor-toolbar > div {
  flex: 1 1 300px;
}
.text-editor-toolbar h2 {
  margin: 0;
  font-size: 20px;
}
.text-editor-toolbar p {
  margin: 6px 0 0;
}
.text-editor-toolbar .btn {
  min-height: 44px;
}
#level-text {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: max(320px, calc(100dvh - 420px));
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel, #202622);
  color: var(--text, #e8e9df);
  font:
    14px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
  resize: vertical;
}
#level-text:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.text-editor-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
#text-status {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}
#text-conflict[hidden] {
  display: none;
}
#text-tab[data-unsaved='true']::after {
  content: ' •';
}
@media (max-width: 760px) {
  #level-text {
    font-size: 16px;
  }
}
