.prompt-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.prompt-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: start; gap: 22px; }
.prompt-browser { min-width: 0; }
.prompt-search { width: 100%; background: white; font-size: 13px; }
.prompt-filter { display: flex; gap: 12px; align-items: center; color: var(--color-muted); font-size: 12px; margin-top: 12px; }
.prompt-filter select { flex: 1; font-size: 12px; padding: 7px 10px; }
.prompt-list-status { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--color-muted); font-size: 12px; }
.prompt-list { display: grid; gap: 9px; max-height: 640px; overflow-y: auto; padding: 1px; }
.prompt-item { display: block; width: 100%; border: 1px solid var(--color-border); border-radius: var(--radius); background: white; color: var(--color-text); text-align: left; padding: 14px; }
.prompt-item:hover { border-color: var(--line-strong); }
.prompt-item[aria-current="true"] { border-color: #a9d0bc; background: #f2f8f4; box-shadow: inset 3px 0 var(--color-primary); }
.prompt-item-title { display: flex; gap: 9px; justify-content: space-between; font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.prompt-item-preview { font-size: 12px; color: var(--color-muted); line-height: 1.6; margin: 8px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.tag-chip { color: var(--pine-strong); background: var(--pine-soft); border-radius: var(--radius-pill); padding: 3px 7px; font-size: 11px; overflow-wrap: anywhere; }
.prompt-pagination { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; margin-top: 13px; color: var(--color-muted); }
.button-small { min-height: 29px; padding: 4px 8px; font-size: 11px; }
.prompt-editor { min-width: 0; overflow: hidden; }
.prompt-editor-empty { min-height: 400px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; padding: 30px; }
.prompt-editor-empty p { font-size: 13px; max-width: 350px; }
.prompt-editor-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 22px; border-bottom: 1px solid var(--color-border); }
.prompt-editor-header h2 { font-size: 18px; overflow-wrap: anywhere; }
.favorite-button { font-size: 26px; line-height: 1; }
.favorite-button[aria-pressed="true"] { color: var(--warn); }
.draft-strip { display: flex; align-items: center; gap: 12px; padding: 10px 22px; background: var(--surface-sunk); border-bottom: 1px solid var(--color-border); font-size: 11px; }
.draft-strip strong { font-weight: 500; color: var(--color-muted); }
.draft-strip [data-draft-status] { margin-left: auto; color: var(--color-muted); }
.draft-strip [data-state="error"] { color: var(--color-danger); }
.draft-warning { margin: 14px 20px 0; border: 1px solid #ecd6ab; border-radius: var(--radius-sm); background: var(--warn-soft); color: #7a4a00; padding: 10px 12px; font-size: 12px; }
.prompt-body { width: calc(100% - 40px); margin: 16px 20px 5px; border: 1px solid transparent; min-height: 370px; resize: vertical; font: 13px/1.9 var(--font-sans); padding: 7px 3px; }
.prompt-body:focus { outline: 2px solid var(--pine-soft); outline-offset: 2px; border-color: transparent; }
.prompt-editor-meta { display: flex; justify-content: space-between; gap: 12px; padding: 6px 22px 17px; font-size: 11px; color: var(--color-muted); }
.prompt-editor-actions { border-top: 1px solid var(--color-border); padding: 15px 20px; display: flex; flex-wrap: wrap; gap: 8px; background: var(--surface-sunk); }
.prompt-editor-actions [data-copy] { margin-left: auto; }
.prompt-editor-actions .button { font-size: 12px; }
.prompt-help { font-size: 12px; color: var(--color-muted); max-width: 1000px; margin-top: 20px; line-height: 1.8; }
.prompt-dialog { border: 1px solid var(--color-border); padding: 0; width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); border-radius: var(--radius); color: var(--color-text); box-shadow: var(--shadow-pop); }
.prompt-dialog::backdrop { background: rgba(17, 32, 26, .38); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 22px; border-bottom: 1px solid var(--color-border); }
.dialog-content { padding: 20px 22px 4px; }
.dialog-content > p { margin-bottom: 20px; font-size: 13px; line-height: 1.8; }
.dialog-content textarea { resize: vertical; min-height: 170px; line-height: 1.7; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--color-border); background: var(--surface-sunk); }
.field-hint { font-size: 11px; color: var(--color-muted); }
.prompt-confirm { width: min(480px, calc(100vw - 32px)); }
.tag-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.tag-catalog-item { padding: 20px; display: block; color: var(--color-text); }
.tag-catalog-item:hover { border-color: var(--line-strong); text-decoration: none; background: var(--surface-sunk); }
.tag-catalog-item strong { display: block; margin-bottom: 10px; font-size: 14px; overflow-wrap: anywhere; }
.tag-catalog-item span { font-size: 12px; color: var(--color-muted); }
@media (max-width: 1150px) { .prompt-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 15px; } .prompt-editor-actions .button { padding: 6px 10px; } }
@media (max-width: 950px) { .prompt-layout { grid-template-columns: 1fr; } .prompt-list { display: flex; overflow-x: auto; max-height: none; padding-bottom: 5px; } .prompt-item { width: 245px; flex: 0 0 245px; } .prompt-item-preview { -webkit-line-clamp: 1; } .prompt-body { min-height: 300px; } }
@media (max-width: 600px) { .prompt-page-header h1 { font-size: 23px; } .prompt-page-header .button { white-space: nowrap; } .prompt-editor-header, .draft-strip { padding-left: 16px; padding-right: 16px; } .prompt-editor-actions { padding: 13px 16px; } .prompt-body { width: calc(100% - 32px); margin-left: 16px; margin-right: 16px; } .draft-strip { flex-wrap: wrap; gap: 6px; } }

/* Optional dense list: presentation only, leaves the selected draft untouched. */
.prompt-view-toggle { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--color-muted); font-size: 12px; cursor: pointer; }
.prompt-view-toggle input { margin: 0; accent-color: var(--color-primary); }
.prompts[data-list-view="compact"] .prompt-list { display: grid; gap: 5px; max-height: 640px; overflow-y: auto; overflow-x: hidden; }
.prompts[data-list-view="compact"] .prompt-item { width: 100%; padding: 10px 14px; }
.prompts[data-list-view="compact"] .prompt-item-preview,
.prompts[data-list-view="compact"] .prompt-item .tag-chips,
.prompts[data-list-view="compact"] .prompt-item-favorite { display: none; }

.prompt-description { padding: 13px 22px; border-bottom: 1px solid var(--color-border); background: var(--surface-sunk); }
.prompt-description summary { cursor: pointer; color: var(--color-muted); font-size: 12px; font-weight: 500; }
.prompt-description p { margin-top: 10px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--color-text); font-size: 13px; line-height: 1.75; }
.dialog-content textarea.prompt-description-input { min-height: 90px; }
@media (max-width: 600px) { .prompt-description { padding-left: 16px; padding-right: 16px; } }
