.prompt-page,
.prompt-edit-page {
  color: #fff;
}

.prompt-list-content {
  min-width: 0;
}

.prompt-table {
  table-layout: fixed;
}

.prompt-col-agent {
  width: 24%;
}

.prompt-col-source {
  width: 22%;
}

.prompt-col-updated {
  width: 14%;
}

.prompt-col-preview {
  width: 32%;
}

.prompt-table .prompt-preview-cell {
  color: rgba(255, 255, 255, 0.68);
  word-break: break-word;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prompt-editor-content {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.prompt-editor-content .editor-workspace,
.prompt-editor-content .editor-tab-scroll {
  min-height: 0;
  flex: 1 1 auto;
}

.prompt-editor-content .editor-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

.prompt-editor-section {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.prompt-markdown-shell {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(6, 12, 24, 0.72);
  box-sizing: border-box;
}

.prompt-markdown-shell[data-prompt-mode="view"] .prompt-markdown-view,
.prompt-markdown-shell[data-prompt-mode="edit"] .prompt-markdown-editor {
  display: block;
}

.prompt-markdown-view,
.prompt-markdown-editor {
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  padding: 1rem 1.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
  box-sizing: border-box;
  display: none;
}

.prompt-markdown-view {
  margin: 0;
  overflow: auto;
  color: rgba(228, 240, 255, 0.88);
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-markdown-preview-content {
  display: block;
  will-change: transform;
}

.md-line {
  display: block;
  min-height: 1.6em;
}

.prompt-markdown-editor {
  max-width: 100%;
  height: 100%;
  resize: vertical;
  border: 0;
  background: rgba(8, 15, 28, 0.55);
  color: rgba(228, 240, 255, 0.92);
  caret-color: #fff;
  outline: none;
  overflow: auto;
}

.prompt-markdown-editor::selection {
  background: rgba(124, 196, 255, 0.28);
}

.prompt-markdown-editor::placeholder {
  color: rgba(228, 240, 255, 0.42);
}

.md-heading {
  color: #8ecbff;
}

.md-strong {
  color: #ffffff;
}

.md-em {
  color: #d7ecff;
  font-style: italic;
}

.md-code {
  color: #ffbf7f;
  background: rgba(255, 191, 127, 0.08);
  border-radius: 0.35rem;
}

.md-link {
  color: #7cc4ff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.md-blockquote {
  color: rgba(214, 236, 255, 0.85);
  border-left: 3px solid rgba(124, 196, 255, 0.35);
}

.md-bullet {
  color: #8ecbff;
}

.md-hr {
  color: rgba(255, 255, 255, 0.22);
  letter-spacing: 0.2em;
}

.md-codeblock {
  color: rgba(228, 240, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.7rem;
  display: block;
  white-space: pre-wrap;
}

.md-faded {
  color: rgba(228, 240, 255, 0.42);
}

.prompt-markdown-editor:focus {
  border-color: rgba(124, 196, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.12);
}

@media (max-width: 768px) {
  .prompt-markdown-shell {
    min-height: 18rem;
  }

  .prompt-markdown-editor {
    resize: none;
  }
}
