/* Sonviz — свои фигуры: строка в разделе песка и окно библиотеки
   (js/studio/figures-lib.js). Переменные — из css/app.css. */
.fig-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fig-chip { display: inline-flex; align-items: stretch; border: 1px solid var(--line2, #2a2e3a); border-radius: var(--r); overflow: hidden; }
.fig-chip.on { border-color: var(--accent); }
.fig-chip button { background: transparent; border: 0; border-radius: 0; padding: 4px 8px; font-size: 12px; color: var(--text, #e8e8ea); }
.fig-chip-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-chip-x { color: var(--dim, #9aa0ab) !important; border-left: 1px solid var(--line2, #2a2e3a) !important; }
.fig-open { font-size: 12px; padding: 4px 10px; }

.fig-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px 16px; background: rgba(6, 7, 10, .62); }
.fig-dlg { width: min(860px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--panel, #12141a);
  border: 1px solid var(--line2, #2a2e3a); border-radius: var(--r2); padding: 16px 18px 20px; color: var(--text, #e8e8ea); }
.fig-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; margin-bottom: 10px; }
.fig-close { background: transparent; border: 0; font-size: 16px; color: var(--dim, #9aa0ab); }
.fig-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.fig-tabs button { padding: 5px 14px; }
.fig-tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.fig-msg { min-height: 18px; font-size: 13px; color: var(--dim, #9aa0ab); margin-bottom: 8px; }
.fig-msg.bad { color: var(--err, #e2574c); }
.fig-drop { border: 1px dashed var(--line2, #3a3f4d); border-radius: var(--r2); padding: 16px; text-align: center; margin-bottom: 14px; }
.fig-drop.over { border-color: var(--accent); background: var(--tint); }
.fig-drop-t { font-size: 14px; margin-bottom: 8px; }
.fig-hint { font-size: 12px; line-height: 1.5; color: var(--dim, #9aa0ab); margin-top: 6px; }
.fig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fig-card { border: 1px solid var(--line, #22252f); border-radius: var(--r2); padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.fig-prev { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r); display: block; }
.fig-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-pill { align-self: flex-start; font-size: 11px; padding: 1px 8px; border-radius: 20px; background: var(--panel2); color: var(--dim, #9aa0ab); }
.fig-pill.pending { background: rgba(229, 197, 143, .1); color: var(--warn); }
.fig-pill.public { background: rgba(159, 224, 188, .1); color: var(--ok); }
.fig-pill.rejected { background: rgba(255, 111, 97, .1); color: var(--err); }
.fig-acts { display: flex; flex-wrap: wrap; gap: 4px; }
.fig-acts button { font-size: 12px; padding: 3px 8px; }
.fig-acts button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.fig-acts button.danger { color: var(--err, #e2574c); }
.fig-new { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.fig-new .fig-prev { width: 180px; }
.fig-new-side { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.fig-new-side input { width: 100%; }
