.dbs { max-width: 640px; }
.dbs-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.dbs-tab {
  padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.dbs-tab-active { background: #19616a; border-color: #19616a; color: #fff; }
.dbs-panel { display: flex; flex-direction: column; gap: 12px; }
.dbs-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.dbs-panel input, .dbs-panel select, .dbs-panel textarea {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; font-family: inherit;
}
.dbs-panel textarea { font-family: ui-monospace, monospace; font-size: 13.5px; resize: vertical; }
.dbs-panel input:focus, .dbs-panel select:focus, .dbs-panel textarea:focus { outline: 2px solid #19616a; outline-offset: 1px; }
.dbs-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dbs-row2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dbs-check-row { display: flex; flex-wrap: wrap; gap: 14px; }
.dbs-check {
  flex-direction: row !important; align-items: center; gap: 6px !important; font-weight: 700;
}
.dbs-check input[type="checkbox"] { width: auto; padding: 0; }
.dbs-check-inline { justify-content: flex-end; }

/* 3x3 shaped-recipe grid */
.dbs-grid3 { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; }
.dbs-grid3 input {
  width: 44px; height: 44px; padding: 0; text-align: center; font-size: 16px; font-weight: 700;
  text-transform: none;
}

/* Repeatable rows (key mapping, ingredients, kit items) */
.dbs-list { display: flex; flex-direction: column; gap: 8px; }
.dbs-list-row { display: flex; gap: 8px; align-items: center; }
.dbs-list-row input, .dbs-list-row select { flex: 1; }
.dbs-list-row .dbs-key-input { flex: 0 0 60px; }
.dbs-list-row .dbs-count-input { flex: 0 0 80px; }
.dbs-btn-remove {
  flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid #d9e0d4; border-radius: 6px; background: #fff;
  color: #27331f; cursor: pointer; font-size: 16px; line-height: 1; font-weight: 700;
}
.dbs-btn-remove:hover { border-color: #19616a; color: #19616a; }
.dbs-btn-add {
  align-self: flex-start; padding: 8px 14px; font-size: 13px; font-weight: 700; border: 1px solid #19616a;
  border-radius: 6px; background: #fff; color: #19616a; cursor: pointer;
}
.dbs-btn-add:hover { background: #19616a; color: #fff; }

/* JSON / multi-line output block, styled like the reference tool's command blocks */
.dbs-out { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.dbs-json {
  margin: 0; padding: 12px 14px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: 13px; color: #19616a; font-weight: 600;
  white-space: pre-wrap; word-break: break-word; overflow-x: auto;
}
.dbs-out span.dbs-json-desc { font-size: 12.5px; color: #5b6b56; }
.dbs-hint { font-size: 12.5px; color: #5b6b56; margin: 4px 0 0; }
.dbs-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }
.dbs-warn {
  font-size: 12.5px; color: #27331f; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
  padding: 8px 10px; margin: 0 0 4px;
}

@media (max-width: 480px) {
  .dbs-row3 { grid-template-columns: 1fr; }
  .dbs-row2 { grid-template-columns: 1fr; }
}
