/* Справочник инструментов (www/tools.html, js/tools-page.js) */
.tl-controls p { margin: 0 0 10px; }
/* Группы — компактной лентой сверху (прокрутка вбок, если не влезает). */
.tl-groups { display: flex; gap: 6px; margin: 4px 0 0; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.tl-chip { flex: none; font: inherit; font-size: .85rem; border: 1px solid var(--line); background: var(--card); color: var(--muted); padding: 5px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tl-chip:hover { border-color: var(--muted); }
.tl-chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tl-courses { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 8px; font-size: .9rem; }
.tl-courses a { color: var(--draw); }
.tools-page main { overflow-wrap: anywhere; padding-right: 40px; }
/* Буквы-заголовки, липкие при прокрутке. */
#toolsCard { overflow: visible; }
.tl-letter { position: sticky; top: 0; z-index: 2; margin: 0; padding: 6px 0 4px; font-size: 1.6rem; line-height: 1.2; background: var(--card); border-bottom: 2px solid var(--line); }
.tl-sec + .tl-sec .tl-letter { margin-top: 10px; }
/* Поиск — внизу, липкий у нижнего края экрана: результаты видны над ним. */
.tl-search { position: sticky; bottom: 0; transition: bottom .2s; z-index: 3; display: flex; align-items: center; gap: 10px; margin-bottom: 0; box-shadow: 0 -4px 12px rgba(0, 0, 0, .08); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.tl-search input { flex: 1; min-width: 0; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
.tl-search .muted { flex: none; font-size: .85rem; }
/* Меню букв справа, как в контактах телефона. */
.tl-rail { position: fixed; right: 0; top: 64px; bottom: 76px; transition: bottom .2s; width: 34px; z-index: 5; display: flex; flex-direction: column; justify-content: center; touch-action: none; user-select: none; -webkit-user-select: none; padding: 8px 0; box-sizing: border-box; }
.tl-rail button { flex: 0 1 26px; min-height: 0; font: inherit; font-size: clamp(9px, 1.9vh, 14px); font-weight: 700; line-height: 1; border: 0; background: none; color: var(--draw, var(--text)); cursor: pointer; padding: 0; touch-action: none; }
.tl-rail button.on { color: var(--text); }
.tl-bubble { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: 96px; height: 96px; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; font-weight: 700; background: var(--text); color: var(--bg); opacity: .88; pointer-events: none; }
.tl-bubble[hidden] { display: none; }
/* Строка состояния (0101) выезжает снизу при прокрутке — поиск и буквы поднимаются над ней. */
body:has(.status-bar.sb-on) .tl-search { bottom: var(--sbh, 46px); }
body:has(.status-bar.sb-on) .tl-rail { bottom: calc(76px + var(--sbh, 46px)); }
.tl-body { overflow: hidden; } .tl-body .fig-row > * { max-width: 100%; }
.tl-body .cr3d-box { max-width: 100%; }
