.prompt-workspace {
  display: grid;
  gap: 18px;
}
.prompt-search button {
  width: 38px;
  border: 0;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}
.prompt-mode-tabs {
  margin-top: -6px;
}
.prompt-real-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}
.prompt-real-main,
.prompt-builder-panel {
  display: grid;
  gap: 18px;
}
.prompt-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.prompt-section-head h2,
.prompt-section-head p {
  margin: 0;
}
.prompt-section-head p {
  color: var(--muted);
}
.prompt-section-head span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}
.prompt-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.prompt-real-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow);
}
.prompt-real-card.personal {
  background: linear-gradient(135deg, #ffffff, #f4fff8);
}
.prompt-real-card h3,
.prompt-real-card p,
.prompt-real-card pre {
  margin: 0;
}
.prompt-real-card p,
.prompt-mode,
.prompt-real-card pre {
  color: var(--muted);
}
.prompt-real-card pre {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
}
.prompt-mode {
  margin-left: auto;
  font-size: 12px;
  font-weight: 800;
}
.prompt-parts {
  display: grid;
  gap: 7px;
}
.prompt-parts span {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid #e8edf6;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  color: #475569;
  font-size: 12px;
  line-height: 1.35;
}
.prompt-parts b {
  color: var(--ink);
  font-size: 11px;
  text-transform: uppercase;
}
.prompt-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prompt-card-actions .primary-button,
.prompt-card-actions .ghost-button,
.prompt-live-table .ghost-button,
.prompt-live-table .link-button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}
.prompt-builder-panel {
  position: sticky;
  top: 18px;
}
.prompt-builder-form {
  display: grid;
  gap: 10px;
}
.prompt-builder-form .filter-field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 11px;
  box-sizing: border-box;
}
.prompt-builder-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.45;
}
.prompt-builder-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.prompt-builder-actions .primary-button,
.prompt-builder-actions .ghost-button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  font-size: 12px;
}
.prompt-score-result {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.prompt-score-result h3 {
  margin: 0 0 10px;
}
.prompt-live-table table {
  min-width: 760px;
}
.prompt-live-table small {
  color: var(--muted);
}
@media (max-width: 1180px) {
  .prompt-real-layout {
    grid-template-columns: 1fr;
  }
  .prompt-builder-panel {
    position: static;
  }
}
@media (max-width: 760px) {
  .prompt-card-grid,
  .prompt-builder-actions {
    grid-template-columns: 1fr;
  }
  .prompt-section-head {
    align-items: start;
    flex-direction: column;
  }
  .prompt-real-card,
  .prompt-builder-panel .side-card {
    width: 100%;
    box-sizing: border-box;
  }
  .prompt-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .prompt-card-actions .primary-button,
  .prompt-card-actions .ghost-button {
    width: 100%;
  }
}
@media (max-width: 460px) {
  .prompt-card-actions {
    grid-template-columns: 1fr;
  }
}
