/* Kapitelsteuerung: abgestimmte Bedienhoehen und klare Reihen. */
html .page .chapter-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: .6rem .75rem; margin: 1rem 0 .85rem; }
html .page .chapter-tools label { grid-column: 1 / -1; margin: 0; }
html .page .chapter-tools input,
html .page .chapter-tools button,
html .page .chapter-tools + .tagbar select { box-sizing: border-box; min-height: 2.75rem; margin: 0; font: inherit; font-size: .9rem; line-height: 1.35; padding: .6rem .85rem; }
html .page .chapter-tools input { width: 100%; min-width: 0; }
html .page .chapter-tools button { align-self: stretch; white-space: nowrap; }
html .page .chapter-tools + .tagbar { margin: 0 0 1.1rem; }
html .page .chapter-tools + .tagbar .tagchips { gap: .4rem; align-items: center; }
html .page .chapter-tools + .tagbar .tagchips .tag { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 2.25rem; max-width: 100%; margin: 0; padding: .35rem .65rem; font-size: .8rem; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
html .page .chapter-tools + .tagbar .tagchips .tag.extra { display: none; }
html .page .chapter-tools + .tagbar .tagchips.open .tag.extra { display: inline-flex; }
html .page .chapter-tools + .tagbar .tagmeta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-top: .85rem; }
html .page .chapter-tools + .tagbar .tag-count { flex: 1 1 12rem; min-width: 0; white-space: normal; }
html .page .chapter-tools + .tagbar select { flex: 0 1 auto; max-width: 100%; min-width: 12rem; }
@media (max-width: 540px) {
  html .page .chapter-tools { grid-template-columns: minmax(0, 1fr); }
  html .page .chapter-tools button { justify-self: stretch; }
  html .page .chapter-tools + .tagbar select { flex-basis: 100%; width: 100%; min-width: 0; }
  html .page .chapter-tools + .tagbar .tagchips .tag { min-height: 2.75rem; }
}
@media print { html .page .chapter-tools, html .page .chapter-tools + .tagbar { display: none; } }
