.column-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .4rem 0;
}
.column-toolbar button, .column-toolbar .columns-hidden {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
}
.column-toolbar button { padding: .34rem .55rem; }
.column-toolbar svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.columns-hidden { border-left: 1px solid var(--line); padding-left: .5rem; }
.table-scroll [data-columns-ready] [hidden] { display: none; }
.table-scroll table[data-columns-ready] :is(td,th)[data-pinned] {
  position: sticky;
  z-index: 1;
  background-color: var(--surface, white);
  box-shadow: 1px 0 var(--line);
}
.table-scroll table[data-columns-ready] th[data-pinned] {
  z-index: 2;
  background-color: #f3f6fb;
}
.norm-matrix table[data-columns-ready] :is(td,th):first-child:not([data-pinned]) {
  position: static;
  box-shadow: none;
}
.norm-matrix .table-scroll table[data-columns-ready] {
  min-width: max(100%, calc(var(--visible-columns, 10) * 6rem));
}
dialog.column-picker {
  width: min(34rem, calc(100vw - 1rem));
  max-height: 86dvh;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .85rem;
}
dialog.column-picker[open] { display: flex; flex-direction: column; }
.column-picker header, .column-picker footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .85rem 1.1rem;
}
.column-picker header { justify-content: space-between; }
.column-picker header h2 { margin: 0; }
.column-picker > p { padding: 0 1.1rem; margin: 0 0 .65rem; }
.column-picker ul { list-style: none; margin: 0; padding: 0 1.1rem; overflow: auto; }
.column-picker li, .column-picker .column-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
}
.column-picker li {
  justify-content: space-between;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.column-picker li label { display: inline-flex; align-items: center; gap: .35rem; }
.column-picker li input { width: 1rem; height: 1rem; }
.column-picker .column-options { margin-left: auto; }
.column-picker .column-options label { color: var(--muted); font-size: .85rem; }
.column-picker li button { padding: .2rem .45rem; }
.column-picker footer { justify-content: flex-end; }
.column-picker footer button:first-child { margin-right: auto; }
@media print { .column-toolbar, .column-picker { display: none !important; } }
