.prompt-library { --prompt-accent: #087f73; --prompt-border: #dce3e1; color: #303b38; font-size: 14px; line-height: 1.5; }
.prompt-library *, .prompt-library *::before, .prompt-library *::after { box-sizing: border-box; }
.prompt-library [hidden] { display: none !important; }
.prompt-library button { font: inherit; border: 1px solid var(--prompt-border); border-radius: 0; background: #fff; color: inherit; cursor: pointer; min-height: 40px; padding: 6px 12px; }
.prompt-library button:hover { border-color: var(--prompt-accent); color: var(--prompt-accent); }
.prompt-library button:disabled { opacity: .45; cursor: not-allowed; }
.prompt-library :focus-visible { outline: 2px solid var(--prompt-accent); outline-offset: 3px; }
.prompt-search { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.prompt-search > label:first-child { display: flex; align-items: center; flex: 1 1 280px; border: 1px solid #b7c4bf; padding: 0 12px; gap: 10px; min-width: 0; }
.prompt-search input { width: 100%; height: 42px; padding: 8px 0; border: 0; background: #fff; font: inherit; min-width: 0; }
.prompt-search input:focus { outline-offset: 0; }
.prompt-type-label { display: flex; align-items: center; gap: 10px; }
.prompt-type-label select { height: 44px; max-width: 210px; border: 1px solid #b7c4bf; border-radius: 0; padding: 0 8px; font: inherit; background: #fff; }
.prompt-categories { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--prompt-border); }
.prompt-categories button { border: 0; border-bottom: 2px solid transparent; min-height: 44px; padding: 9px 14px; color: #5b6662; }
.prompt-categories button[aria-pressed="true"] { border-bottom-color: var(--prompt-accent); color: var(--prompt-accent); }
.prompt-result-line { display: flex; gap: 12px; justify-content: space-between; align-items: center; min-height: 48px; color: #5b6662; font-size: 13px; }
.prompt-result-line [data-message] { flex: 1; text-align: right; }
.prompt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.prompt-card { border: 1px solid var(--prompt-border); min-width: 0; background: #fff; }
.prompt-library .prompt-card-open { display: block; width: 100%; text-align: left; border: 0; padding: 0; }
.prompt-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #f0f2f1; display: block; }
.prompt-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; height: 55px; margin: 12px 12px 0; line-height: 22px; font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.prompt-card-foot { display: flex; align-items: center; gap: 6px; justify-content: space-between; padding: 0 10px 8px 12px; color: #5b6662; font-size: 12px; }
.prompt-card-foot > span { min-width: 0; overflow-wrap: anywhere; }
.prompt-library .prompt-copy { border: 0; width: 40px; height: 40px; padding: 0; flex: 0 0 40px; }
.prompt-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 24px 0; }
.prompt-pagination button { width: 42px; font-size: 20px; }
.prompt-pagination span { min-width: 55px; text-align: center; }
.prompt-empty { grid-column: 1 / -1; text-align: center; padding: 50px 10px; color: #5b6662; }
.prompt-library .prompt-dialog { width: min(1040px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--prompt-border); border-radius: 0; background: #fff; color: #303b38; }
.prompt-dialog::backdrop { background: rgb(0 0 0 / .45); }
.prompt-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--prompt-border); padding: 14px 20px; }
.prompt-dialog-header h2 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.prompt-dialog-header button { flex-shrink: 0; width: 40px; padding: 0; border: 0; }
.prompt-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; padding: 20px; }
.prompt-detail > img { width: 100%; height: 500px; object-fit: contain; background: #f5f6f5; }
.prompt-editor { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.prompt-parameters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-height: 170px; overflow: auto; }
.prompt-parameters label { display: flex; flex-direction: column; gap: 5px; color: #5b6662; font-size: 12px; overflow-wrap: anywhere; }
.prompt-parameters input { width: 100%; padding: 8px; font: inherit; font-size: 14px; border: 1px solid #b7c4bf; border-radius: 0; }
.prompt-editor textarea { width: 100%; min-height: 230px; flex: 1; padding: 12px; resize: vertical; border: 1px solid #b7c4bf; border-radius: 0; color: #303b38; font: inherit; line-height: 1.8; }
.prompt-dialog-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prompt-dialog-actions > span { flex: 1; min-width: 55px; color: var(--prompt-accent); }
.prompt-library .prompt-primary { color: #fff; background: var(--prompt-accent); border-color: var(--prompt-accent); }
.prompt-library .prompt-primary:hover { background: #09695f; color: #fff; }
@media (max-width: 767.98px) { .prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .prompt-detail { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; } .prompt-detail > img { height: 260px; } .prompt-editor textarea { min-height: 260px; } }
@media (max-width: 479.98px) { .prompt-grid { grid-template-columns: minmax(0, 1fr); } .prompt-card img { aspect-ratio: 4 / 3; } .prompt-categories button { padding-inline: 10px; } .prompt-type-label, .prompt-type-label select { flex: 1; max-width: none; } .prompt-library .prompt-dialog { width: calc(100% - 16px); } .prompt-dialog-header { padding: 12px; } }
