.msbc { max-width: 820px; display: flex; flex-direction: column; color: #27331f; }
.msbc-section { margin-bottom: 26px; }
.msbc-h { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; color: #27331f; }

.msbc label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.msbc input, .msbc select {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; background: #fff; color: #27331f;
  font-family: inherit;
}
.msbc input:focus, .msbc select:focus { outline: 2px solid #19616a; outline-offset: 1px; }
.msbc-hint { margin: 6px 0 0; font-size: 12.5px; color: #5b6b56; }
.msbc-empty { font-size: 13px; color: #5b6b56; }

.msbc-search { width: 100%; box-sizing: border-box; margin-bottom: 10px; }

/* Block picker */
.msbc-block-list {
  display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto;
  border: 1px solid #d9e0d4; border-radius: 6px; padding: 6px; background: #fff; margin-bottom: 10px;
}
.msbc-block-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; font-size: 13px; font-weight: 700; color: #27331f;
  border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; text-align: left;
  font-family: inherit;
}
.msbc-block-item:hover { border-color: #d9e0d4; background: #f3f4f8; }
.msbc-block-item-active { background: #19616a; border-color: #19616a; color: #fff; }
.msbc-block-item-name { flex: 1 1 auto; }
.msbc-block-item-hardness { font-size: 11.5px; font-weight: 400; opacity: 0.75; white-space: nowrap; }

.msbc-block-chosen {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: #f3f4f8;
  border: 1px solid #d9e0d4; border-radius: 6px;
}
.msbc-chosen-name { font-size: 14px; font-weight: 700; color: #19616a; }
.msbc-chosen-meta { font-size: 12.5px; color: #5b6b56; }

/* Modifiers */
.msbc-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.msbc-checks { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.msbc-check { flex-direction: row !important; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.msbc-check input[type="checkbox"] { width: auto; margin: 0; padding: 0; }

/* Result */
.msbc-result { display: flex; flex-direction: column; gap: 10px; }
.msbc-summary { display: flex; flex-wrap: wrap; gap: 10px; }
.msbc-stat {
  flex: 1 1 160px; padding: 12px 14px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.msbc-stat-wide { flex-basis: 100%; }
.msbc-stat-label { font-size: 11.5px; font-weight: 700; color: #5b6b56; text-transform: uppercase; letter-spacing: 0.03em; }
.msbc-stat-value { font-size: 20px; font-weight: 700; color: #19616a; }
.msbc-stat-value.msbc-danger { color: #c0392b; }
.msbc-danger { color: #c0392b; }

.msbc-warning {
  padding: 10px 12px; background: #fdecea; border: 1px solid #e6b3ac; border-radius: 6px; color: #c0392b;
  font-size: 13px; font-weight: 700; margin: 0;
}
.msbc-yield-ok {
  padding: 10px 12px; background: #eef6ee; border: 1px solid #bfe0bf; border-radius: 6px; color: #2c6e2f;
  font-size: 13px; font-weight: 700; margin: 0;
}
.msbc-detail-row { font-size: 12.5px; color: #5b6b56; }

/* Prose */
.msbc-prose p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: #27331f; }
.msbc-prose p:last-child { margin-bottom: 0; }
.msbc-prose code { font-family: ui-monospace, monospace; font-size: 12.5px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 4px; padding: 1px 5px; color: #19616a; }

/* Reference table */
.msbc-table-wrap { overflow-x: auto; }
.msbc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.msbc-table th, .msbc-table td { text-align: left; padding: 8px 9px; border: 1px solid #d9e0d4; vertical-align: top; }
.msbc-table th { background: #f3f4f8; color: #27331f; font-weight: 700; white-space: nowrap; }
.msbc-table td { color: #27331f; }
.msbc-table tbody tr:nth-child(even) td { background: #f3f4f8; }
.msbc-table .msbc-ref-time { font-weight: 700; color: #19616a; white-space: nowrap; }

.msbc-note { margin-top: 4px; font-size: 13px; color: #5b6b56; }

@media (max-width: 640px) {
  .msbc-row3 { grid-template-columns: 1fr; }
  .msbc-summary { flex-direction: column; }
}
