.inline-row { display: flex; gap: .5rem; align-items: stretch; }
.inline-row select { flex: 1; min-width: 0; }
.bm { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; margin-top: 1rem; align-items: start; }
.bm__tools { display: flex; flex-direction: column; gap: .8rem; }
.bm__group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: .6rem; }
.bm__label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: .35rem; }
.bm__modes { display: flex; flex-wrap: wrap; gap: .3rem; }
.bm__btn { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; padding: .35rem .6rem; font: 600 .82rem/1.2 var(--font-body); cursor: pointer; color: var(--ink); min-height: 34px; }
.bm__btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.bm__btn--sq { width: 34px; padding: 0; }
.bm__brush { margin-top: .5rem; display: flex; align-items: center; gap: .3rem; }
.bm__brush .bm__label { margin: 0 .3rem 0 0; }
.bm__swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: .25rem; }
.bm__sw { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: .2rem .35rem; cursor: pointer; font: .8rem/1.2 var(--font-body); color: var(--ink); text-align: left; min-height: 36px; }
.bm__sw canvas { width: 26px; height: 26px; border-radius: 3px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.bm__sw.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.bm__tok { display: grid; gap: .35rem; font-size: .85rem; }
.bm__tok label { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.bm__tok select, .bm__tok input { max-width: 140px; padding: .3rem .4rem; min-height: 32px; }
.bm__actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.bm__stage canvas { touch-action: none; cursor: crosshair; }
@media (max-width: 860px) {
  .bm { grid-template-columns: 1fr; }
  .bm__stage { order: -1; }
  .bm__swatches { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media print {
  .site-header, .site-footer, .breadcrumbs, .tool-head, .calc__bar, .calc__section, .tool-aside, .prose, .faq, .related, .ad, .bm__tools, #bm-status { display: none !important; }
  .calc { box-shadow: none; border: 0; padding: 0; } .calc::before { display: none; }
  .bm { display: block; } .canvas-wrap { border: 0; max-height: none; }
}
