/* Overlay card contents: the system prompt list and editor, the app library list, versions and their diff. */
#card .prompt-edit {
  width: 100%;
  height: 58vh;
  resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font: 12.5px/1.55 var(--mono);
  outline: 0;
}
#card .prompt-edit:focus { border-color: var(--accent); }
#card .env summary { cursor: pointer; color: var(--muted); font-size: 13px; }
#card .env pre { margin-top: 8px; font-size: 12px; max-height: 40vh; overflow: auto; white-space: pre-wrap; }
/* The markers a part of your own may hold: click one to put it where the cursor is. */
#card .markers p { margin: 8px 0 6px; font-size: 13px; color: var(--muted); }
#card .markers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; max-height: 30vh; overflow: auto; font-size: 13px; }
#card .markers li { display: contents; }
#card .markers button { justify-self: start; padding: 2px 8px; font: 12px var(--mono); }
#card .markers .v { color: var(--muted); }
#card .prompt-edit.short { height: 40vh; }
.actions button:disabled { opacity: 0.4; cursor: default; }
.lib-list { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: 55vh; display: flex; flex-direction: column; gap: 2px; }
.lib-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  transition: opacity 0.18s, transform 0.18s;
}
.lib-list li:hover { background: var(--surface-2); }
.lib-list li.gone { opacity: 0; transform: translateX(12px); }
.lib-list .body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lib-list .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-list .p { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-list .p.path { font-size: 12px; user-select: text; }
.lib-list .p .missing { color: var(--danger); }
.lib-list .open, .lib-list .inapp, .lib-list .del {
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  opacity: 0.75;
}
.lib-list li:hover .open, .lib-list li:hover .inapp, .lib-list li:hover .del, .lib-list .open:focus-visible, .lib-list .inapp:focus-visible, .lib-list .del:focus-visible { opacity: 1; }
.lib-list .open:disabled, .lib-list .inapp:disabled { opacity: 0.4; cursor: default; pointer-events: none; }
.lib-list .open:hover, .lib-list .inapp:hover { color: var(--accent); border-color: var(--accent); }
.lib-list .del:hover { color: var(--danger); border-color: var(--danger); }
.lib-list .del.armed { opacity: 1; background: var(--danger); border-color: var(--danger); color: #fff; }
.ver-list .use { margin-left: -6px; }
.ver-diff { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ver-diff-head { color: var(--muted); font-size: 13px; }
.diff { margin: 0; overflow: auto; max-height: 55vh; font: 12px/1.5 var(--mono); border: 1px solid var(--border); border-radius: 10px; padding: 6px 0; }
.diff > div { display: flex; white-space: pre; padding: 0 10px; min-width: max-content; }
.diff .ln { flex: none; width: 4ch; margin-right: 1ch; text-align: right; color: var(--muted); user-select: none; }
.diff .sg { flex: none; width: 2ch; color: var(--muted); user-select: none; }
.diff .add { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.diff .del { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.diff .gap { color: var(--muted); font-style: italic; justify-content: center; padding: 3px 10px; }
.prompt-list input { flex: 1; min-width: 0; }
.prompt-list button:disabled { opacity: 0.4; cursor: default; }
/* /prompt-select-system: the automatic row's description is read whole. */
#card.prompt-lib { width: min(760px, 100%); }
.prompt-list .auto-prompt .p { white-space: normal; }
#card .parts-add { flex-wrap: nowrap; justify-content: flex-start; align-items: center; }
#card .parts-add .block { flex: 1; min-width: 0; }
.part-list .up, .part-list .down { min-width: 28px; }
/* /citations: the reference list. */
.cite-list { list-style: none; margin: 0; padding: 0; overflow: auto; max-height: 55vh; display: flex; flex-direction: column; gap: 14px; user-select: text; }
.cite-list li { display: flex; gap: 10px; }
.cite-list .n { flex: none; min-width: 3ch; color: var(--muted); font-variant-numeric: tabular-nums; }
.cite-list .body { min-width: 0; flex: 1; }
.cite-list .ref { margin: 0; padding-left: 2em; text-indent: -2em; overflow-wrap: anywhere; line-height: 1.5; }
.cite-list .about { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cite-list blockquote { margin: 6px 0 0; padding-left: 10px; border-left: 2px solid var(--border); color: var(--muted); font-size: 13px; font-style: italic; }
/* /prompts-show: each conversation's first request, its follow-ups indented under it; up to two lines each. */
.pshow-list .p { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--fg); font-size: 14px; }
.pshow-list .twist { flex: none; width: 22px; height: 22px; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.pshow-list .twist:disabled { cursor: default; }
.pshow-list .count { color: var(--muted); font-size: 12px; }
.pshow-list .cost { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pshow-list li.follow { margin-left: 34px; border-left: 2px solid var(--border); border-radius: 0 10px 10px 0; }

/* /privacy-log */
.plog-entry { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.plog-head { display: flex; flex-direction: column; gap: 8px; }
.plog-head .what { color: var(--muted); font-size: 13px; }
.plog-text { margin: 0; overflow: auto; max-height: 50vh; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; user-select: text; }
.plog-mark { background: color-mix(in srgb, var(--accent) 18%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }
.plog-mark.real { background: color-mix(in srgb, var(--danger) 18%, transparent); }
.actions .clear.armed { background: var(--danger); border-color: var(--danger); color: #fff; }
