/* The public Use preview follows src/style.css without desktop-only surfaces. */
:root { font: 13px/1.4 var(--font-sans); font-synthesis: none; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
button svg { flex-shrink: 0; }
button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h2, p { margin: 0; }
.app { position: relative; display: flex; flex-direction: column; height: 100dvh; color: var(--fg); background: var(--bg); border-radius: 12px; overflow: hidden; }
.library-toolbar { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 10px; flex-shrink: 0; }
.library-heading, .search-row { display: flex; align-items: center; gap: 8px; }
.new-button, .solid-button { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px; color: var(--ink-fg); background: var(--ink); border-radius: 8px; font-weight: 500; }
.new-button:hover, .solid-button:hover { opacity: .86; }
.new-button.icon-only { width: 34px; padding: 0; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--muted); border-radius: 7px; flex-shrink: 0; }
.icon-button:hover { color: var(--fg); background: var(--hover); }
.search-field { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 8px 0 10px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.search-field input { min-width: 0; flex: 1; width: 100%; height: 100%; padding: 0; border: 0; color: var(--fg); background: transparent; }
.search-field:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-field input:focus-visible { outline: none; }
.search-field input::placeholder { color: var(--faint); }
.type-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.type-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; flex-shrink: 0; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: 12.5px; font-weight: 500; }
.type-chip:hover { background: var(--hover); }
.type-chip[aria-pressed="true"] { color: var(--ink-fg); background: var(--ink); border-color: var(--ink); }
.type-chip-clear { background: transparent; border-style: dashed; border-color: var(--border-strong); }
.library-content { display: flex; flex-direction: column; flex: 1; min-height: 0; border-top: 1px solid var(--border); }
.prompt-list { min-height: 0; overflow-y: auto; padding: 6px 10px 24px; }
.prompt-item + .prompt-item { margin-top: 1px; }
.prompt-row { display: flex; align-items: flex-start; gap: 2px; }
.prompt-copy { display: flex; min-width: 0; flex: 1; padding: 8px 8px 8px 10px; text-align: left; border-radius: 8px; }
.prompt-copy:hover { background: var(--hover); }
.prompt-copy:active { background: var(--selected); transform: translateY(1px); }
.prompt-list-text { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.prompt-title-line { display: flex; align-items: center; min-width: 0; gap: 6px; }
.prompt-title-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 500; }
.flag-badge { color: var(--accent); flex-shrink: 0; }
.prompt-tags-inline { display: flex; flex-wrap: wrap; gap: 4px; }
.prompt-tag { max-width: 160px; padding: 0 6px; color: var(--muted); background: var(--tag); border-radius: 4px; font-size: 11px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prompt-chosen { overflow: hidden; color: var(--accent-text); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-row > .icon-button { width: 26px; height: 26px; margin: 6px 4px 0 0; opacity: 0; }
.prompt-row:hover > .icon-button, .prompt-row:focus-within > .icon-button { opacity: 1; }
.prompt-parts-toggle { display: inline-flex; align-items: center; gap: 3px; height: 26px; margin-top: 6px; padding: 0 6px; color: var(--muted); border: 1px solid transparent; border-radius: 6px; font: 400 11.5px/1 var(--font-mono); white-space: nowrap; }
.prompt-parts-toggle:hover, .prompt-parts-toggle[aria-expanded="true"] { background: var(--surface); border-color: var(--border); }
.prompt-sub { display: flex; flex-direction: column; gap: 6px; padding: 2px 10px 10px 12px; }
.block-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.block-choice-key { min-width: 48px; color: var(--faint); font: 500 11.5px/1 var(--font-mono); }
.part-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: 12.5px; }
.part-toggle:hover { background: var(--hover); }
.part-toggle[aria-pressed="true"] { color: var(--ink-fg); background: var(--ink); border-color: var(--ink); }
.use-footer { height: 28px; display: flex; align-items: center; padding: 0 14px; flex-shrink: 0; color: var(--faint); background: var(--chrome); border-top: 1px solid var(--border); font: 400 10.5px/1 var(--font-mono); }
.empty-state { padding: 36px 16px; color: var(--muted); text-align: center; }
.empty-state h2 { margin-bottom: 8px; color: var(--fg); font-size: 14px; font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.feedback-toast { position: fixed; z-index: 1001; bottom: 44px; left: 50%; display: flex; align-items: center; gap: 8px; height: 36px; max-width: calc(100vw - 24px); padding: 0 14px 0 10px; color: var(--ink-fg); background: var(--ink); border-radius: 18px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 500; white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
.feedback-toast-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: #fff; background: var(--accent); border-radius: 50%; }
.app-dialog { width: min(400px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 18px; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.app-dialog::backdrop { background: var(--scrim); }
.dialog-heading, .editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.dialog-heading h2, .editor-heading h2 { font-size: 15px; font-weight: 550; }
.dialog-actions, .editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.text-button { height: 34px; padding: 0 12px; color: var(--fg); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.text-button:hover { background: var(--hover); }
.editor-fields { display: flex; flex-direction: column; gap: 14px; }
.editor-fields label { display: flex; flex-direction: column; gap: 6px; }
.editor-fields small, #editor-bank { color: var(--faint); font-size: 11px; }
.editor-fields input, .editor-fields textarea { width: 100%; padding: 9px 10px; color: var(--fg); background: var(--bg); border: 1px solid var(--border); border-radius: 7px; }
.editor-fields textarea { min-height: 130px; max-height: 180px; resize: vertical; font: 12px/1.6 var(--font-mono); }
.editor-spacer { flex: 1; }
@media (hover: none) { .prompt-row > .icon-button { opacity: 1; } }
