/* Tool dialog shell (đợt 5), shared by the three tools: research-sheet.css draws .rs-back / .rs / .rs-head / .rs-x.
   Each tool's own layout lives in tools-research.css, tools-learning.css, tools-drafting.css. */
.fit-tools-back .rs-head .rs-title:focus { outline: none; }
.fit-tools-back .rs-head-slot { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
.fit-tools-back .rs-head-slot:empty { display: none; }
.fit-tools-back .rs-head .rs-head-slot:empty + .rs-x { margin-left: auto; }
.fit-tools-back .rs-body { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.fit-tools-back .rs-content { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow-y: auto; }
/* Short or zoomed screens: the dialog never runs past the window. */
.fit-tools-back .rs { max-height: calc(100dvh / var(--z, 1) - 48px); }
