.prompt-view-heading {
  align-items: center;
}

.prompt-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.prompt-type {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.prompt-type.is-dynamic {
  border-color: var(--ai-border);
  background: var(--ai-soft);
  color: var(--ai);
}

.prompt-type.is-static {
  background: var(--surface-soft);
  color: var(--text-secondary);
}

.prompt-notice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  border: 1px solid var(--ai-border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--ai-soft), var(--surface));
  padding: 16px;
}

.prompt-notice strong,
.prompt-notice p {
  display: block;
}

.prompt-notice strong {
  font-size: 0.77rem;
}

.prompt-notice p {
  max-width: 920px;
  margin: 3px 0 0;
  color: var(--text-secondary);
  font-size: 0.7rem;
  line-height: 1.55;
}

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

.prompt-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.prompt-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.prompt-stage {
  display: block;
  margin-bottom: 5px;
  color: var(--text-tertiary);
  font-size: 0.61rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prompt-card h3 {
  margin: 0;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
}

.prompt-card > p {
  min-height: 42px;
  margin: 11px 0 14px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.55;
}

.prompt-service {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 0.66rem;
}

.prompt-service span {
  color: var(--text-tertiary);
}

.prompt-inputs {
  padding: 13px 0;
}

.prompt-inputs > span {
  color: var(--text-tertiary);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prompt-inputs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.prompt-inputs li {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 4px 8px;
  color: var(--text-secondary);
  font-size: 0.61rem;
}

.prompt-details {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.prompt-details summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  cursor: pointer;
  color: var(--foreground);
  font-size: 0.69rem;
  font-weight: 650;
}

.prompt-details summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 3px;
}

.prompt-template {
  display: grid;
  gap: 12px;
}

.prompt-template pre {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prompt-template code {
  color: var(--text-secondary);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.65rem;
  line-height: 1.6;
}

.prompt-copy {
  justify-self: start;
}

